## Problem `src/pygpukit/llm/loader.py` is **1015 lines** handling multiple model formats. ## Current State ``` src/pygpukit/llm/ └── loader.py (1015 lines - all formats) ``` ## Proposed Structure ``` src/pygpukit/llm/loaders/ ├── __init__.py (unified load interface) ├── base.py (BaseLoader) ├── safetensors.py (SafeTensors loader) ├── gguf.py (GGUF loader - future) ├── hf_hub.py (HuggingFace Hub download) └── weight_map.py (weight name mapping) ``` ## Benefits - Each format loader isolated - Easier to add new formats (GGUF, AWQ, etc.) - Clear loader interface - Better error handling per format ## API ```python from pygpukit.llm.loaders import load_model # Auto-detect format model = load_model('path/to/model') # Explicit format model = load_model('path/to/model', format='safetensors') ``` ## Related - #141 (model.py split) - #143 (__init__.py cleanup)
Activity
refactor(llm): extract quantization configs and repack to dedicated m…
refactor: modularize codebase (Issues #139-#148) (#168)
m96-chan commentedon Dec 30, 2025
Completed in PR #168
V0.2.18 refactor (#173)