Most of us use ChatGPT-style tools every day, yet "what is actually different between GPT-2 and a modern LLM?" is surprisingly hard to answer. The paper names look familiar, but RoPE, GQA, SwiGLU and MoE tend to float around as unrelated acronyms.
I think they are one story: the 2019 Transformer hit a practical wall, and one component at a time was swapped out to get past it. This post walks through that story, and then recommends an interactive page where you can see it for yourself.
The core idea: modern LLMs are accumulated answers to specific problems
Modern LLM architecture didn't appear all at once. Here is what problem each component was answering:
| Component | Problem | The change |
|---|---|---|
| RoPE | Position information breaks down beyond the trained length | Instead of adding a position vector, rotate Q/K so relative distance shows up in the dot product |
| Sliding Window Attention | Attention cost grows quadratically with length | Look only at nearby tokens; stacked layers widen the receptive field |
| GQA | The KV cache eats memory bandwidth during decoding | Many query heads share a few KV heads |
| RMSNorm | LayerNorm's re-centering is extra work | Skip mean subtraction and just rescale by RMS |
| SwiGLU | A plain GELU FFN has limited expressiveness | A gated, 3-matrix FFN (compared at matched parameter counts) |
| MoE | Bigger models cost more to run | Activate only a few experts per token (total params ≠ active params) |
| KV Cache | Every new token recomputes the whole prefix | Store past K/V: O(N²) → O(N), with exactly the same output |
| Speculative Decoding | Big models generate one token at a time, slowly | A small model drafts, the big model verifies in one parallel pass |
Notice the pattern: most of these changes aren't about being "smarter." They are about longer context, lower cost, and faster inference. The skeleton (attention + FFN + residual connections) is nearly the same as in 2019. What changed is how we route around bottlenecks.
Seeing beats memorizing
Reading equations leaves questions like:
- What does "the dot product depends only on relative offset" actually mean in RoPE?
- By how much does GQA really shrink the KV cache?
- Which experts does an MoE router pick for each token?
These tend to click the moment you see them. Here is the order I'd suggest:
- Follow GPT-2 end to end. Tokenizer → embeddings → attention → FFN → logits → sampling → the autoregressive loop. Watch one token get produced.
- Swap components one at a time. Ask "what changes if I replace this?"
- Put it all together. Walk through a modern sparse MoE pipeline stage by stage (BPE → token embedding → pre-RMSNorm → RoPE + GQA + KV cache → sparse SwiGLU MoE → speculative decoding), with a GPT-2 diff at every step.
Recommended: Inside LLM 3D
Inside LLM 3D is an interactive 3D learning site that follows exactly this path, right in your browser.
👉 https://jiminelee.github.io/inside-llm-3d/

Why I trust it:
- It uses real model values. Not made-up illustration numbers: the visualizations use precomputed activations from real GPT-2 Small (124M) and Qwen2.5-0.5B.
- It verifies the mechanics. The architecture simulations and the landmark model comparison table are verified. For instance, you can confirm that logits are identical with or without a KV cache, or compare FFN variants at matched parameter counts.
A quick tour
| Part | Topic | What you'll see |
|---|---|---|
| I | GPT-2 3D forward pass | An 8-stage journey of a single token |
| II | RoPE, Sliding Window | A 2D rotary plane; receptive fields that grow with depth |
| III | MHA / MQA / GQA | KV head grouping and cache-size comparison |
| IV | RMSNorm, SwiGLU, MoE | Activation shifts, gating curves, Top-K routing |
| V | KV Cache, Speculative Decoding | Recompute vs. stored cache; draft → verify animation |
| VI | Modern LLM in 3D | An 8-stage modern sparse MoE pipeline with stage-by-stage GPT-2 diffs, plus a landmark model comparison table (GPT-2 through Qwen3, Llama 4, DeepSeek-V3.2 and Gemma 4) |
If you're new, start with Part I. If you already know the Transformer, jump straight to whatever you're curious about (say, GQA in Part III). Each chapter has its own URL (e.g. #/part-3/gqa), so it's easy to share.
Closing thoughts
If you treat LLM architecture as a list of acronyms to memorize, it fades fast. If you treat it as "what was the bottleneck, and what did we change?", you can read a new model's spec sheet and see where it differs. I hope this page helps build that intuition.
👉 https://jiminelee.github.io/inside-llm-3d/
Source code and the activation-extraction scripts are on GitHub: https://github.com/jiminelee/inside-llm-3d