1 episodes
Paper: Kimi Linear Hybrid
Kimi Linear (arXiv 2510.26692) interleaves three KDA layers with one MLA layer (48B total / 3B active) and reports better quality than full MLA with up to 75% less KV cache and up to 6x decoding throughput at 1M tokens. The module explains why a fixed-size state cannot do exact recall at any load, derives the KV saving of any layer pattern, builds MQAR and needle benchmarks scored only where recall is needed, and sets up a fair hybrid-vs-full comparison.
Progress — loading…
Objectives
Language
- Explain the recall demands of language and how perplexity can hide them
- Summarize Kimi Linear's hybrid design (NoPE MLA) and its reported results and ablation
Math & data structures
- Capacity of fixed states vs append-only caches; the KV-saving formula and its limit
- Synthetic benchmark design: MQAR, needle-in-a-haystack, per-position scoring
Code
- nlpcore.models.hybrid: patterns, KV accounting, generators, retrieval probe; HybridLM from layer_pattern
- Train full / hybrid / all-KDA on MQAR with seeds (GPU tier)
Episodes
- Hybrids: 3 KDA : 1 MLA16 min · 26 cues
Why hybrids (exact recall from full attention, efficiency from linear), KV savings.
Exercises
| Exercise | Tier | Ladder | Time |
|---|---|---|---|
| Recall benchmarks (MQAR, needle), the KV bill of a 3:1 hybrid, and an ideal-retrieval probe | browser | Predict · Scratch · Harden · Probe a claim | 60 min |
| 3:1 KDA hybrid vs full attention vs all-KDA on MQAR (and break it: drop the full layers) | gpu | Port · Compose · Break it · Probe a claim | 120 min |
Labs
- Hybrids: 3 KDA : 1 MLA browser F30.01 · 70 min
Library contributions
Files in nlpcore this module teaches you to write.
Sources
- Yang, Kautz & Hatamizadeh, Gated Delta Networks. arXiv 2412.06464 (hybrids with sliding-window attention). · arXiv:2412.06464
- Jelassi, S., Brandfonbrener, D., Kakade, S. M. & Malach, E. Repeat After Me: Transformers are Better than State Space Models at Copying. arXiv 2402.01032 (Feb 2024). · arXiv:2402.01032
- Kimi Team, Kimi Linear: An Expressive, Efficient Attention Architecture. arXiv 2510.26692 (v1 30 Oct 2025, v2 1 Nov 2025). · arXiv:2510.26692
- Recall benchmarks (MQAR, needle), the KV bill of a 3:1 hybrid, and an ideal-retrieval probe and notebook (this curriculum): KV accounting for a stated 24-layer config, synthetic retrieval probe, real-text next-word probe.
- Kamradt, G. (2023). LLMTest_NeedleInAHaystack (GitHub). · linkunverified
- Arora, S., Eyuboglu, S., Timalsina, A., Johnson, I., Poli, M., Zou, J., Rudra, A. & Ré, C. Zoology: Measuring and Improving Recall in Efficient Language Models. arXiv 2312.04927 (Dec 2023). · arXiv:2312.04927