-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
Refactor and Restructure loader.weights
and core
Packages
Summary
To improve project maintainability and readability, a refactor of two key packages: loader.weights
and core
is proposed. More specifically:
1. Move loader.weights
into the model
package
The current separation introduces unnecessary indirection. Consolidating these classes under model
better reflects their role and simplifies the structure.
Proposed Changes:
- Move
loader.weights.ModelLoader
→model.loader.ModelLoader
- Move
loader.weights.State
→model.State
, - Move
loader.weights.Weights
→model.Weights
2. Full Refactor of the core
Package
The core
package currently combines low-level data structures. The naming is vague and could be improved for better clarity and cohesion.
Proposed Actions:
- Rename the
core
package to something more descriptive:- Suggested options:
data
,types
, ortensors
- Suggested options:
- Restructure sub-packages and files accordingly:
model.tensor.*
classes likeFloatTensor
,F16FloatTensor
, etc. →data.tensor
ortypes.tensor
GGUF
,GGMLType
→ potentially underdata.format
or a similar groupingFloat16
→ intodata
ortypes
packagePair
→ move toauxiliary
package
Open Questions
- Should we adopt
data
,types
, or another name for the renamedcore
package? - Are there any objections to merging
loader.weights
into themodel
package?
mikepapadim