What problem does it solve?
Adding support for a new HuggingFace model architecture to the Archon training engine requires implementing many interdependent components (model args, attention, FFN, RoPE, state dict adapters, parallelization, registration, and tests), and mistakes in any of them cause silent weight-mapping or parallelism errors.
Core Features & Use Cases
- Architecture Analysis: Walks through reading a target model's HuggingFace config and modeling source to identify attention variants, FFN types, MoE support, RoPE variants, and normalization schemes.
- Reference-Based Implementation: Selects the closest existing implementation (qwen2 for dense models, qwen3 for QK-norm/MoE models) and adapts each file: args.py, model.py, rope.py, state_dict_adapter.py, and parallelize.py.
- Registration and Testing: Covers ModelSpec creation, auto-registration in the package init.py, and staged tests from CPU-only args tests to GPU forward-precision comparison against HuggingFace.
- Use Case: A developer wants to train a Llama-family model with ArchonEngine; the skill guides them through mapping HF config fields, writing the state dict adapter, defining the TP/EP/CP/FSDP parallel plan, and verifying correctness with roundtrip tests.
Quick Start
Ask the assistant to add support for a specific HuggingFace model, such as "add Llama-3-8B support to ArchonEngine", and follow the guided steps.