KV CACHE DEBUGGERmemory · attention-work · autoregressive inference
MHA

Configuration

1.00×
This tool models KV-cache memory and attention-score multiplications only. It does not simulate full transformer runtime, MLP, projections, softmax, memory transfer, or sampling.

Prefill & Decode Timeline

KV-Cache Shape

Charts

KV-cache memory vs sequence length
Per-step attention work ━━ cached━━ uncached
Cumulative attention work ━━ cached━━ uncached

Memory

KV caching reduces repeated compute but consumes additional memory. It never reduces KV-cache memory.

Attention-Work Comparison

Explanation

MHA vs GQA vs MQA

Holds all parameters constant except KV-head count. Attention work is unchanged; memory scales with KV heads.