REFERENCE
GLOSSARY
97 terms from across all eleven levels, each linked back to where it is explained.
acceptance rate (alpha)
LEVEL 08
LEVEL 08
Probability a drafted token survives verification. Equals sum min(p, q), i.e. 1 minus the total variation distance between draft and target.
achieved bandwidth
LEVEL 04
LEVEL 04
The fraction of peak HBM bandwidth a real kernel reaches. Typically 70-85%.
admission control
LEVEL 05
LEVEL 05
Deciding how many sequences to admit given that their eventual lengths, and therefore memory needs, are unknown.
all-reduce
LEVEL 09
LEVEL 09
Collective that sums a tensor across all GPUs and returns the result to all. Ring implementation moves 2(N-1)/N of the data per GPU.
arithmetic intensity
LEVEL 01
LEVEL 01
FLOPs performed per byte moved from memory. Compare it against the hardware ratio to find your bottleneck.
attention hybrid
LEVEL 07
LEVEL 07
A stack mixing mostly SSM or linear-attention layers with a few full-attention layers, trading some memory saving for exact recall.
attention sink
LEVEL 06
LEVEL 06
The first few tokens of a sequence, which receive large attention weight regardless of content. Keeping them enables indefinite streaming.
AWQ
LEVEL 06
LEVEL 06
Activation-aware weight quantization: scale up the ~1% of channels identified as salient from activation magnitude, then quantize.
batch invariance
LEVEL 03
LEVEL 03
The property that a kernel produces bit-identical results regardless of batch composition. Required for true determinism; costs performance.
block table
LEVEL 06
LEVEL 06
Per-sequence map from logical token positions to physical KV cache blocks. What allows non-contiguous allocation.
bonus token
LEVEL 08
LEVEL 08
The extra token available when all gamma drafts are accepted, since the verification pass already computed p at the final position.
bytes per token
LEVEL 02
LEVEL 02
2 x n_layers x n_kv_heads x head_dim x dtype_bytes. The most useful derived number in inference planning.
capacity factor
LEVEL 09
LEVEL 09
A cap on tokens routed to any single MoE expert, bounding load imbalance at the cost of dropping or rerouting overflow.
chunked prefill
LEVEL 05
LEVEL 05
Splitting a long prefill into fixed-size pieces processed one per iteration, mixed with ongoing decode.
closed-loop load
LEVEL 10
LEVEL 10
Fixed concurrency; a new request is sent only when one finishes. Self-throttling, so it hides the capacity cliff.
column-parallel / row-parallel
LEVEL 09
LEVEL 09
Megatron's arrangement: split the first matmul by columns and the second by rows, so the nonlinearity between them needs no communication.
constrained decoding
LEVEL 03
LEVEL 03
Masking logits each step so only tokens consistent with a grammar or schema can be sampled.
continuous batching
LEVEL 05
LEVEL 05
Iteration-level scheduling: evict finished sequences and admit waiting ones at every decode step. From Orca.
copy-on-write
LEVEL 06
LEVEL 06
Sequences sharing a prefix point at the same physical blocks; a block is duplicated only when one of them writes to it.
crossover point
LEVEL 02
LEVEL 02
The number of cached tokens in flight at which KV traffic overtakes weight traffic. About 114k tokens for Llama-3-8B at fp16.
CUDA Graph
LEVEL 01
LEVEL 01
A captured, replayable sequence of kernel launches. Removes per-launch CPU overhead, which is significant when a decode step is hundreds of tiny kernels.
decode
LEVEL 01
LEVEL 01
The per-token forward passes that follow prefill, one position at a time. Memory-bound; sets TPOT.
degeneration
LEVEL 03
LEVEL 03
The repetitive-loop failure mode of likelihood-maximizing decoders. Named and diagnosed by Holtzman et al.
dense vs sparse FLOPs
LEVEL 04
LEVEL 04
Vendors quote 2:4 structured sparsity figures that are double the dense number. Production LLMs use dense.
disaggregation
LEVEL 09
LEVEL 09
Running prefill and decode on separate machine pools, transferring the KV cache between them.
draft model
LEVEL 08
LEVEL 08
A small, cheap model that proposes candidate tokens for the target model to verify.
EAGLE
LEVEL 08
LEVEL 08
Self-speculation by autoregressing over the target's hidden features rather than tokens. The strongest general method.
expert parallelism (EP)
LEVEL 09
LEVEL 09
Distributing MoE experts across GPUs. Requires all-to-all routing and suffers from load imbalance.
external fragmentation
LEVEL 02
LEVEL 02
Free memory that exists but is broken into pieces too small to satisfy a contiguous allocation.
FlashAttention
LEVEL 07
LEVEL 07
Tiled exact attention that never materializes the N x N score matrix in HBM. Cuts HBM accesses to O(N^2 d^2 / M).
FlashDecoding
LEVEL 07
LEVEL 07
Decode-phase attention that parallelizes along the KV dimension (split-K) because query-length-1 offers no query parallelism.
frequency penalty
LEVEL 03
LEVEL 03
Subtracts a term proportional to how many times a token has appeared. Additive in logit space, better behaved than division.
gamma
LEVEL 08
LEVEL 08
Draft length: how many tokens are proposed before each verification pass.
goodput
LEVEL 04
LEVEL 04
Throughput counting only requests that met their latency SLO. The metric that matches what you are actually selling.
GPTQ
LEVEL 06
LEVEL 06
Post-training weight quantization using approximate second-order information, layer by layer. Works to 3-4 bits.
GQA
LEVEL 00
LEVEL 00
Grouped-query attention. Fewer K/V heads than Q heads, with each K/V head shared by a group of query heads. Shrinks the KV cache proportionally.
head_dim
LEVEL 00
LEVEL 00
The width of one attention head. Usually d_model / n_heads, though it can be set independently.
hidden state
LEVEL 00
LEVEL 00
One d_model-length slice of the residual stream, at one position and one layer.
internal fragmentation
LEVEL 02
LEVEL 02
Memory reserved inside a sequence allocation that the sequence never uses. The dominant waste in naive allocators.
kernel fusion
LEVEL 07
LEVEL 07
Combining adjacent operations into one kernel so intermediates never round-trip to HBM.
knee
LEVEL 05
LEVEL 05
The batch size beyond which throughput gains become small relative to the latency cost. The right default operating point.
KV cache
LEVEL 02
LEVEL 02
The stored key and value tensors for all previous positions, kept so they are not recomputed each step. Per-sequence, and it grows with every token.
linear attention
LEVEL 07
LEVEL 07
Replacing softmax with a kernel feature map so attention can be reassociated into O(N d^2). Constant state, weaker exact recall.
Little's Law
LEVEL 01
LEVEL 01
concurrency = arrival rate x latency. Tells you how many requests must be in flight to hit a throughput target.
llama.cpp
LEVEL 10
LEVEL 10
Local-inference engine optimized for the weight-dominated regime: aggressive weight quantization, CPU and partial-offload support.
logits
LEVEL 00
LEVEL 00
The unnormalized [.., vocab_size] scores produced by the LM head, before any softmax or sampling.
Medusa
LEVEL 08
LEVEL 08
Self-speculation with multiple independent decoding heads predicting several positions ahead, verified as a tree.
min-p
LEVEL 03
LEVEL 03
Keep tokens with probability at least min_p times the top token's probability. Fixed ratio, adaptive to confidence.
MLA
LEVEL 06
LEVEL 06
Multi-head latent attention. Compresses K and V into a shared low-rank latent per token; the up-projections are absorbed into neighbouring matrices.
modified rejection sampling
LEVEL 08
LEVEL 08
Accept with probability min(1, p/q); on rejection sample from normalized max(0, p - q). Provably yields p.
MQA
LEVEL 02
LEVEL 02
Multi-query attention: a single KV head shared by all query heads. Maximum cache savings, largest quality cost.
n-gram lookup
LEVEL 08
LEVEL 08
Drafting by searching the context for the current suffix and proposing what followed it. Free, and excellent on repetitive text.
NVLink
LEVEL 09
LEVEL 09
High-bandwidth GPU-to-GPU interconnect, ~900 GB/s on H100. Roughly 14x faster than PCIe Gen5.
online softmax
LEVEL 07
LEVEL 07
Computing softmax incrementally with a running max and sum, rescaling earlier partials when a larger value appears. Exact, not approximate.
open-loop load
LEVEL 10
LEVEL 10
Arrivals follow an external schedule (usually Poisson) regardless of server state. The only way to observe overload.
PagedAttention
LEVEL 06
LEVEL 06
Fixed-size block allocation for the KV cache with per-sequence block tables, borrowed from OS virtual memory. Cuts fragmentation waste from 60-80% to under 4%.
per-channel quantization
LEVEL 06
LEVEL 06
A separate scale for each channel of a tensor. Necessary for keys, which have strong per-channel outliers.
pipeline bubble
LEVEL 09
LEVEL 09
Idle stage time while the pipeline fills and drains. Fraction is (N-1)/(M+N-1) for M microbatches and N stages.
pipeline parallelism (PP)
LEVEL 09
LEVEL 09
Assigning different layers to different GPUs. One activation hand-off per stage boundary. Tolerates slow links.
pre-norm
LEVEL 00
LEVEL 00
Normalizing the input to each block rather than its output, leaving the residual path unbroken. Required in practice for deep transformers.
preemption
LEVEL 05
LEVEL 05
Reclaiming a running sequence's KV memory, either by swapping it to host memory or discarding and recomputing it.
prefill
LEVEL 01
LEVEL 01
The forward pass over the entire prompt, done in one shot. Compute-bound; sets TTFT.
prefill/decode interference
LEVEL 05
LEVEL 05
A long compute-bound prefill blocking every decoding sequence, spiking their inter-token latency.
prefix caching
LEVEL 02
LEVEL 02
Reusing cached KV state across requests that share a leading token sequence. Exact, not approximate.
RadixAttention
LEVEL 02
LEVEL 02
SGLang's radix-tree index over cached prefixes, enabling automatic longest-prefix reuse across arbitrary sharing patterns.
reasoning workload
LEVEL 10
LEVEL 10
Requests that generate thousands of hidden chain-of-thought tokens, shifting nearly all wall-clock into memory-bound decode.
repetition penalty
LEVEL 03
LEVEL 03
Divides logits of already-seen tokens by r > 1. Blunt, and harmful for code and structured output.
residual distribution
LEVEL 08
LEVEL 08
The normalized positive part of p - q. The mass the target wanted that the draft undersupplied.
residual stream
LEVEL 00
LEVEL 00
The [batch, seq, d_model] tensor that every block reads from and adds back into. Its width is constant through the network.
ridge point
LEVEL 01
LEVEL 01
The arithmetic intensity at which a machine transitions from memory-bound to compute-bound. About 295 FLOP/byte for an H100.
RMSNorm
LEVEL 00
LEVEL 00
Normalization by root-mean-square only, with no mean subtraction and no bias. Cheaper than LayerNorm and works as well.
roofline model
LEVEL 04
LEVEL 04
attainable = min(peak FLOP/s, intensity x bandwidth). A two-line model that identifies your bottleneck.
RoPE
LEVEL 00
LEVEL 00
Rotary position embedding. Rotates Q and K by an angle proportional to absolute position so their dot product depends only on relative distance.
RULER
LEVEL 06
LEVEL 06
A long-context benchmark testing multi-needle retrieval, aggregation and tracing. Far more informative than perplexity for evaluating KV compression.
selective batching
LEVEL 05
LEVEL 05
Batch the position-independent operations across sequences while handling attention per-sequence. What makes continuous batching implementable.
self-speculation
LEVEL 08
LEVEL 08
Generating drafts from the target model itself via extra heads or a small feature-level head, avoiding a separate draft model.
sequence / context parallelism
LEVEL 09
LEVEL 09
Splitting the sequence dimension across devices, as in Ring Attention. Used when one sequence exceeds a single GPU.
SGLang
LEVEL 10
LEVEL 10
Serving engine organized around structured, prefix-sharing workloads: RadixAttention plus a frontend programming language.
shared memory / SRAM
LEVEL 07
LEVEL 07
On-chip memory, ~228 KB per SM on Hopper, with roughly 6x the bandwidth of HBM. The tier FlashAttention keeps its tiles in.
SmoothQuant
LEVEL 06
LEVEL 06
Migrates activation outliers into the weights via per-channel scaling, enabling int8 for both operands.
split-K
LEVEL 07
LEVEL 07
Partitioning a reduction across parallel workers and combining their partial results afterward.
SSM
LEVEL 07
LEVEL 07
State space model. Maintains a fixed-size recurrent state, so there is no KV cache; Mamba is the leading example.
static batching
LEVEL 05
LEVEL 05
Fixed batch that runs to completion. Utilization collapses when sequence lengths vary, and gets worse as batch grows.
SwiGLU
LEVEL 00
LEVEL 00
The gated feed-forward block used by Llama-family models: down(silu(gate(x)) * up(x)). Three weight matrices instead of two.
teacher forcing
LEVEL 00
LEVEL 00
Training on the known target sequence so all positions are computed in one parallel pass. The reason training is far more hardware-efficient than generation.
temperature
LEVEL 03
LEVEL 03
Divisor applied to logits before softmax. Below 1 sharpens, above 1 flattens.
tensor parallelism (TP)
LEVEL 09
LEVEL 09
Splitting weight matrices within a layer across GPUs. Two all-reduces per transformer layer. Needs NVLink.
TensorRT-LLM
LEVEL 10
LEVEL 10
NVIDIA serving engine that compiles a model into a hardware-specific engine ahead of time. Fastest and least flexible.
token budget
LEVEL 05
LEVEL 05
The cap on tokens processed per scheduler iteration. Decode tokens are admitted first, prefill chunks fill the rest.
top-k
LEVEL 03
LEVEL 03
Keep the k highest-probability tokens. Fixed count, does not adapt to the distribution.
top-p / nucleus
LEVEL 03
LEVEL 03
Keep the smallest set whose cumulative probability reaches p. Fixed mass, adaptive count.
TPOT / ITL
LEVEL 01
LEVEL 01
Time per output token / inter-token latency. The gap between successive tokens once streaming starts.
tree attention
LEVEL 08
LEVEL 08
Verifying many candidate continuations in one pass using a mask where each node attends only to its ancestors.
TTFT
LEVEL 01
LEVEL 01
Time to first token. How long the user waits before anything appears.
vLLM
LEVEL 10
LEVEL 10
Serving engine organized around memory management: PagedAttention, continuous batching, broad model support.
warp specialization
LEVEL 07
LEVEL 07
Assigning different warps within a block to different roles (producer/consumer) so data movement overlaps computation. Central to FlashAttention-3.
workspace
LEVEL 02
LEVEL 02
GPU memory reserved for activations, temporary buffers, and communication. Typically 10-20 GB, and easy to forget when budgeting.