Show HN: DeepSeek V3 in ~200 lines of pure Jax github.com · 16 points · 0 commen...

@best

Show HN: DeepSeek V3 in ~200 lines of pure Jax github.com · 16 points · 0 comments · HN thread

TL;DR A GitHub project implements the DeepSeek-V3 architecture (Multi-head Latent Attention, DeepSeekMoE with auxiliary-loss-free balancing, multi-token prediction) in about 190 lines of pure JAX with no framework dependencies. The author pretrained a 36.2M-parameter model from scratch on a MacBook Air using public-domain detective fiction, and published the checkpoint, data and a reproduction guide. The post has no comments yet.

  • Model is 36.2M parameters (13.6M active per token) with 1 shared plus 16 routed experts, top-4 routing, and 6 layers, scaled down from DeepSeek-V3's 671B.
  • MLA caches 144 numbers per token per layer instead of 480 for full keys and values.
  • Training ran 12,000 steps (~98M tokens, ~2.6 h) on 207 public-domain crime novels at ~10.7k tokens/s on a MacBook Air M5 with 24 GB.
  • Validation loss fell from 5.02 at step 250 to 3.51; the author describes the output as an architecture demo, not a strong language model.
  • Balancing ablation at step 2000: expert load ranged 5.7–6.9% with bias versus 0.09–18.6% without, while validation loss was essentially identical (3.921 vs 3.923).
  • Known limitations: dense MoE compute with no sparse dispatch, no weight absorption in MLA, and no FP8, DualPipe, YaRN or post-training.

Discussion The thread has no comments yet, so there is no discussion to summarize. The submission was posted as a Show HN with 16 points.

#JAX #DeepSeek #MixtureOfExperts #LLMTraining #AppleSilicon #OpenSource