Skip to content

refactor(llm): Split model.py by model architecture #141

Closed

Description

@m96-chan

Problem

src/pygpukit/llm/model.py is 1501 lines with multiple model implementations mixed.

Current State

src/pygpukit/llm/
└── model.py  (1501 lines - all models)

Proposed Structure

src/pygpukit/llm/models/
├── __init__.py          (exports)
├── base.py              (BaseModel, common interfaces)
├── qwen.py              (QwenModel, Qwen2, Qwen3)
├── llama.py             (LlamaModel)
├── moe.py               (MoE model support)
└── registry.py          (model registry, auto-detection)

Benefits

  • Each model in its own file
  • Easier to add new model architectures
  • Clear inheritance hierarchy
  • Model-specific optimizations isolated

Related

Activity

  1. m96-chan commented on Dec 30, 2025

    @m96-chan
    OwnerAuthor

    Completed in PR #168

  2. added a commit that references this issue on Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions