Show HN: DeepSeek V3 in ~200 lines of pure Jax
- ID
- 46741
- Status
- summarized
- Published
- 14 Nov 2026, 11:04 PM
- Fetched
- 16 Nov 2026, 1:48 AM
- Provider
- Hacker News
- Category
- dev-community
- Original URL
- https://github.com/Vaibhaav-Tiwari/deepseek-v3-jax
- Source URL
- https://hnrss.org/best
Summary
- Score
- 7.5
- Created
- 16 Nov 2026, 1:48 AM
- Tags
- Audience
- ai_ml_learnersdevelopersvibe_coders
What happened
A public repo reimplements the DeepSeek-V3 architecture — Multi-head Latent Attention, DeepSeekMoE with 1 shared + 16 routed experts and top-4 routing, auxiliary-loss-free bias balancing, sequence-wise balance loss (α = 1e-4), and multi-token prediction weighted λ = 0.3 — in 190 lines of plain JAX with no Flax, Equinox, or PyTorch. Parameters are plain dicts of arrays, and the default config trains a 36.2M-parameter model from scratch on a MacBook Air M5 with 24 GB using bf16 compute on f32 master weights. The stated KV-cache effect of MLA here is 480 → 144 numbers per token per layer. The HN thread drew 262 points and 24 comments.
Why it matters
If you have been treating MLA and aux-loss-free MoE balancing as paper-only concepts, this is a single readable file where you can trace the cache compression (480 → 144 per token per layer) and the per-expert bias update that changes routing without touching weights. But calibrate: 36.2M parameters on public-domain detective fiction is an architecture demo, not a reproduction of DeepSeek-V3's behaviour — read it to understand the mechanics, and do not cite its loss curves as evidence about the real model. It also tells you what a 24 GB Apple laptop can and cannot do for from-scratch training runs.
Discussion angle
What does 190 lines leave out — sharding, distributed training, real tokenizer and data pipeline — and which of those omissions actually change what the toy run can teach you about DeepSeek-V3?