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:

ComponentProblemThe change
RoPEPosition information breaks down beyond the trained lengthInstead of adding a position vector, rotate Q/K so relative distance shows up in the dot product
Sliding Window AttentionAttention cost grows quadratically with lengthLook only at nearby tokens; stacked layers widen the receptive field
GQAThe KV cache eats memory bandwidth during decodingMany query heads share a few KV heads
RMSNormLayerNorm's re-centering is extra workSkip mean subtraction and just rescale by RMS
SwiGLUA plain GELU FFN has limited expressivenessA gated, 3-matrix FFN (compared at matched parameter counts)
MoEBigger models cost more to runActivate only a few experts per token (total params ≠ active params)
KV CacheEvery new token recomputes the whole prefixStore past K/V: O(N²) → O(N), with exactly the same output
Speculative DecodingBig models generate one token at a time, slowlyA 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:

  1. Follow GPT-2 end to end. Tokenizer → embeddings → attention → FFN → logits → sampling → the autoregressive loop. Watch one token get produced.
  2. Swap components one at a time. Ask "what changes if I replace this?"
  3. 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.

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/

3D view of GPT-2’s forward pass, from BPE tokenization and embeddings through self-attention, the feed-forward network, and next-token sampling.

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

PartTopicWhat you'll see
IGPT-2 3D forward passAn 8-stage journey of a single token
IIRoPE, Sliding WindowA 2D rotary plane; receptive fields that grow with depth
IIIMHA / MQA / GQAKV head grouping and cache-size comparison
IVRMSNorm, SwiGLU, MoEActivation shifts, gating curves, Top-K routing
VKV Cache, Speculative DecodingRecompute vs. stored cache; draft → verify animation
VIModern LLM in 3DAn 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