Skip to content

Refactor and Restructure #22

@orionpapadakis

Description

@orionpapadakis

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.ModelLoadermodel.loader.ModelLoader
  • Move loader.weights.Statemodel.State,
  • Move loader.weights.Weightsmodel.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, or tensors
  • Restructure sub-packages and files accordingly:
    • model.tensor.* classes like FloatTensor, F16FloatTensor, etc. → data.tensor or types.tensor
    • GGUF, GGMLType → potentially under data.format or a similar grouping
    • Float16 → into data or types package
    • Pair → move to auxiliary package

Open Questions

  • Should we adopt data, types, or another name for the renamed core package?
  • Are there any objections to merging loader.weights into the model package?

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions