## Problem `src/pygpukit/llm/layers.py` is **1491 lines** with all layer implementations. ## Current State ``` src/pygpukit/llm/ └── layers.py (1491 lines - all layers) ``` ## Proposed Structure ``` src/pygpukit/llm/layers/ ├── __init__.py (exports) ├── base.py (BaseLayer) ├── attention.py (Attention, GQA, MHA) ├── mlp.py (MLP, GatedMLP, SwiGLU) ├── norm.py (RMSNorm, LayerNorm wrappers) ├── embedding.py (TokenEmbedding, PositionEmbedding) └── block.py (TransformerBlock) ``` ## Benefits - Each layer type in its own file - Easier to understand layer implementations - Clear dependencies between layers - Easier testing per layer type ## Related - #141 (model.py split)
Activity
refactor(llm): split layers.py into layers/ package by layer type (#142)
refactor: modularize codebase (Issues #139-#148) (#168)
m96-chan commentedon Dec 30, 2025
Completed in PR #168
V0.2.18 refactor (#173)