Pidoku
Glossary
On this page

Glossary

Blunt definitions. Where a term is commonly misunderstood, the misunderstanding is called out. Format: Term (module or lesson where it is taught) — definition. Labels such as 4.c mean module 4, lesson c.


A#

Activation (modules 1–2, 10) — the numeric output of a layer, computed at runtime from the input. Unlike weights, activations are not stored in the model file; they exist only during a forward pass. Memory for activations scales with batch size and sequence length; memory for weights does not.

Activation quantization (module 13) — quantizing the runtime tensors, not just weights. Harder than weight quantization because activations have outliers that vary per input.

Admission control (module 20) — deciding to reject or defer a request before it enters the system, to protect the requests already inside. The opposite of “accept everything and hope.”

AllGather (module 14) — a collective where every rank ends up with the concatenation of all ranks’ data. Used in tensor parallelism when each GPU computes a slice of an output that all GPUs then need.

AllReduce (module 14) — a collective where every rank ends up with the elementwise sum (or other reduction) of all ranks’ data. The dominant communication primitive in tensor-parallel inference.

APC (17.f) — Automatic prefix caching.

API server (16.d) — The process that handles HTTP, templates, tokenising and detokenising.

Argmax-invariant (18.e) — A logits transformation that cannot change which token scores highest.

Arithmetic intensity (modules 1–2, 22) — FLOPs performed per byte moved from memory. The single most useful number in inference performance. Low intensity = memory bound. Written as FLOP/byte.

AsyncLLM (16.f) — The engine as seen from an asyncio program; what the server uses.

Async scheduling (17.d) — Scheduling step N+1 while step N is still on the GPU.

Attention (modules 10, 11, 12) — the transformer operation where each token computes a weighted average over other tokens’ values, with weights derived from query·key similarity.

Attention backend (18.c) — A kernel implementation that can read a paged KV cache, chosen at startup.

Autoregressive (module 12) — generating output one token at a time, where each token depends on all previously generated tokens. This serial dependency is the reason LLM decode is hard to make fast.

AWQ (Activation-aware Weight Quantization) (module 13) — a weight-only quantization method that protects the small fraction of weight channels that matter most, identified by activation magnitude.


B#

Backpressure (module 20) — signalling upstream that you are overloaded so it slows down, instead of silently queueing forever. Usually implemented as bounded queues + rejection.

Bandwidth (memory) (modules 1–2, 4–6) — bytes per second movable between memory and compute. HBM3e on an H200 is roughly 4.8 TB/s; DDR5 on a server CPU is roughly 0.3-0.5 TB/s. The difference is most of why GPUs win at inference.

Batch (modules 1–2, 12) — a group of requests processed together in one pass so that weights are loaded from memory once and amortized across all of them.

Batch queue (16.g) — Batches scheduled but not yet finished; size 2 with async scheduling.

BF16 (bfloat16) (module 10) — 16-bit float with FP32’s exponent range and fewer mantissa bits. Trades precision for range; the default for modern training and much inference.

Block (5.b) — A group of up to 1,024 threads that run on one SM and can share memory.

Block (CUDA) (modules 4–6) — a group of threads that run on one SM and can share shared memory and synchronize with each other.

Block hash (17.f) — A hash of a block’s tokens and its parent’s hash; identifies a whole prefix.

Block pool (17.e) — All KV blocks, the free queue and the hash-to-block map.

Block table (17.e) — A request’s ordered list of physical block IDs.

Busy loop (16.g) — The engine core’s main loop; never sleeps while requests exist.


C#

cache_salt (17.f) — A per-request value hashed into the first block to isolate tenants’ caches.

Cascade attention (18.c) — Computing attention over a prefix shared by all requests once.

Chat template (16.e) — A Jinja2 program that renders messages and tools into the model’s prompt format.

Chunked prefill (module 14) — splitting a long prompt’s prefill into pieces so it can be interleaved with decode steps, preventing one long prompt from stalling everyone else.

Closed-loop load (19.d) — A benchmark where a new request is sent only when one finishes; hides overload.

Coalescing (modules 4–6) — when the 32 threads of a warp access contiguous memory so the hardware services them with the minimum number of memory transactions. Uncoalesced access can cost 32x.

Cold start (modules 20, 23) — the time from “no replica exists” to “replica serves traffic.” For LLMs dominated by weight loading (tens of GB), not container start.

Collective (module 14) — a communication operation involving all ranks in a group: AllReduce, AllGather, ReduceScatter, Broadcast, All-to-All.

Collective RPC (18.a) — Calling a method on every worker and gathering results.

Compute-bound (6.a) — Limited by arithmetic rate, not memory traffic.

Constrained decoding (18.e) — Masking tokens a grammar forbids before sampling.

Context (21.d) — A process’s private state on a GPU.

Context length (module 12) — the maximum number of tokens (prompt + generation) a model can attend over. Directly sets the worst-case KV cache size per sequence.

Continuous batching (modules 12, 20) — a scheduler that adds and removes requests from the running batch at every decode step, instead of waiting for the whole batch to finish. Also called iteration-level scheduling or in-flight batching. The single biggest throughput win in modern LLM serving.

Copy-on-write (17.f) — Copying a shared, partly matching block into a private one before writing.

CUDA (2.h) — NVIDIA’s programming model and toolkit for general-purpose GPU computing.

CUDA core (modules 4–6) — a scalar ALU lane in an NVIDIA GPU. Not analogous to a CPU core; it is much closer to a single SIMD lane.

CUDA graph (modules 4–6, 13) — a recorded DAG of GPU operations replayed with one launch, eliminating per-kernel launch overhead. Critical for small-batch decode where kernels are microseconds long.


D#

Data parallelism (DP) (19.a) — Several complete engines behind one endpoint.

Decode (module 12) — the phase where the model generates tokens one at a time, each step processing exactly one new token per sequence. Memory-bandwidth bound at low batch size.

Deferred free (17.d) — Holding a finished request’s blocks until in-flight steps that may write them complete.

Detokenizer, incremental (16.f) — Converts token IDs to text step by step, emitting only complete characters.

Device (2.g) — The GPU and its memory, as opposed to the host.

Device plugin (21.c) — Kubernetes component that advertises GPUs to the kubelet.

Disaggregated serving (module 14) — running prefill and decode on separate GPU pools, moving the KV cache between them, so each pool can be sized and scheduled for its own bottleneck.

Disaggregation (P/D) (19.b) — Running prefill and decode on different instances.

Divergence (4.c, 6.c) — Threads of one warp taking different branches, forcing both paths to run.

DMA (Direct Memory Access) (module 3) — hardware moving data between memories without CPU involvement. How host↔device copies actually happen.

DP coordinator (19.a) — Process that balances load and aligns steps across data-parallel ranks.

Dynamic batching (module 20) — waiting a short window to gather multiple requests into one batch. Predates continuous batching; still correct for non-autoregressive models.


E#

ECC (4.g) — Error-correcting code protecting memory against bit flips.

Encoder cache (18.h) — Holds a vision or audio encoder’s output until the request has consumed it.

Engine core (16.d) — The process that runs the scheduler and KV cache manager.

EngineCoreRequest / EngineCoreOutput (16.d) — The msgpack messages between API server and engine core.

Eviction (17.e) — A cached block losing its hash when handed to a new owner; lazy in vLLM.

Executor (18.a) — Delivers one call to every worker of an engine.

Expert parallelism (EP) (module 14) — placing different MoE experts on different GPUs and routing tokens to them with All-to-All communication.


F#

FlashAttention (module 13) — an attention algorithm that never materializes the full N×N attention matrix in HBM, instead tiling and using online softmax in SRAM. IO-aware, exact (not an approximation).

Flat batch (18.b) — All scheduled tokens of all requests in one row, with index tensors instead of padding.

FLOP (modules 1–2) — one floating point operation. FLOPs = a count; FLOP/s = a rate. Confusing the two is the most common unit error in the field.

FP8 (modules 10, 13) — 8-bit float, in two common variants: E4M3 (more precision, less range, used for weights/activations) and E5M2 (more range, used for gradients). Natively supported from NVIDIA Hopper onward.

Fragmentation (modules 12, 22) — memory that is free but unusable because it is not contiguous in large enough pieces. The problem PagedAttention solves for KV cache.

Free queue (17.e) — Doubly linked list of unowned blocks; its order is the eviction policy.

Fusion (5.f) — Combining several operations into one kernel.


G#

Gap (16.c) — Tokens a request has minus tokens computed; what the scheduler closes.

GEMM (module 11) — GEneral Matrix Multiply, C = alpha*A*B + beta*C. The workhorse operation of prefill and of batched decode.

GEMM / GEMV (4.d) — Matrix-matrix / matrix-vector multiplication.

GEMV (module 11) — matrix-vector multiply. What decode at batch size 1 degenerates into. Hopeless arithmetic intensity — roughly 2 FLOPs per byte of weight read.

GPTQ (module 13) — a one-shot post-training weight quantization method using second-order (Hessian) information to choose rounding that minimizes layer output error.

GQA (Grouped-Query Attention) (module 14) — attention where several query heads share one key/value head. Shrinks KV cache by the grouping factor. Used by Llama 2 70B onward.

Grammar bitmask (18.e) — One bit per vocabulary token saying whether it is legal next.

Grid (modules 4–6) — the full set of thread blocks launched by one kernel.


H#

HBM (4.e) — High-bandwidth memory: stacked DRAM packaged beside the GPU.

HBM (High Bandwidth Memory) (modules 4–6) — the stacked DRAM on a GPU package. What people mean by “GPU memory” or “VRAM.” Fast (TB/s) but still ~100x slower than on-chip SRAM.

Head (module 10) — one independent attention computation. A model with 32 heads runs 32 attention computations in parallel over different learned projections.

Head-of-line blocking (17.a) — A waiting request that does not fit stops admission behind it.

Host (2.g) — The CPU and system RAM.


I#

InfiniBand (module 14) — a low-latency network fabric used between nodes in GPU clusters, typically with RDMA.

INT8 / INT4 (modules 10, 13) — integer quantization formats. INT8 is production-standard; INT4 weight-only is production-common for weight-bound decode; INT4 activations are still hard.

Inter-token latency (ITL) (modules 1–2, 12) — time between successive generated tokens. Also called TPOT (time per output token). Determines whether streaming output “feels” fast.


K#

Kernel (modules 11, 4–6) — a function that runs on the GPU. “Kernel launch” = the CPU telling the GPU to run one.

Kernel fusion (modules 11, 13) — combining several operations into one kernel so intermediate results stay in registers/SRAM instead of round-tripping to HBM.

KV cache (module 12) — the stored key and value tensors for all previous tokens, kept so that each new token does not recompute attention over the whole history. Turns O(n²) regeneration into O(n) per step, at the cost of memory that grows linearly with tokens and batch size.

KV cache group (17.i) — Layers with the same cache needs, sharing one block table per request.

KV cache spec (17.h) — A layer’s declaration of what its cache stores and how large a page is.

KV connector (19.b) — Plug-in that moves cached blocks to other tiers or machines.

KV events (19.b) — Published notices of blocks stored and removed, for cache-aware routers.


L#

Latency (modules 1–2) — time for one request. Always specify which latency: TTFT, ITL, or end-to-end.

Load balancing (modules 20, 21) — distributing requests across replicas. Naive round-robin is usually wrong for LLMs because request cost varies by 1000x and because prefix cache locality matters.

logits_indices (18.b) — Rows of the output that become next-token distributions: each request’s last.

Lookahead (17.g) — Extra cache slots reserved for a speculative proposer.

LoRA (18.g) — A low-rank correction to a base model, applied per request at run time.


M#

max_num_batched_tokens (17.b) — The token budget: most tokens processed in one step.

max_num_seqs (17.a) — Most requests running at once, per engine.

Memory-bound (4.e, 6.a) — Limited by memory bandwidth, not arithmetic.

MIG (21.d) — Multi-Instance GPU: hardware partitioning into isolated smaller GPUs.

Mixed precision (4.f) — Heavy arithmetic in low precision, sensitive steps in higher precision.

MLA (Multi-head Latent Attention) (module 14) — DeepSeek’s attention variant that stores a compressed latent KV representation, dramatically shrinking the KV cache.

Model runner (18.a) — Builds the batch, runs the model and samples, inside a worker.

MoE (Mixture of Experts) (module 14) — a model where each token is routed to a small subset of “expert” FFN blocks. Large total parameters, small active parameters per token.

MPS (21.d) — Multi-Process Service: lets several processes run kernels concurrently on one GPU.

MQA (Multi-Query Attention) (module 14) — all query heads share a single key/value head. The extreme of GQA; smallest KV cache, some quality cost.

MRV2 (18.a) — Model Runner V2: the newer runner with fixed rows and GPU-side input preparation.


N#

NCCL (module 14) — NVIDIA Collective Communications Library. The implementation of AllReduce and friends used by essentially every multi-GPU inference stack.

Null block (17.e) — Block 0; a placeholder never allocated or freed.

NUMA (module 3) — Non-Uniform Memory Access: on multi-socket servers, memory attached to another socket is slower. Matters for CPU-side tokenization, data loading, and pinned buffers.

num_computed_tokens (17.a) — Positions whose KV is computed or scheduled to be.

NVML (5.a, 6.d) — NVIDIA Management Library: read GPU state. go-nvml is the Go binding.


O#

Occupancy (modules 4–6) — the ratio of active warps on an SM to the maximum possible. High occupancy helps hide memory latency; it is a means, not a goal.

Offloading (19.b) — Copying cached blocks to CPU memory or disk to extend the prefix cache.

OOM (Out Of Memory) (module 22) — on GPUs, usually caused by KV cache growth or an unexpectedly long request, not by weights. Weights are predictable; KV cache is not.

Open-loop load (19.d) — A benchmark with arrivals at a fixed rate regardless of server state.

Operator fusion — see Kernel fusion.

Optimisation level (18.d) — -O0 to -O3: presets trading startup time for speed.

Output placeholder (17.d) — A scheduled position whose token ID is not known yet.


P#

PagedAttention (module 12) — vLLM’s technique of storing KV cache in fixed-size non-contiguous blocks with a block table, borrowing virtual-memory paging ideas. Eliminates KV fragmentation and enables cheap sharing/copy-on-write between sequences.

Page size (17.h) — Bytes one block occupies for one layer or group.

Parameter (modules 1–2, 10) — a learned number in the model. “7B parameters” = 7 billion learned numbers. Memory = parameters × bytes per parameter.

PCIe (modules 3, 14) — the bus connecting CPU and GPU (and sometimes GPU to GPU). Gen4 x16 ≈ 32 GB/s theoretical, ~25 GB/s real; Gen5 x16 ≈ 64 GB/s theoretical.

Persistent batch (18.a) — Per-request state kept between steps and updated by differences.

Piecewise compilation (18.d) — Splitting the model’s graph at attention calls so the rest can be recorded.

Pinned memory (5.d) — Page-locked host memory the GPU can read directly.

Pipeline parallelism (PP) (module 14) — splitting a model by layers across GPUs. Low communication, but introduces bubbles unless carefully scheduled with microbatches.

Placeholder token (18.h) — A token standing in for one vector of an image or audio clip.

Plugin (19.f) — Code discovered through Python entry points and loaded in every vLLM process.

Preemption (17.c) — Taking all of a running request’s blocks; it recomputes when re-admitted.

Prefill (module 12) — the phase that processes the entire input prompt in one pass to produce the first output token and populate the KV cache. Compute bound; parallel over all prompt tokens.

Prefix caching (modules 12, 21) — reusing the KV cache of a shared prompt prefix (system prompt, few-shot examples, document) across requests. Often the cheapest large win available.

prefix_match_unit (17.f) — Hashing granularity, which may be finer than the physical block.

PUE (7.l) — Facility power ÷ IT power.


Q#

QPS (modules 1–2) — queries per second. A poor headline metric for LLMs, because a “query” can be 30 tokens or 30,000. Prefer tokens/sec plus a distribution of request shapes.

Quantization (modules 10, 13) — representing weights and/or activations in fewer bits. Reduces memory footprint and, crucially for decode, memory traffic.

query_start_loc (18.b) — Offsets marking each request’s rows in the flat batch.


R#

RDMA (module 14) — Remote Direct Memory Access: a NIC writing directly into remote memory without involving the remote CPU. The basis of fast multi-node inference.

Reasoning parser (18.i) — Splits a model’s thinking from its answer into a separate field.

ReduceScatter (module 14) — reduce across ranks, then scatter the result so each rank holds one slice. AllReduce = ReduceScatter + AllGather.

Reference count (17.e) — Number of requests whose block table contains a block.

Renderer (16.e) — Applies the chat template and tokenises.

Request status (17.a) — WAITING, RUNNING, PREEMPTED, several waiting-for states, and the finished states.

Ridge point (6.a) — Peak FLOP/s ÷ bandwidth; the intensity where a GPU switches regime.

Ring buffer, shared-memory (16.d) — The lock-free broadcast channel from engine core to workers.

Roofline (6.a) — Model: attainable FLOP/s = min(peak, bandwidth × intensity).

Roofline model (module 22) — a plot of achievable FLOP/s vs arithmetic intensity, bounded by a sloped bandwidth line and a flat compute ceiling. The standard tool for answering “is this kernel memory or compute bound?”


S#

Sampling (module 12) — choosing the next token from the model’s probability distribution. Temperature, top-k, top-p, min-p are its knobs.

SchedulerOutput (17.a) — One step’s plan: which requests, how many tokens, which blocks.

Shared memory (4.d) — Small fast per-SM scratchpad shared by a block’s threads.

Shared memory (CUDA) (modules 4–6) — fast programmer-managed SRAM scoped to a thread block. FlashAttention’s home.

SIMT (4.c) — Single instruction, multiple threads: how a warp executes.

Sleep mode (16.g) — Releasing GPU memory while keeping the process alive.

SLO / SLI (module 23) — Service Level Objective (the target) and Indicator (the measurement). For LLMs, define both TTFT and ITL SLOs, not a single “latency” SLO.

Slot mapping (18.b) — For each new token, the physical cache slot its key and value are written to.

SM (4.c) — Streaming multiprocessor: the repeating compute block of a GPU.

SmoothQuant (module 13) — a technique that migrates activation outlier magnitude into the weights via per-channel scaling, making INT8 activation quantization feasible.

SM (Streaming Multiprocessor) (modules 4–6) — the fundamental compute unit of an NVIDIA GPU. An H100 has 132 of them. Each runs many warps concurrently.

Speculative decoding (modules 12, 13, 14) — a small draft model (or a head, or n-grams) proposes several tokens; the big model verifies them in one forward pass. Trades spare compute for reduced memory traffic per accepted token.

Stale output (17.d) — A result from a step scheduled before a request was preempted.

Step (16.g) — One schedule-execute-update cycle; at most one token per request without speculation.

Stop string (16.f) — Text that ends generation; checked in the API server, not the engine.

Stream (5.e) — An ordered queue of GPU operations.

Streaming (modules 12, 20) — sending tokens to the client as they are generated (SSE, chunked HTTP, gRPC stream) rather than waiting for the full response.

Structured output (18.e) — Output guaranteed to match a JSON schema, regex or grammar.


T#

Tensor (modules 1–2, 10) — an n-dimensional array. Scalar (0D), vector (1D), matrix (2D), and beyond.

Tensor core (modules 4–6) — a hardware unit that performs a small matrix multiply-accumulate per instruction. Delivers an order of magnitude more FLOP/s than CUDA cores for GEMM in supported precisions.

Tensor parallelism (14.a) — Splitting every layer’s weights across GPUs.

Tensor parallelism (TP) (module 14) — splitting individual weight matrices across GPUs so every GPU does part of each layer. Requires an AllReduce per transformer block — hence needs NVLink to be efficient.

Thermal throttling (4.g) — The GPU lowering its clock to protect itself from heat.

Throughput (modules 1–2) — work per unit time. For LLMs: output tokens/sec, or total tokens/sec across the fleet.

Time per output token (TPOT) (19.c) — Per request: (end-to-end latency − TTFT) ÷ (output tokens − 1).

Time to first token (TTFT) (19.c) — Arrival to first streamed token.

Token (module 12) — the model’s unit of text; typically a subword. ~4 characters of English on average, but wildly variable across languages and code.

Token budget — See max_num_batched_tokens.

Tool parser (18.i) — Extracts tool calls from a model’s free-text output.

Touch (17.e) — A cache hit on a block: reference count up, removed from the free queue.

TTFT (Time To First Token) (modules 1–2, 12) — from request arrival to first token emitted. Governed by queueing + prefill.


U#

Unified memory (5.d) — One address space the system migrates between host and device.

Uniform batch (18.d) — Every request contributing the same number of tokens; eligible for a full CUDA graph.

Utility call (16.g) — A method invoked on the engine core over the socket, between steps.

Utilization (GPU) (module 22) — nvidia-smi’s “GPU-Util” is the fraction of time at least one kernel was resident. It is not a measure of how much of the chip is doing useful work. A completely memory-stalled kernel shows 100%.


V#

V1 (16.c) — The current engine architecture, in vllm/v1/.

Virtual memory (module 3) — the OS abstraction that gives each process its own address space. The conceptual ancestor of PagedAttention.

vLLM (module 20) — an open-source LLM inference engine; introduced PagedAttention and popularized continuous batching.

VllmConfig (16.c) — The single object carrying every setting to every class.

VRAM (2.g) — GPU memory.


W#

Warp (modules 4–6) — 32 threads that execute in lockstep on an SM. The real unit of scheduling on an NVIDIA GPU.

Warp divergence (modules 4–6) — when threads in a warp take different branches, forcing the hardware to execute both paths serially with masking.

Watermark (17.c) — Fraction of blocks kept free when admitting requests.

Weight (modules 1–2, 10) — a learned parameter used to transform inputs. Weights are what you load from disk; activations are what you compute.

Weight-only quantization (module 13) — storing weights in low precision but computing in higher precision after dequantizing on the fly. The dominant approach for memory-bound decode.

Worker (18.a) — The process that owns one GPU.


X#

XID (4.g) — NVIDIA driver error event code.

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in