Orkhon is a decoder-only transformer written from scratch in PyTorch — not a wrapper around a frontier API. Every block — grouped-query attention, rotary embeddings, RMSNorm, SwiGLU, the serving-time KV-cache — is hand-coded and auditable. You can read the whole stack top to bottom.
The full pipeline lives in one repo: byte-level BPE tokenization, pretraining, supervised fine-tuning, DPO and GRPO alignment, evaluation, and an OpenAI-compatible serving layer. The same code that carves the weights ships them.
It runs on your machine — Apple MPS or NVIDIA CUDA — and it trains on consumer hardware. TinyStories in roughly 43 minutes on an M-series GPU; a 4M smoke model in about a minute. No cluster required to hold the lineage in your hands.