Skip to visualization
visualization / KV Cache

MinGPT Visualizer

Interactive LLM Explorer
i
i
i
i
i
i
i
i
i
Embed
Attention
MLP
Norm
Output
Cache
Click any highlighted line of code on the left
to see the corresponding transformer operation here.

🔍 Variable Inspector

click any code line
Click any line of code to inspect its variables, shapes, and meanings.

Click a code line or diagram node to inspect

About this lesson
Quick answer

What KV Cache explains

Reuse previously computed keys and values during autoregressive decoding instead of recomputing the past.

Key concepts

Primary research

Fast Transformer Decoding · Shazeer