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

@show

Show HN: DeepSeek V3 in ~200 lines of pure Jax github.com · 3 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 Flax, Equinox or PyTorch. The author pretrained a 36.2M-parameter model from scratch on a MacBook Air using public-domain detective fiction, and it is presented explicitly as an architecture demo rather than a capable language model. The thread 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, against 671B in the original.
  • MLA caches 144 numbers per token per layer instead of 480 for full keys and values.
  • Trained 12,000 steps (~98M tokens, ~4.5 epochs) on 207 books, 21.7M tokens, taking about 2.6 hours at roughly 10.7k tokens/s on a MacBook Air M5 with 24 GB.
  • With bias balancing, expert load ranged 5.7–6.9% (even is 6.25%); without it, 0.09–18.6%. Validation loss at step 2000 was essentially identical (3.921 vs 3.923), matching the paper's claim of no cost.
  • Known limitations: dense MoE compute (every expert runs on every token), no weight absorption in MLA, and no FP8, DualPipe, YaRN or post-training.
  • Ships a v1.0 release with checkpoint and data, 39 tests, and a small CPU config; the checkpoint is a pickle, which can run code when loaded.

Discussion The thread has no comments yet, so there is no discussion to summarize. The submission has 3 points and no replies.

#jax #deepseekV3 #machineLearning #mixtureOfExperts #showHN #llm