Problem
src/pygpukit/llm/__init__.py is 688 lines with too much logic that should be in dedicated modules.
Current State
src/pygpukit/llm/
└── __init__.py (688 lines - imports + logic)
Issues
__init__.py should primarily be exports
- Contains initialization logic that belongs elsewhere
- Hard to understand module structure
- Circular import risks
Proposed Changes
- Move model loading logic to
loader.py
- Move configuration to
config.py
- Keep only exports in
__init__.py
- Target: < 100 lines in
__init__.py
Proposed Structure
# __init__.py (< 100 lines)
from pygpukit.llm.models import QwenModel, LlamaModel
from pygpukit.llm.loader import load_model, from_safetensors
from pygpukit.llm.config import ModelConfig
from pygpukit.llm.chat import ChatSession
__all__ = [...]
Related
Problem
src/pygpukit/llm/__init__.pyis 688 lines with too much logic that should be in dedicated modules.Current State
Issues
__init__.pyshould primarily be exportsProposed Changes
loader.pyconfig.py__init__.py__init__.pyProposed Structure
Related