← Plasmient Labs
Code Walk F · layer 02deep dive · architecture

Modern architecture
the 2017 block, upgraded

Layer 02 of the Frontier Stack, gone deep. The attention core from Walk 02·A never changed — but every part around it was replaced for speed and scale, and the biggest models became sparse. This walk is the diff: RoPE, RMSNorm, SwiGLU, grouped-query / latent attention, and mixture-of-experts. Three interactive pieces — the whole block diff, the KV-cache that grouped attention shrinks, and the sparse router where the word “utilization” stops meaning anything.

  • the coreattention — unchanged since 2017
  • everything elseRoPE · RMSNorm · SwiGLU · GQA · MoE
  • the patternnearly every upgrade is a memory story
  • the open oneDeepSeek-V3 — 671B params, 37B active

00 Same core, new everything

The attention operation at the heart of a Transformer is exactly what Vaswani et al. published in 2017 — query · key, softmax, weighted sum of values. That part didn’t change. What changed is everything wrapped around it. A 2025 frontier block keeps the same skeleton (attention → add → norm → feed-forward → add → norm) but swaps in a better part at nearly every slot, and the very largest models replace the single feed-forward with a sparse mixture of experts.

Here is the whole diff. Each row is one upgrade the frontier made — the old part struck through, the new part named. Click any row for what changed, and for the point that ties this entire layer together:almost every one of these is a memory or bandwidth win, not an arithmetic one.

The 2017 block → the modern block. Click an upgrade to see what it replaced, why it’s the win, the open models that use it, and a before→after sketch. Struck-through = the original; green = the frontier default.
2017 · Vaswani et al.──▶2025 · the frontier

Of the five upgrades, RoPE is the one that’s clearest in motion. On the static sketch above it’s just two dials; play it and the whole idea lands — watch position become rotation, and watchrelative position fall out of the dot product on its own:

RoPE, in motion. Left: each token’s query vector is the same base vector turned by angle = p·θ — position becomes rotation, at many frequencies at once. Right: slide both tokens up together and their score never moves, because the dot product sees only the gap d = j − i. That’s a generalization win: relative position for free means context can stretch far past the trained length — and cheap long context means a bigger KV cache, the exact memory pressure the rest of this page (and layer 05) is about.
relative distance  d = j − i+3Play, then watch the right panel: both tokens spin, but the gap — and the score — never move.
relative distance d
the only thing the dot product can see
attention score ⟨q·k⟩
a function of d alone — absolute position i, j cancel

Two of these are big enough to deserve their own instrument, because they’re where the plasmient thesis lives most sharply: grouped-query attention (a pure inference-memory win) and mixture-of-experts(where “GPU utilization” quietly loses its meaning). The next two sections let you poke each one.

01 The tensor that fills the GPU: the KV cache

At generation time a model doesn’t recompute attention over the whole sequence each step — itcaches the key and value vectors of every past token and reuses them. That KV cache is, physically, what fills the GPU’s memory during inference: one key and one value, per token, per layer, per KV head. It grows with context length and batch size, and when it’s full, you’re done — no more concurrent requests, no more context.

This is why grouped-query and latent attention matter so much. They don’t touch the math of attention; they shrink the cache. Switch the scheme below and watch the bytes-per-token — and the context you can afford in a fixed 40 GB budget — move:

Fixed model, four attention schemes. MHA gives every query head its own KV head (biggest cache); GQA shares them in groups; MQA collapses to one; MLA stores a compressed latent instead. Watch the cache shrink and the affordable context grow — that’s the whole reason the frontier moved off MHA.
model: 32 layers · 32 query heads · head-dim 128 · fp16 · KV budget 40 GB
KV cache per token

The dramatic part is the context readout. Cutting the cache 4× doesn’t make attention 4× faster — it lets you fit 4× more tokens or 4× more concurrent users on the same card. Decode ismemory-bound: the GPU spends its time streaming that cache in and out, not doing arithmetic. Shrink the cache and you turn a half-starved serving node into a full one. This is the utilization gap, made of one tensor.

02 Where “utilization” stops meaning anything: MoE

The other big change is structural. Instead of one large feed-forward that every token passes through, a mixture-of-experts model has many expert feed-forwards plus a router that sends each token to only its top-k. Total parameters explode — DeepSeek-V3 has 671 billion — while the compute per token stays tiny, because only k of N experts ever fire. You get a giant model’s knowledge at a small model’s FLOPs.

Watch a stream of tokens route. Turn the expert count up to 256 and keep top-k at 2, and look at the two gauges: the GPU is genuinely busy on the experts it touches — so nvidia-smi reads nearly full — while the fraction of the model actually doing work is a rounding error:

Sparse mixture-of-experts routing. Each token goes to only its top-k experts; the rest sit dark. The left gauge is what a monitoring dashboard sees; the right is what’s actually working. Crank experts to 256, top-k to 2, and the gap is the whole argument.
top-kexperts
nvidia-smi says
the SMs it touches really are busy
active parameters
only k of N experts fired this token

That gap is not a bug — sparsity is the point, and it’s why open models caught the frontier. But itbreaks the metric. If a token touches 2 of 256 experts, what is “GPU utilization”? An expert that barely fires is capacity you paid for and left idle; a hot, overloaded expert is a bottleneck throttling the batch. A single averaged percentage can’t see either. Only a per-expert, per-token view tells the truth — and nothing on the market draws it.

03 The modern block, assembled

Put every upgrade back in place and the frontier decoder block looks like this — the same 2017 skeleton, every slot re-fitted, the feed-forward optionally gone sparse:

          token + RoPE-rotated positions
                        │
      ┌─────────────────▼──────────────────┐
      │  RMSNorm                            │   ← was LayerNorm
      │  Grouped-Query / Latent Attention   │   ← was full multi-head  (shrinks the KV cache)
      └─────────────────┬──────────────────┘
                        ▼   ⊕ residual
      ┌─────────────────▼──────────────────┐
      │  RMSNorm                            │
      │  ┌───────── router (top-k) ───────┐ │   ← dense FFN became…
      │  │ SwiGLU  SwiGLU  SwiGLU   …×N   │ │   … a sparse Mixture-of-Experts
      │  └────────────────────────────────┘ │      (only k of N fire per token)
      └─────────────────┬──────────────────┘
                        ▼   ⊕ residual
                   next block ( ×  ~ 60–120 )

DeepSeek-V3 is the open model that ships all of it at frontier scale — MLA for the attention, fine-grained MoE (256 experts, 8 active) for the feed-forward, RoPE, RMSNorm, SwiGLU throughout — and its technical report writes the recipe down. Llama 3 and Qwen 2.5 are the dense reference implementations. None of it is secret; the gap to the frontier is data and compute, not architecture.

the one-line summary of this whole layerAttention didn’t get faster; everything around it got cheaper in memory. RoPE unlocks long context, RMSNorm trims bandwidth, GQA/MLA shrink the KV cache, MoE decouples capacity from compute. The frontier’s progress since 2017 is, overwhelmingly, a memory-and-bandwidth story — which is precisely the axis that nvidia-smi cannot see.

04 Why an observability company cares

the plasmient thread

Read the upgrades as a list and one thing jumps out: they are almost all memory moves. RMSNorm is a bandwidth-bound op that barely touches the tensor cores. The KV cache is the tensor that caps your batch size. MoE means most of the weights are resident but idle for any given token. Every one of these is a place where the GPU can look busy while the useful work — the achieved fraction of peak — is far lower.

That is the entire thesis, and this layer is where it compounds. TheFrontier Stack stacks these blocks by the dozen and serves them to millions; the attention deep-dive is the core they wrap; therequest lifecycle is one of them answering a prompt. Across all of it, Plasmient is the instrument that joins kernel → expert → op → model → cluster and tells you which of that busy silicon was actually working.

Full references — go to the source

The primary papers for each upgrade, then the open models that ship all of them together. DeepSeek-V3’s report is the single best read: it’s the frontier recipe, written down.