Get the daily emailDaily email
  1. Home
  2. Guides
  3. This story

DeepSeek-V3's architecture in ~200 lines of pure JAX

A Show HN project implements the DeepSeek-V3 architecture in 190 lines of pure JAX with no Flax or PyTorch, covering Multi-head Latent Attention, decoupled RoPE, DeepSeekMoE with 16 routed experts, auxiliary-loss-free balancing and multi-token prediction. A…

Published Read the original
DeepSeek-V3's architecture in ~200 lines of pure JAX

Why it matters

A compact, readable way to understand the key pieces of modern MoE architectures.

What happened

1 min read

A Show HN project implements the DeepSeek-V3 architecture in 190 lines of pure JAX with no Flax or PyTorch, covering Multi-head Latent Attention, decoupled RoPE, DeepSeekMoE with 16 routed experts, auxiliary-loss-free balancing and multi-token prediction. A 36M-parameter model was trained on a MacBook Air M5 in about 2.6 hours on public-domain detective fiction, with an accompanying write-up.

inscraper analysis

Our analysis

Its value is educational rather than practical: a 36M-parameter toy model says nothing about behavior at scale. But seeing MLA, expert routing and MTP side by side in one readable file is useful for engineers who want to really understand the DeepSeek papers, and the expert-load numbers with and without the bias show the balancing trick working.

More in Guides