OTAKAR.AI

Nine Years of Transformer: Vaswani 2017 vs. DeepSeek V4 Flash

Reference sheet
Updated Sept 2026
Sources: "Attention Is All You Need" (2017), DeepSeek-V4 Technical Report (2026)

Both are, technically, "the Transformer." One is a 65M-parameter machine translation model that ran on 8 GPUs for half a day. The other is a 284B-parameter, MIT-licensed model serving 1M-token context at $0.22/M tokens. Same skeleton, everything else rebuilt. Here's where the delta actually lives, in numbers.

1By the Numbers: The Growth Multiples

4,369x
Total parameters: 65M (base) → 284B
Vaswani et al. 2017 / DeepSeek-V4 report
1,953x
Context window: 512 tokens (practical train length) → 1,000,000
Both papers
~6,400x
Training tokens seen: ~5B (100K steps × 25K/batch) → 32 trillion
Vaswani §5.1 / DeepSeek-V4 §4.2.2
21.7x
Active parameters per token if it were dense: 65M → 13B activated
DeepSeek-V4 report

The honest comparison isn't total params — it's active compute per token, since V4 Flash only ever "uses" 4.6% of itself at once. See Section 3.

2The Two Machines, Side by Side

2017 — The Original Transformer
  • Encoder-decoder, 6 layers each, dense throughout — every parameter fires on every token
  • Full scaled dot-product attention: every token attends to every other token, O(n²) cost
  • Fixed sinusoidal positional encoding — no learning, just math baked into the input
  • Trained for machine translation (WMT'14 En-De/En-Fr) on 8 NVIDIA P100 GPUs
  • Point of the paper: attention alone, with no recurrence or convolution, is enough
2026 — DeepSeek V4 Flash
  • 43-layer, all-MoE backbone — 256 routed experts + 1 shared per layer, 7 fire per token
  • Hybrid Compressed Sparse Attention (CSA) + Heavily Compressed Attention (HCA); KV cache compressed 4x–128x before any attention runs
  • Manifold-Constrained Hyper-Connections (mHC) — 4 parallel residual streams instead of 1
  • Trained on 32 trillion tokens with the Muon optimizer, MIT-licensed, GA July 2026
  • Point of the model: same attention idea, engineered so 1M tokens of context is affordable to serve

3Where the Parameters Actually Live

SpecOriginal Transformer (base)DeepSeek V4 Flash
Total parameters~65M284B
Active parameters / token65M (100% — fully dense)~13B (4.6% of total)
Layers6 encoder + 6 decoder = 1243, all MoE (no dense FFN layers)
Hidden dimension (d_model)5124,096
Attention heads8 (d_k = d_v = 64)64 query heads; 64 indexer heads
Feed-forward design1 dense FFN, d_ff = 2,048256 routed experts + 1 shared expert per layer, d_ff = 2,048 each; top-6 routed activated
Vocabulary~37,000 (byte-pair)128,000
Context window (practical)~512 tokens1,000,000 tokens native
Positional signalFixed sinusoidal, absoluteLearned indexer + compression-relative position (no fixed sinusoid)
OptimizerAdam (β1=.9, β2=.98)Muon (majority of weights) + AdamW (embeddings/head/norm)

"Active parameters" is the number that governs latency and inference cost — it's the real point of comparison against a dense model, not total parameters.

4Attention: Full O(n²) vs. Compressed-Sparse

2017: Attention(Q,K,V) = softmax(QKᵀ/√d)V — every query scores every key. Cost scales as O(n²·d). At n=512 that's ~262K pairwise scores per head; nobody trained past a few thousand tokens because the cost curve makes it impractical.

2026: CSA first compresses every m=4 raw KV tokens into 1 entry, then a lightning indexer picks the top k=512 compressed entries per query for full attention; a 128-token sliding window covers local detail. HCA compresses even harder (m'=128) and runs dense attention over what's left. Cost approaches O(n·k) — flat instead of exploding.
Attention cost Context length → O(n²) — full attention O(n·k) — CSA/HCA n=512 (2017 ceiling) n=1M, dense would be untrainable
Illustrative growth curves, not to scale — the point is shape, not the exact exponent.

Net effect for V4 Flash at 1M-token context: 10% of the single-token inference FLOPs and 7% of the KV-cache footprint of DeepSeek's own prior generation (V3.2) — a same-lab, same-architecture-family baseline, not the 2017 Transformer. (V4-Pro, the larger sibling model, posts 27% FLOPs / 10% KV-cache on the same comparison — a different model, not this one.)

5The Residual Stream: 1 Path vs. 4

2017 — Add & Norm
  • Each sub-layer's output is added straight back onto a single running residual stream
  • One channel carries everything from layer 1 to layer 12 — simple, but a bottleneck as networks get deep
  • LayerNorm applied after the addition, stabilizing scale layer by layer
2026 — Manifold-Constrained Hyper-Connections (mHC)
  • Residual stream widened to 4 parallel channels (n_hc = 4) instead of 1
  • The matrix that mixes the 4 channels is constrained to be doubly stochastic (Birkhoff polytope) via 20 Sinkhorn-Knopp iterations — every row and column sums to 1
  • Lets a 43-layer, trillion-token-trained network keep gradients stable where a single stream would degrade

6Training: Then vs. Now

DimensionOriginal Transformer (base)DeepSeek V4 Flash
Training data~4.5M sentence pairs (WMT'14 En-De)32 trillion tokens — web, code, math, long documents, multilingual
Tokens processed~5B (100,000 steps × ~25K tokens/batch)32,000,000,000,000
Hardware8× NVIDIA P100 GPUsMulti-thousand-GPU cluster (undisclosed exact count)
Training time12 hours (base model)Not disclosed publicly
Est. training compute~3.3×10¹⁸ FLOPs (paper's own figure)~2.5×10²⁴ FLOPs (6·N_active·D estimate)
License / distributionResearch paper, no released weightsOpen weights, MIT license, Hugging Face + API
Inference pricingN/A — not a served product$0.22 / $0.66 per M tokens (in/out, off-peak)

The compute estimate uses the standard 6·N·D approximation (6 × active params × training tokens) — a rough order-of-magnitude, not a disclosed figure. Even generously discounted, it lands north of 100 million times the original's training compute.

7A Token's Path Through One V4 Flash Layer

01
Compress KV
CSA: 4 tokens → 1 entry. HCA: 128 → 1
02
Lightning Indexer
Scores compressed entries, top-k=512 selected
03
Sparse Attention
+128-tok sliding window for local detail
04
mHC Mix
4 residual streams blended, doubly-stochastic
05
MoE Route
Router picks 6 of 256 experts + 1 shared
Compare to 2017: a token entered a layer, attended densely to every other token in the sequence, passed through one dense FFN, and got added back to a single residual stream. Five extra decision points, four of them new inventions since V3, are what make 1M-token context economically servable rather than a research curiosity.
1

Total parameters is the wrong headline number for a MoE model. 284B total but only ~13B active means V4 Flash costs closer to a 13B dense model to run, and needs closer to a 284B model's worth of memory to host.

2

The attention mechanism from 2017 didn't survive intact. MLA, then CSA/HCA, replaced full dot-product attention specifically because O(n²) makes long context economically impossible, not just slow.

3

Almost every number moved in the same direction: bigger, sparser, and more compressed simultaneously. V4 Flash is both far larger than the original Transformer and, per active token, far more parameter-efficient than a dense model its total size would suggest.

4

What didn't change: it's still stacked self-attention + feed-forward blocks with residual connections, exactly as the 2017 paper specified. Every 2026 innovation here is an engineering layer added on top of, not a replacement for, that core idea.