Glossary: AI Engineering
Every term AI Engineering defines, from A to Z, with the section that teaches it. A section that uses a term from elsewhere, in this book or another, also lists it under “Concepts from other sections” at the top of the page.
1000 terms
Symbols
Section titled “Symbols”[DONE]: the explicit end of a successful stream; EOF without it isErrNoDone. Taught in 28.1 Types, an OpenAI-compatible provider, and a retry wrapper@cImport: Zig’s built-in that reads C headers directly, removing the need for a binding generator. Taught in 20.2 Inference Frameworks: The Cross-Language Landscape- 3CosAdd: answering an analogy with the word nearest in cosine to , excluding the query words. Taught in 8.3 word2vec skip-gram with negative sampling, and the PPMI-SVD baseline
- 451
usage_policy: the HTTP status and error code for a request denied by a policy rule. Taught in 25.6 Usage policy enforcement - 6ND: the approximate training cost in FLOPs of a model with parameters on tokens: per token forward, backward. Taught in 19.7 The training step and validation
- 80/10/10 rule: a picked position shows [MASK], a random token, or itself with probabilities 0.8, 0.1, 0.1. Taught in 12.2 BERT: the bidirectional encoder and masked language modeling
- Ablation: running the same evaluation with one component removed to measure what that component contributes. Taught in Chapter 30: Case Study: Grounded SQL Agent
- Ablation: a paired experiment that changes one component while holding its budget (vocabulary, KV bytes per token, or active parameters) equal. Taught in A.1 Capstone: TinyStories, owned end to end
- absolute position: , the position of a query row in the whole sequence rather than in the current call. Taught in 22.5 FlashAttention forward in C
- Accept-or-resample: accept a drafted when , else sample from the residual; the emitted token’s law is exactly . Taught in 23.9 Speculative decoding in the engine
- Acceptance rate: accepted draft tokens over proposed draft tokens; per token, . Taught in 21.6 Speculative decoding: n-gram, prompt-lookup, and model drafts
acc_norm: multiple-choice accuracy using log-likelihood per byte, removing the length bias of summed log-probabilities. Taught in 12.7 The evaluation harness and the model zoo- activation checkpointing: discarding a segment’s activations in the forward pass and recomputing them during backward. Taught in 17.1 Mixed precision, loss scaling, gradient accumulation, and activation checkpointing
- Active parameters: parameters participating in the computation for a particular token. Taught in 20.9 Architecture choices and performance limits
- Actor/learner architecture: a system separating experience generation from gradient updates. Taught in 18.8 Rollout systems, GRPO variants, and training diagnostics
- adaptation ladder: the sequence of increasingly expensive ways to specialize a model, from prompting through RAG and fine-tuning to continued pretraining. Taught in 5.3 Model landscape and lifecycle
- add-alpha smoothing: adding to every count before normalizing, so no probability is zero. Taught in 6.1 Byte bigram: counts, logits, safetensors v0
- Added token: a vocabulary entry matched in text before pre-tokenization, such as
<|im_start|>. Taught in 7.2 Byte-level BPE - additive mask: the float form, 0 where allowed and where blocked, added to scores before the softmax. Taught in 11.2 Masks: causal, padding, sliding window, additive
- additive score: , a one-hidden-layer network on the pair . Taught in 10.2 Bahdanau additive attention
- adjusted count: the raw count at the top order or for
<s>-initial grams, the continuation count otherwise. Taught in 8.1 n-gram language model with interpolated modified Kneser-Ney - advantage: a sample’s reward minus the group mean, divided by the group’s standard deviation. Taught in 18.3 Group relative policy optimization with verifiable rewards
- Advantage: estimated improvement over the state’s baseline value. Taught in 18.6 PPO with a critic and generalized advantage estimation
- agent loop: repeated model calls, each followed by running the tool calls it returned and appending their results, until a reply has no calls. Taught in 28.3 The agent loop
- aging: raising a waiting request’s effective priority with its wait, implemented as the fixed key . Taught in 23.3 Continuous batching scheduler with priority and preemption
- AI gateway / LLM gateway: the single front door to a fleet of model servers, where authentication, rate limits, usage policy, caching, routing, and metering live, so the engines behind it stay simple and keyless; its defining constraint is forwarding a token stream without delaying the first token. Taught in Chapter 25: The AI Gateway
- ALiBi: a per-head bias that falls linearly with query-key distance, used instead of rotations. Taught in 13.4 Context Extension: PI, NTK, YaRN, Llama 3 Scaling, and ALiBi
- alignment padding: the bytes needed to move address up to a multiple of . Taught in 22.1 C runtime support and an arena allocator with marks
- all-gather: every rank ends with the concatenation of all ranks’ chunks, in rank order. Taught in 17.2 Collectives over processes: ring all-reduce
- all-reduce: every rank ends with the elementwise reduction (sum or mean) of all ranks’ arrays. Taught in 17.2 Collectives over processes: ring all-reduce
- allocator hook: the replaceable
alloc/freepair through which all C memory requests go, which tests can count or make fail. Taught in 22.1 C runtime support and an arena allocator with marks - Allowlist: the policy in data; each license allowed for named uses with its obligations, or refused with a reason. Taught in 33.1 Data licensing and the ledger
- Allowlist classifier: a gate that refuses anything not positively recognized as safe. Taught in Chapter 30: Case Study: Grounded SQL Agent
- annotation: a schema keyword with no validation effect (
title,description,default,examples,$schema). Taught in 28.2 Tools, a registry, and JSON Schema argument validation - approval marker: the gate’s identifier for a call needing human approval; passing it to
WithApprovalsturns that verdict intoAllow. Taught in 28.3 The agent loop - approval marker: the first 16 hex digits of SHA-256 over the tool name, a zero byte, and the canonical arguments. Taught in 28.4 The tool gate, the SQL safety gate, and the prompt-injection suite
- Approximate nearest neighbor (ANN) search: vector search that trades a little recall for orders-of-magnitude speed over exact nearest-neighbor search, using an index such as HNSW or IVF. Taught in Chapter 27: Retrieval and RAG
- arena: an allocator that hands out memory by bumping an offset through owned blocks and releases everything after a point at once. Taught in 22.1 C runtime support and an arena allocator with marks
- arithmetic intensity: FLOPs per byte moved; for a linear layer at BF16 it equals the number of tokens in the step. Taught in 20.4.6 Load tests and the deployment runbook
- Arithmetic intensity: operations per byte transferred for a defined computation and memory level. Taught in 20.9 Architecture choices and performance limits
- arithmetic intensity: FLOPs performed per byte moved from memory. Taught in 22.3 Cache-blocked, packed, batch-invariant matmul in C
- assistant-only loss: cross-entropy computed only at positions whose target is an assistant response token. Taught in 18.1 Supervised fine-tuning: chat rendering, assistant-only loss, packing
- atomic rename: replacing a name in one file system operation, so readers see the old or the new target, never a mix. Taught in 6.7 Safetensors for every dtype, atomic checkpoints, and the token stream
- Atomic rename:
os.replaceof a verified.partfile, so the final name only ever holds checked bytes. Taught in 13.9 The Llama-Family Model: Config, Weight Loading, and Download - attention: a weighted average of encoder outputs whose weights the decoder computes from its state. Taught in 10.2 Bahdanau additive attention
- attention dropout: an inverted-dropout multiplier applied to after the softmax, reused unchanged in the backward. Taught in 11.1 Scaled dot-product attention (forward and backward)
- Attention scaling: a factor applied to both tables, multiplying every score by . Taught in 13.3 Rotary Position Embeddings
- Attention sink: an early token that a trained model parks unwanted attention on; StreamingLLM keeps the first tokens visible forever. Taught in 13.7 Sliding Windows and Attention Sinks
- attentional state: , what the output layer reads. Taught in 10.3 Luong attention and input feeding
- attribute recall: the fraction of reference-mentioned attributes that a caption also mentions. Taught in 15.5 Multimodal eval metrics: WER, CER, VQA, captions, zero-shot
- Audit event: a record of a decision holding identifiers only, never prompt text, completions, or embeddings. Taught in 37.1 Usage policy at the gateway
- Audit span: a record of one replacement (document id, kind, offsets) that never holds the value. Taught in 34.1 Privacy and PII policy
- Authorization-aware retrieval: applying per-chunk access permissions at retrieval time so a user only ever retrieves content they are allowed to see; a hard requirement for enterprise RAG. Taught in Chapter 27: Retrieval and RAG
- autocast: a scoped mode in which every matmul rounds its operands and output to a 16-bit format. Taught in 17.1 Mixed precision, loss scaling, gradient accumulation, and activation checkpointing
- Aux-free bias: DeepSeek-V3’s per-expert correction added to choice scores only, moved by a sign rule. Taught in 13.8 Mixture of Experts
- Average precision: the step sum over decreasing thresholds. Taught in 36.1 Bias and safety evals
- axial 2D RoPE: rotary embedding where half the pairs rotate by the patch row and half by the column, so scores depend on . Taught in 14.2 2D RoPE and M-RoPE
- Backpropagation: reverse-mode automatic differentiation that computes all parameter gradients in one backward pass. Taught in Chapter 2: Deep Learning
- backpropagation: reverse-mode automatic differentiation, the chain rule evaluated right to left over a computation graph. Taught in Chapter 3: Neural Architectures and Their History
- backpropagation through time (BPTT): backpropagation over an RNN unrolled into one layer per timestep. Taught in Chapter 3: Neural Architectures and Their History
- Backpropagation through time (BPTT): reverse-mode differentiation of the recurrence unrolled over time, with weights shared across steps. Taught in 9.1 Vanilla RNN with manual BPTT and truncation
- base model relation: model-card metadata recording whether a model is a fine-tune, adapter, quantization, or merge of its base. Taught in 20.8 From Training Run to Shared Model: Packaging, Publishing, and Use Cases
- basic normalizer: Whisper’s lowercase, tag-removal, NFKC and category-based punctuation stripping applied to both sides before scoring. Taught in 15.5 Multimodal eval metrics: WER, CER, VQA, captions, zero-shot
- Basic tokenizer: BERT’s normalizer and pre-tokenizer: clean, space CJK, strip accents, lowercase, split on white space and punctuation. Taught in 7.3 WordPiece
- batch invariance: the property that a request’s numerical results do not depend on what else is in its batch. Taught in 20.5 LLM Serving Platforms: How They Work and When to Use Them
- Batch invariance: independence of a request’s result from irrelevant co-batched requests and slot placement under a specified execution contract. Taught in 20.13 Batch invariance and numerical reproducibility
- batch invariance: the property that a kernel’s output bits do not depend on how the work was split or scheduled. Taught in 22.2 Thread pool and tl_parallel_for
- batch invariance: the property that a row’s output bits do not depend on the batch size, its position in the batch, or the threads. Taught in 22.3 Cache-blocked, packed, batch-invariant matmul in C
- batch invariance: a token’s logits do not depend on which other tokens share its step, bit for bit. Taught in 23.2 Candle model runner (Llama + bigram, int4), Rust KV cache, sampler and PCG32
- beam search: keeping the best prefixes by summed log-probability, ranking all extensions together at each step. Taught in 10.4 Beam search, generic over a step function
- Bellman equation: the recursive relation expressing a state’s value as immediate reward plus discounted next-state value. Taught in 4.4 World models, multiple agents, and RLHF
- Benchmark contamination: benchmark data leaking into a model’s training set, so its score measures memorization instead of capability; countered with fresh, private, or held-out evals. Taught in Chapter 29: LLM Evaluation
- BF16: a 16-bit float with float32’s sign and exponent and 7 mantissa bits; the top half of a rounded float32. Taught in 6.7 Safetensors for every dtype, atomic checkpoints, and the token stream
- bf16: a 16-bit format with float32’s 8 exponent bits and 7 mantissa bits; float32’s range at unit roundoff . Taught in 17.1 Mixed precision, loss scaling, gradient accumulation, and activation checkpointing
- Bi-encoder: an encoder used to embed queries and documents separately and compare them by dot product; documents can be embedded once and indexed, which makes first-stage retrieval fast and scalable. Taught in Chapter 27: Retrieval and RAG
- Bias: , error from a model too simple for the problem. Taught in Chapter 1: Statistical Learning
- Bias gap: the mean paired difference over templates and pairs, with a bootstrap interval over the pairs. Taught in 36.1 Bias and safety evals
- Bidirectional layer: two recurrent modules, one reading left to right and one right to left, with outputs concatenated per position. Taught in 9.4 Bidirectional RNN with length-aware reversal
- bigram model: a language model that predicts the next token from the current token alone, stored as a table. Taught in 6.1 Byte bigram: counts, logits, safetensors v0
- biLM: a forward and a backward language model over the same sentence, sharing the embedding and the softmax, trained separately in each direction. Taught in 9.5 ELMo: biLM, ScalarMix, linear probes
- Biometric data: media that can identify a person by body or voice; voice is always treated as biometric here. Taught in 34.2 Consent and biometric evidence in model cards
- Bits per byte: total loss in bits divided by total UTF-8 bytes; equal to bits per token over bytes per token. Taught in 7.6 Tokenizer metrics
- Bits per byte: total NLL in bits divided by the text’s bytes, the tokenizer-independent unit of the zoo. Taught in 12.7 The evaluation harness and the model zoo
- Bits per byte (bpb): total held-out negative log-likelihood in bits divided by the number of held-out bytes, comparable across tokenizers. Taught in A.1 Capstone: TinyStories, owned end to end
- Bits per character (bpc): mean negative log-likelihood in nats divided by . Taught in 9.6 RNN language model with stateful TBPTT
- Block: a fixed-size unit of KV storage holding positions for every layer. Taught in 21.3 A paged KV cache in Python
- Block: one numbered excerpt in the context,
[n] <uri>\n<text>\n, holding a stored chunk whole. Taught in 27.3 Context Assembly, Citations, and the search_docs Tool - block align: bytes per frame, ; redundant with the other
fmtfields and therefore checkable. Taught in 15.1 Audio frontend: WAV parsing and Whisper’s log-mel - Block pool: one slab of fixed-size KV blocks handed out by id. Taught in 21.8 A paged KV block pool in C
- block table: a request’s list of the physical KV blocks holding its tokens, used by attention to read the paged cache. Taught in 20.6 Inside an Inference Engine: How vLLM and SGLang Run a Model
- Block table: a sequence’s list of block ids in position order. Taught in 21.3 A paged KV cache in Python
- block table: a sequence’s list of physical block ids in position order. Taught in 22.6 Paged attention for decode in C
- block table: a sequence’s list of pool block ids; position lives in entry , slot . Taught in 23.2 Candle model runner (Llama + bigram, int4), Rust KV cache, sampler and PCG32
- block-major order: patch ordering in which each merge block’s patches are consecutive, blocks in row-major order. Taught in 14.2 2D RoPE and M-RoPE
BlockSpace: the trait through which the scheduler allocates, grows, and releases KV blocks. Taught in 23.3 Continuous batching scheduler with priority and preemption- BM25: a lexical ranking function with saturating term frequency (
k1), length normalization (b), and an idf that is never negative. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR - Bonus token: the target’s extra token when every draft in a round was kept. Taught in 21.6 Speculative decoding: n-gram, prompt-lookup, and model drafts
- Bonus token: the extra token sampled from row when every draft token is accepted. Taught in 23.9 Speculative decoding in the engine
- Bootstrap: resampling with replacement to estimate the uncertainty of a statistic. Taught in Chapter 1: Statistical Learning
- Bootstrapping: updating an estimate toward a target that itself uses current estimates. Taught in 4.4 World models, multiple agents, and RLHF
- bounded admission: a fixed-capacity command queue filled with
try_send, so a full queue is an immediate 429. Taught in 23.6 tl-serve: OpenAI-compatible HTTP + SSE on tokio/hyper - Bounded cache: a KV cache that evicts to the sinks and the last positions, holding at most keys. Taught in 13.7 Sliding Windows and Attention Sinks
- bounded loads: a consistent-hashing variant that skips a key’s owner once its load exceeds . Taught in 25.4 Routing, cascades, and failover
- Bounded self-correction: returning errors to the model as tool errors and retrying within hard caps on every resource. Taught in Chapter 30: Case Study: Grounded SQL Agent
- Bradley-Terry loss: , the negative log-likelihood that the chosen answer beats the rejected one. Taught in 12.5 Fine-tuning heads and the linear-head export
- Bradley-Terry model: , a pairwise preference probability from scalar rewards. Taught in 18.2 Direct preference optimization and IPO
- brevity penalty: when the hypothesis is shorter than the closest reference, else 1. Taught in 10.5 Sequence metrics: exact match, BLEU, chrF
- bridge: the
Linearplustanhthat maps the encoder’s two final states to the decoder’s first state. Taught in 10.1 Encoder-decoder with teacher forcing - bucketed positions: position ids computed from a patch’s fractional coordinates, so any aspect ratio spreads over the whole table. Taught in 14.3 Vision transformer encoder
- budget: a per-run limit on tokens and tool calls, checked before the spend. Taught in 28.3 The agent loop
- bump allocation: allocating by advancing an offset past padding and the request, with no per-allocation bookkeeping. Taught in 22.1 C runtime support and an arena allocator with marks
- Burn rate: the error rate divided by the SLO’s error budget; a value of 14.4 spends a 30-day budget in about two days. Taught in A.1 Capstone: TinyStories, owned end to end
busy_timeout: how long a SQLite connection waits for the write lock before failing withSQLITE_BUSY. Taught in 25.5 The usage ledger and admin API- Byte class: a set of bytes that every NFA edge treats alike, used to keep the subset construction small. Taught in 23.10 Tool calls and constrained decoding
- Byte trie: a prefix tree over the vocabulary’s bytes, letting one walk serve every token with a shared prefix. Taught in 21.7 Constrained decoding: from regex to token masks
- Byte trie: a prefix tree over the vocabulary’s bytes that shares mask walks between tokens and prunes dead subtrees. Taught in 23.10 Tool calls and constrained decoding
- Byte-level: the base alphabet is the 256 bytes (through the byte map), so every text encodes and there is no unknown token. Taught in 7.2 Byte-level BPE
- Bytes per token: total UTF-8 bytes over total tokens; the compression ratio. Taught in 7.6 Tokenizer metrics
- Cache hook: the
update(layer, k, v)protocol through which a KV cache receives rotated, unrepeated keys and values. Taught in 13.5 Grouped-Query Attention with a Cache Hook, Windows, and Sinks - Cache-aware routing: routing that prices the prompt cache a model switch would abandon, since a full uncached prefill on the new model can cost more than the switch saves. Taught in 24.5 Routing implementations and selection
- cached block: a block with no running request on it that is still findable by hash or in the radix tree, and can be evicted. Taught in 23.5 Block manager with prefix cache (none, hash, radix)
- calibration: choosing a clipping threshold or other quantizer parameters from sample data. Taught in 20.1.4 Choosing and validating quantization
- canary split: a weighted division of one public model’s traffic across served model versions. Taught in 25.4 Routing, cascades, and failover
- Canonical DFA: a DFA with dead states removed, Moore-minimized, and numbered breadth-first with bytes in order, so equal languages give identical tables. Taught in 23.10 Tool calls and constrained decoding
- Canonical digest: SHA-256 of sorted-key, compact, UTF-8 JSON, identifying an exact set of predictions. Taught in 34.2 Consent and biometric evidence in model cards
- Capability contract: the mandatory request semantics and execution constraints an endpoint must satisfy before it can be scored. Taught in 24.1 Designing a Model Router Across APIs, Caches, and Applications
- Cardinality: the number of distinct label combinations, each a stored series; user-fed labels are capped at 64 values with the rest folded into
_other. Taught in 23.8 Serving metrics and tracing - Carry: the gradient that step sends back into , added to the loss’s direct gradient . Taught in 9.1 Vanilla RNN with manual BPTT and truncation
- cascade: asking a cheaper model first and escalating when its confidence (
accept_if) fails. Taught in 25.4 Routing, cascades, and failover - Catastrophic forgetting: loss of general capabilities caused by fine-tuning on a narrow task. Taught in 19.7 The training step and validation
- Causal LM loss: mean cross-entropy of logits at position against the token at , over real targets. Taught in 12.1 GPT: the decoder-only language model
- causal mask: the rule ; each position reads itself and the past. Taught in 11.2 Masks: causal, padding, sliding window, additive
- cell state: the LSTM’s additively updated memory, protected by forget, input, and output gates. Taught in Chapter 3: Neural Architectures and Their History
- Cell state : the LSTM’s memory, updated additively as . Taught in 9.2 LSTM (torch gate order)
- central differences: the numerical derivative , used as an oracle for analytic gradients. Taught in 6.3 The op library and gradcheck_all
- Chained block hash: FNV-1a over the parent block’s hash and the block’s token ids, naming the whole prefix. Taught in 21.8 A paged KV block pool in C
- chained block hash: , naming a block by its whole prefix. Taught in 23.5 Block manager with prefix cache (none, hash, radix)
- Chained block hash: , a name for a full block that identifies its whole prefix, so equal hashes mean equal KV. Taught in 23.7 Disaggregated prefill and decode
- character error rate (CER): the same rate computed over the characters of the stripped strings, spaces included. Taught in 15.5 Multimodal eval metrics: WER, CER, VQA, captions, zero-shot
- chat template: the byte-level protocol that renders a list of role-tagged messages into one token sequence. Taught in 18.1 Supervised fine-tuning: chat rendering, assistant-only loss, packing
- chat template: a Jinja program that renders a list of chat messages into the exact token sequence the model was trained on. Taught in 20.3.4 Portability and load triage
- chat template: the model’s own Jinja template that turns
messagesinto the exact text format it was trained on. Taught in 23.6 tl-serve: OpenAI-compatible HTTP + SSE on tokio/hyper - Chinchilla-optimal: the compute-optimal split that minimizes loss for a fixed training budget. Taught in 19.7 The training step and validation
- chrF: a recall-weighted F score over character n-grams of orders 1 to 6, white space removed. Taught in 10.5 Sequence metrics: exact match, BLEU, chrF
- chunk: the contiguous range of the flat parameter vector a rank owns, given by
chunk_bounds. Taught in 17.3 Data parallelism and ZeRO stages 1 to 3 - chunk invariance: the property that a row’s output bits do not depend on how the prompt was split into calls. Taught in 22.5 FlashAttention forward in C
- chunk invariance: prefilling a prompt in one step or in pieces gives the same logits within tolerance. Taught in 23.2 Candle model runner (Llama + bigram, int4), Rust KV cache, sampler and PCG32
- Chunked attention: attention restricted to fixed-size chunks of input with limited look-ahead, letting an encoder run incrementally on a stream; chunk size is the latency knob. Taught in Chapter 26: Edge and Realtime Inference
- chunked prefill: prefilling a prompt over several steps in pieces of at most
prefill_chunktokens, mixed with decodes. Taught in 23.4 Chunked prefill (mixed prefill + decode batches) - Citation: the record
{N, ChunkID, DocID, URI}saying which stored chunk a number names. Taught in 27.3 Context Assembly, Citations, and the search_docs Tool - Claim boolean: a manifest field such as
measured_heldout_improvementthat states a conclusion as data a check can verify. Taught in A.2 Capstone 2: post-trained TinyStories model - classifier-free guidance: combining conditional and unconditional denoising predictions with weight to trade diversity for prompt adherence. Taught in 5.3 Model landscape and lifecycle
- Clip fraction: a defined count of ratios outside the clipping interval; it is not the fraction of all gradients that are zero. Taught in 18.6 PPO with a critic and generalized advantage estimation
- clipped surrogate: the minimum of and , which removes the incentive to move a sample’s probability beyond the clip range. Taught in 18.3 Group relative policy optimization with verifiable rewards
- clipping: crediting a hypothesis n-gram at most as many times as it occurs in any one reference. Taught in 10.5 Sequence metrics: exact match, BLEU, chrF
- CLS token: a learned vector prepended to the sequence whose output summarizes the image. Taught in 14.3 Vision transformer encoder
- cluster bootstrap: a bootstrap that resamples cases, each bringing all its samples, so correlated samples do not inflate confidence. Taught in 29.1 Eval runner
- Code point: one element of a Python
str; a Unicode scalar between U+0000 and U+10FFFF. Taught in 7.1 The tokenizer protocol and the char tokenizer - Cohen’s kappa: agreement between two raters corrected for the agreement their label marginals would produce by chance. Taught in 29.3 LLM judge with position control
- col2im: the adjoint of im2col; it adds columns back into image positions, summing where windows overlap. Taught in 14.1 Conv layers and pooling on autograd
- cold start: the time from scheduling a replica to serving its first request, dominated by fetching and reading weight bytes and then by engine initialization. Taught in 20.3.4 Portability and load triage
- collective: an operation that every rank calls in the same order and that moves data among all of them. Taught in 17.2 Collectives over processes: ring all-reduce
- column- and row-parallel: the two tensor-parallel slicing patterns, splitting a weight’s output rows (no communication) or its input columns (partial sums followed by an all-reduce). Taught in 20.3.4 Portability and load triage
- column- and row-parallel linear: splitting a weight by output rows (no communication) or by input columns (partial sums combined by all-reduce). Taught in 20.6 Inside an Inference Engine: How vLLM and SGLang Run a Model
- commit rule: a request that fails before any byte reaches the client is retried elsewhere, and one that fails after is ended with an explicit error event. Taught in 20.7.5 Adapter fleets and operations
- commitment boundary: the point (the status line) after which a proxy can no longer retry a request elsewhere. Taught in 25.3 The SSE streaming proxy
- commitment boundary: the first content delta, after which a retry would duplicate output. Taught in 28.1 Types, an OpenAI-compatible provider, and a retry wrapper
- committed length: the number of prefix positions every layer’s self-attention cache holds; read once per call as the position offset. Taught in 15.3 Whisper decoder and checkpoint weights
- Committed length: the minimum fill count over layers, from which positions and masks are computed. Taught in 21.2 The KV cache, incremental decoding, and generate
- Completion-only loss: loss restricted to a designated target completion after context. Taught in 18.10 SFT recipes, data strategies, and parameter updates
- compositing over white: blending a transparent pixel with a white background, . Taught in 14.6 Image preprocessing to the specification
- composition root: the one place (here
main) where independent components are constructed and wired together. Taught in 25.2 The server skeleton - Compute budget: the training FLOP available, , which fixes the trade between parameters and tokens . Taught in A.1 Capstone: TinyStories, owned end to end
- concat score: , Bahdanau’s network with one matrix on the concatenation. Taught in 10.3 Luong attention and input feeding
- concatenated sinusoids: Whisper’s position layout, all sines then all cosines, with frequencies . Taught in 15.2 Whisper encoder: conv stem, sinusoids, pre-LN blocks
- Conformer: a convolution-augmented transformer that is the standard streaming speech recognition encoder, run with limited or chunked context for low latency. Taught in Chapter 26: Edge and Realtime Inference
- Confound: an alternative explanation for a measurement, such as string length for a log-probability gap. Taught in 35.1 Datasheet and model card
- Connectionist temporal classification (CTC): a streaming-native speech decoding objective that emits a label or blank per audio frame, so tokens appear without waiting for the utterance to end. Taught in Chapter 26: Edge and Realtime Inference
- Consent record: the ledger fields (
consent,biometric,prohibited_uses,attribution,modality) that state whether people agreed to their media being used, separate from the license. Taught in 34.2 Consent and biometric evidence in model cards - Constant error carousel: the cell path along which the gradient is multiplied only by , so it survives many steps when . Taught in 9.2 LSTM (torch gate order)
- constant-time comparison: a comparison whose running time depends only on the lengths of its inputs, not their contents. Taught in 25.1 The tracer gateway
- Constrained decoding: masking, at every step, every token that would take the output outside an allowed language. Taught in 23.10 Tool calls and constrained decoding
- content delta: a text or tool-call delta, the kind the caller shows or acts on. Taught in 28.1 Types, an OpenAI-compatible provider, and a retry wrapper
- context: the weighted sum that the decoder reads. Taught in 10.2 Bahdanau additive attention
- Context precision / context recall: retrieval-stage RAG metrics asking whether the retrieved chunks are relevant and whether all the context needed for the answer was retrieved. Taught in Chapter 29: LLM Evaluation
- Contextual representation: a token vector that depends on the whole sentence, here . Taught in 9.5 ELMo: biLM, ScalarMix, linear probes
- continuation count: , the number of distinct symbols seen immediately before . Taught in 8.1 n-gram language model with interpolated modified Kneser-Ney
- Continuation piece: a vocabulary entry prefixed with
##that may only follow another piece within a word. Taught in 7.3 WordPiece - continuous batching: token-level scheduling that admits and evicts sequences every step to keep the GPU full. Taught in Chapter 20: Inference Engines and GPU Deployment
- continuous batching: re-forming the batch at every step so finished requests leave and waiting ones join immediately. Taught in 23.3 Continuous batching scheduler with priority and preemption
- Contrastive training: fine-tuning an embedder by pulling matching pairs together and pushing negatives apart. Taught in 16.3 Embeddings, small models, and platforms
- control prompt: the explicit
[sot, language, task]sequence, plusno_timestampswhen timestamps are off, that tells Whisper what to do. Taught in 15.4 Whisper decoding and long-form transcription - conv stem: the two width-3
Conv1dlayers with GELU that precede attention; the second’s stride 2 halves the sequence length. Taught in 15.2 Whisper encoder: conv stem, sinusoids, pre-LN blocks Conv1D: Hugging Face’s GPT-2 projection, storing as[in, out]and computing . Taught in 12.1 GPT: the decoder-only language model- Coordinated omission: failure to observe delays that would have occurred had load continued arriving during stalls. Taught in 20.12 Performance experiments and correctness gates
- Coordinated omission: the measurement error of a closed-loop client that stops sending during a stall and so records it once instead of in every request it delayed. Taught in 23.11 An open-loop load generator
- Copy on write: giving a writer a private copy of a shared block before writing into it. Taught in 21.3 A paged KV cache in Python
- Copy on write: copying a shared block before a holder writes into it. Taught in 21.8 A paged KV block pool in C
- Cost per successful task: total spend, including retries, cache misses, and escalations, divided by the number of tasks completed correctly; the cost figure that a routing comparison should report. Taught in 24.5 Routing implementations and selection
- Counter: a metric that only increases;
rate()reads any drop as a restart. Taught in 23.8 Serving metrics and tracing - counts of counts: , the number of grams at one order whose adjusted count is . Taught in 8.1 n-gram language model with interpolated modified Kneser-Ney
- CRC-32C: the Castagnoli cyclic redundancy check, reflected polynomial
0x82F63B78. Taught in 21.8 A paged KV block pool in C - Critic: a learned estimate of value or return. Taught in 18.6 PPO with a critic and generalized advantage estimation
- cross-attention: attention with queries from one sequence and keys and values from another. Taught in 11.3 Multi-head attention
- cross-attention: attention with queries from the decoder and keys and values from the encoder output. Taught in 11.5 Encoder-decoder Transformer: post-LN and pre-LN, Noam, label smoothing
- cross-attention: attention whose queries come from the decoder and whose keys and values come from the encoded audio window, with no mask. Taught in 15.3 Whisper decoder and checkpoint weights
- Cross-encoder: a model that reads a query and a document together and outputs one relevance score; more accurate than a bi-encoder but run per candidate pair, so it is used to rerank a short list. Taught in Chapter 27: Retrieval and RAG
- Cross-validation: estimating test error by repeatedly training on part of the data and testing on the rest. Taught in Chapter 1: Statistical Learning
CrossKV: the per-layer cross keys and values, projected once per window and reused for every decoding call. Taught in 15.3 Whisper decoder and checkpoint weights- CUDA graph capture: recording a forward pass’s kernel sequence once per batch size so that each later step replays it with one launch. Taught in 20.6 Inside an Inference Engine: How vLLM and SGLang Run a Model
- Cumulative bucket (
le): the exposed count of observations at most the bound;le="+Inf"equals_count. Taught in 23.8 Serving metrics and tracing - cursor: the stream’s whole position: shard index, offset of the next window, and generator state. Taught in 6.7 Safetensors for every dtype, atomic checkpoints, and the token stream
- data buffer: the part of a safetensors file after the 8-byte length and the JSON header, from which
data_offsetsare counted. Taught in 23.1 Your first endpoint: a std-only Rust HTTP/1.1 + SSE server - Data minimization: not collecting or keeping data you do not need, the cheapest privacy control. Taught in 34.1 Privacy and PII policy
- data parallelism (DDP): each rank holds a full model replica, computes the gradient of its batch slice, and all ranks average gradients before stepping. Taught in 17.3 Data parallelism and ZeRO stages 1 to 3
- data race: two unordered accesses to the same memory from different threads, at least one a write; undefined behavior in C11. Taught in 22.2 Thread pool and tl_parallel_for
- Data, tensor, pipeline, and expert parallelism: splitting training across devices by the batch, by each weight matrix, by layers, or by MoE experts. Taught in 16.3 Embeddings, small models, and platforms
- Datasheet: the dataset’s documentation: motivation, composition, collection, preprocessing, uses, distribution and maintenance. Taught in 35.1 Datasheet and model card
- deadlock: a cycle of blocked operations, each waiting on the next, so none can proceed. Taught in 17.2 Collectives over processes: ring all-reduce
- Deadly triad: function approximation, bootstrapping, and off-policy learning together, which can make value learning diverge. Taught in 4.4 World models, multiple agents, and RLHF
- debiased EMA: an exponential moving average divided by so its early values are not pulled toward zero. Taught in 6.6 Training loop and the autograd bigram
- Decision model / System One model: a model that takes content plus a typed question and returns one of a closed set of answers with a calibrated probability per option in a single forward pass, without generating text. Taught in 24.5 Routing implementations and selection
- decode: the memory-bandwidth-bound generation of one token per sequence per forward pass, which determines TPOT. Taught in Chapter 20: Inference Engines and GPU Deployment
- Decode step: a forward pass over one new token against the cache. Taught in 21.2 The KV cache, incremental decoding, and generate
- decode step: one forward pass with a single new query per sequence, at the newest position. Taught in 22.6 Paged attention for decode in C
- decoder: the network that writes the target one token at a time from its previous token and state. Taught in 10.1 Encoder-decoder with teacher forcing
- decoder: a stack with masked self-attention, cross-attention into the encoder output, and a feed-forward network. Taught in 11.5 Encoder-decoder Transformer: post-LN and pre-LN, Noam, label smoothing
- Decoder block: two Pre-LN residual steps, attention then MLP. Taught in 13.9 The Llama-Family Model: Config, Weight Loading, and Download
- Decoder-only model: a single causal self-attention stack in which every position predicts the next token. Taught in 12.1 GPT: the decoder-only language model
- Decoupled rope key: a small rotated key shared by all heads, kept separate so the latent part stays position-free. Taught in 13.6 Multi-Head Latent Attention and Weight Absorption
- Deduplicated push: a transfer in which blocks the receiver already caches travel as empty payloads with their hash, so only missing blocks and the tail cost bytes. Taught in 23.7 Disaggregated prefill and decode
- default deny: the policy rule that a tool in no list is refused. Taught in 28.4 The tool gate, the SQL safety gate, and the prompt-injection suite
- delta: one typed piece of a streamed answer (text, a tool-call start, an argument fragment, a call end, usage, done, or error). Taught in 28.1 Types, an OpenAI-compatible provider, and a retry wrapper
- Deployment spectrum: the range of places a model can run, from datacenter GPU serving through a single self-hosted box to phones and edge devices; every tier loads weights, manages a KV cache, and decodes token by token, and only the runtime and memory budget change. Taught in Chapter 26: Edge and Realtime Inference
- dequant-fused GEMM: a kernel that dequantizes low-bit weights in registers or shared memory immediately before the matrix multiply. Taught in 20.1.4 Choosing and validating quantization
- Detach: keep a tensor’s values but drop its graph, so backward stops there. Taught in 9.6 RNN language model with stateful TBPTT
- device plugin: the node agent that advertises GPUs to Kubernetes as the integer extended resource
nvidia.com/gpu. Taught in 20.7.5 Adapter fleets and operations d_ff(intermediate size): the hidden width , about for a gated MLP, rounded up tomultiple_of. Taught in 13.2 Gated MLPs: SwiGLU and GeGLU- direct path: the optional linear map from the embeddings straight to the logits, in parallel with the hidden layer. Taught in 8.2 Bengio’s neural probabilistic language model
- disaggregated serving: running prefill and decode on separate GPU pools and transferring the KV cache between them. Taught in 20.4.6 Load tests and the deployment runbook
- disaggregated serving: prefill on one worker, decode on another, connected by a KV transfer. Taught in 25.4 Routing, cascades, and failover
- Disaggregation: placing distinct phases or responsibilities in separate worker pools. Taught in 20.11 Serving layouts: one process, replicas, and distributed pools
- Disclosure: telling users and decision makers what a system can and cannot do, in language suited to the audience. Taught in 38.1 Professional responsibility and disclosure
- Discriminator: the full-size encoder that labels every real token as original or replaced. Taught in 12.3 ELECTRA: replaced-token detection
- distillation: training a student model to match a teacher model’s output distribution. Taught in 18.4 Distillation with forward and reverse KL
- distillation temperature: a divisor applied to both models’ logits before the softmax, flattening both distributions. Taught in 18.4 Distillation with forward and reverse KL
- Distribution distillation: training against a teacher’s probability distribution. Taught in 18.9 Distillation data, student rollouts, and deployment
- DNS rebinding: returning a safe address when a name is checked and an internal one when it is resolved again for the connection. Taught in 27.1 RAG Ingest: Crawler, Chunker, Embedder, and Store
- document id: a per-token label naming which packed example a token belongs to (-1 for padding), used to build a block-diagonal attention mask. Taught in 18.1 Supervised fine-tuning: chat rendering, assistant-only loss, packing
- dot score: , the parameter-free score between a query and a key of the same width. Taught in 10.3 Luong attention and input feeding
- downstream / upstream: the client side and the server side of a proxy, respectively. Taught in 25.1 The tracer gateway
- DPO: minimizing over preference pairs, equivalent to fitting the KL-regularized reward objective. Taught in 18.2 Direct preference optimization and IPO
- DPO: preference optimization that uses the closed-form optimum of KL-constrained RLHF so the reward model and partition function drop out. Taught in 19.7 The training step and validation
- Draft: a cheap proposer of the next tokens. Taught in 21.6 Speculative decoding: n-gram, prompt-lookup, and model drafts
- drain: stop accepting work, let in-flight requests finish (up to 30 s), then exit 0. Taught in 23.6 tl-serve: OpenAI-compatible HTTP + SSE on tokio/hyper
- draining: the shutdown phase in which a server refuses new work and finishes work in flight. Taught in 25.2 The server skeleton
- Dropout: randomly zeroing activations during training to approximate an ensemble of subnetworks. Taught in Chapter 2: Deep Learning
- dual encoder: two towers, one per modality, projecting into a shared embedding space. Taught in 14.5 Contrastive image-text: CLIP and SigLIP
- dual numbers: forward-mode autodiff values that carry an exact derivative alongside each number. Taught in 6.3 The op library and gradcheck_all
- Duplicate: a caller’s block id for a position the tree already stores with a different id, returned for the caller to free. Taught in 21.4 A radix prefix cache
- dynamic loss scaling: halving and skipping the step on overflow, and doubling after a run of good steps. Taught in 17.1 Mixed precision, loss scaling, gradient accumulation, and activation checkpointing
- dynamic scheduling: workers take the next range from a shared counter, so faster workers take more. Taught in 22.2 Thread pool and tl_parallel_for
- dynamic window: a per-center window radius drawn uniformly from , so nearer words pair more often. Taught in 8.3 word2vec skip-gram with negative sampling, and the PPMI-SVD baseline
- E4M3: an fp8 format with 4 exponent and 3 mantissa bits, largest finite value 448. Taught in 21.5 Quantization: int8, int4 groups, fp8, and the KV cache
- Eager execution: running each tensor operation immediately as Python reaches it, with the autograd tape recorded on the fly. Taught in 16.3 Embeddings, small models, and platforms
- Effect-size budget: the tolerated relative change , so that is “worse than we accept”. Taught in 23.12 Run comparison and the regression gate
- effective resolution: the number of original pixels a candidate preserves, capped at the original area. Taught in 14.4 Dynamic resolution and tiling
- egress allowlist: the set of hosts that any URL in a call’s arguments may name, compared as whole lowercased host names. Taught in 28.4 The tool gate, the SQL safety gate, and the prompt-injection suite
- ELBO: the evidence lower bound, reconstruction likelihood minus KL to the prior, maximized to train a VAE. Taught in Chapter 2: Deep Learning
- elementwise kernel: a kernel that reads each element once and does constant work with it, so it is bound by memory bandwidth. Taught in 22.8 Elementwise kernels in C: RMSNorm, RoPE, SiLU-mul, embedding, add, argmax
- elementwise optimizer: an optimizer whose update of each entry depends only on that entry’s gradient, state, and value. Taught in 17.3 Data parallelism and ZeRO stages 1 to 3
- Elo rating: a rating computed from many pairwise wins and losses, as Chatbot Arena does with human votes, that ranks models on general preference. Taught in Chapter 29: LLM Evaluation
- EM: alternating expected counts (E-step) and count-over-total re-estimation (M-step); the likelihood never decreases. Taught in 7.4 The Unigram language model tokenizer
- embedding table: the matrix whose row is the learned vector for token , shared across every window. Taught in 8.2 Bengio’s neural probabilistic language model
- encoder: the network that reads the whole source once; here a bidirectional GRU whose output at each position sees the full sentence. Taught in 10.1 Encoder-decoder with teacher forcing
- encoder: a stack of self-attention and feed-forward layers that reads the whole source once. Taught in 11.5 Encoder-decoder Transformer: post-LN and pre-LN, Noam, label smoothing
- end-to-end header: a header meant for the final recipient, which a proxy copies. Taught in 25.1 The tracer gateway
- endpoint picker: a router that chooses a model-server pod per request from engine metrics, prefix affinity, and loaded adapters. Taught in 20.7.5 Adapter fleets and operations
- engine thread: the single OS thread that owns the scheduler, block manager, and runner and runs every step. Taught in 23.6 tl-serve: OpenAI-compatible HTTP + SSE on tokio/hyper
- environment override: a
TL_<SECTION>__<KEY>variable that replaces one scalar configuration value. Taught in 25.2 The server skeleton - Erasure request: a person’s request to have their data removed, with its search, rebuild, and model consequences. Taught in 34.1 Privacy and PII policy
- Error budget: the per-output bound a quantized layer must stay within. Taught in 21.5 Quantization: int8, int4 groups, fp8, and the KV cache
- error path: the location of a violation, written
$,$.name, or$.items[i]. Taught in 28.2 Tools, a registry, and JSON Schema argument validation - Escalation channel: the named route through which observed harm is reported. Taught in 38.1 Professional responsibility and disclosure
- Escalation policy: the written rule for when a request leaves the cheap path, triggered by confidence, a named category, a verifier, or a human override; category and verifier triggers resist manipulation by untrusted input. Taught in 24.5 Routing implementations and selection
- Eval harness: evaluation built as infrastructure, in which versioned datasets run through a model and a set of composable scorers into an aggregated report, run in CI on every model or prompt change to block regressions. Taught in Chapter 29: LLM Evaluation
- event sourcing: storing state as a sequence of events and computing it as a fold over them. Taught in 28.5 Durable agent runs
- exact match: the fraction of hypotheses equal to their reference after stripping white space at both ends. Taught in 10.5 Sequence metrics: exact match, BLEU, chrF
- Exchange: the request-scoped, lock-protected record through which gateway stages pass data to each other. Taught in 25.2 The server skeleton
- Execution record: the SQL actually run and the rows actually returned, treated as the source of truth. Taught in Chapter 30: Case Study: Grounded SQL Agent
- EXIF orientation: a tag (1 to 8) saying how stored pixels must be flipped or rotated for display. Taught in 14.6 Image preprocessing to the specification
- exp smoothing: sacreBLEU’s replacement of the -th zero precision by . Taught in 10.5 Sequence metrics: exact match, BLEU, chrF
- Exploding and vanishing gradients: gradient norms that grow or shrink like as they travel back through the recurrence. Taught in 9.1 Vanilla RNN with manual BPTT and truncation
- export: renaming and re-laying-out a checkpoint’s tensors so that a standard implementation of a model family reproduces its outputs. Taught in 20.8 From Training Run to Shared Model: Packaging, Publishing, and Use Cases
- Export envelope: the format v1 wire encoding of a sequence’s blocks, with a CRC-32C trailer. Taught in 21.8 A paged KV block pool in C
- exposure bias: the mismatch between training on true tokens and decoding on the model’s own guesses. Taught in 10.1 Encoder-decoder with teacher forcing
- Extrinsic evaluation: measuring whether a model’s outputs are good for a task (correct, helpful, grounded, safe) with benchmarks, judges, and humans; it decides whether a model is fit to ship. Taught in Chapter 29: LLM Evaluation
- F8_E4M3 (fn): an 8-bit float with 4 exponent bits (bias 7) and 3 mantissa bits, no infinity, maximum 448, NaN only at . Taught in 6.7 Safetensors for every dtype, atomic checkpoints, and the token stream
- fail closed: rejecting every request when configuration is missing, rather than accepting them. Taught in 25.1 The tracer gateway
- fail closed: rejecting a request when authorization cannot be confirmed, rather than allowing it. Taught in 25.5 The usage ledger and admin API
- fail closed: denying (here, answering 503) when the policy cannot be evaluated. Taught in 25.6 Usage policy enforcement
- Fail closed: refusing a request (503) when a check cannot be evaluated, rather than allowing it. Taught in 37.1 Usage policy at the gateway
- Fail open: on an error in a control such as a router, let everything run; suited to review or analysis fan-out, where the worst case is a known cost rather than silent loss of coverage. Taught in 24.5 Routing implementations and selection
- failure domain: the set of replicas lost together in one failure (a node, a zone, a cluster); the fleet is sized so the replicas outside the largest one still meet peak load. Taught in 20.7.5 Adapter fleets and operations
- Faithfulness / groundedness: whether every claim in a generated answer is supported by the retrieved context; low faithfulness with good retrieval means the generation stage hallucinated. Taught in Chapter 29: LLM Evaluation
- Fallback rate: the share of token occurrences that are fallbacks. Taught in 7.6 Tokenizer metrics
- Fallback token: the unknown id, or a non-special token whose decoding alone contains U+FFFD. Taught in 7.6 Tokenizer metrics
- fan-in: the number of products one output sums, for a conv, which sets the init scale . Taught in 14.1 Conv layers and pooling on autograd
- Fertility: the mean number of tokens per word, each word encoded alone. Taught in 7.6 Tokenizer metrics
ffn_dim_multiplier: Llama 3’s widening factor applied to the hidden width before rounding. Taught in 13.2 Gated MLPs: SwiGLU and GeGLU- Final-turn-only loss: loss restricted to a selected final response within a conversation. Taught in 18.10 SFT recipes, data strategies, and parameter updates
- Fingerprint: the hex SHA-256 of a chunk’s exact text, used to detect unchanged chunks and reuse their vectors. Taught in 27.1 RAG Ingest: Crawler, Chunker, Embedder, and Store
- First match wins: ordered evaluation in which the first rule whose conditions all hold decides the request. Taught in 37.1 Usage policy at the gateway
- first-match semantics: the first rule whose conditions all hold decides; later rules are not consulted. Taught in 25.6 Usage policy enforcement
- Fisher-Yates shuffle: the in-place permutation algorithm that swaps each position , from the end, with a uniformly chosen position at or below it. Taught in 6.6 Training loop and the autograd bigram
- fixed partition: ranges determined by and alone, never by the thread count. Taught in 22.2 Thread pool and tl_parallel_for
- FlashAttention: attention computed tile by tile with an online softmax, so the score matrix is never stored. Taught in 22.5 FlashAttention forward in C
- flow matching: training a velocity field along straight paths between noise and data, giving fewer, straighter sampling steps. Taught in 5.3 Model landscape and lifecycle
- Forget gate : a sigmoid fraction of the old cell to keep; along the cell path it is the only factor on the gradient. Taught in 9.2 LSTM (torch gate order)
- Forgetting: loss of previously measured capabilities during later adaptation. Taught in 17.5 Training failures, profiling, and recovery
- Fork: creating a child sequence that shares the parent’s blocks by reference. Taught in 21.3 A paged KV cache in Python
- forward KL: , weighted by the teacher; mass-covering. Taught in 18.4 Distillation with forward and reverse KL
- Forward-backward: the log-sum-exp recursions and that give each edge’s posterior probability. Taught in 7.4 The Unigram language model tokenizer
- foundation model: a model pretrained on broad data at scale and then adapted to many downstream tasks. Taught in 5.3 Model landscape and lifecycle
- fp16: a 16-bit format with 5 exponent bits and 10 mantissa bits; finer precision but a maximum of 65504 and a smallest subnormal of . Taught in 17.1 Mixed precision, loss scaling, gradient accumulation, and activation checkpointing
- Free, used, cached: the three block states; cached blocks have ref 0 but stay registered for reuse. Taught in 21.8 A paged KV block pool in C
- frequency ladder: the geometric sequence of angular speeds, from 1 down to about . Taught in 11.4 Positional encodings: sinusoidal, learned
from_op: the single constructor that records an op’s parents and VJP when gradients are wanted. Taught in 6.2 Tensor, broadcasting backward, and no_grad- fsync: a system call that forces written data (or a directory’s entries) to durable storage. Taught in 6.7 Safetensors for every dtype, atomic checkpoints, and the token stream
- fully masked row: a row whose entries are all ; by contract its softmax is all zeros. Taught in 22.4 Softmax in C: three-pass and online two-pass
- fused dequantization: decoding codes into a small buffer that is consumed immediately, so the float32 weight is never stored. Taught in 22.7 Fused int4 and int8 dequantize-matmul in C
- fused loss: a loss implemented as one graph node with a closed-form gradient, instead of a chain of ops. Taught in 6.4 Losses with a fused backward
- Fused op: a whole layer over a whole sequence as one autograd node, with a hand-written backward. Taught in 9.6 RNN language model with stateful TBPTT
- fused projection: an engine-side parameter such as
qkv_projorgate_up_projthat concatenates several checkpoint tensors into one GEMM. Taught in 20.3.4 Portability and load triage
- GAE: an exponentially weighted combination of temporal-difference residuals. Taught in 18.6 PPO with a critic and generalized advantage estimation
- Gain offset: a constant added to the stored gain; 1 reproduces Gemma’s convention of storing . Taught in 13.1 Pre-LN and RMSNorm
- gang admission: admitting all the pods of a multi-pod workload together or none of them, so partial groups never hold GPUs. Taught in 20.7.5 Adapter fleets and operations
- Gated linear unit: two projections of the same input, one passed through an activation and multiplied elementwise into the other. Taught in 13.2 Gated MLPs: SwiGLU and GeGLU
- Gated recurrent unit (GRU): a recurrent cell with one state and two gates, . Taught in 9.3 GRU (torch gate order)
- gateway: a hosted intermediary, such as OpenRouter, that forwards requests to a selected provider endpoint behind one API. Taught in 20.5 LLM Serving Platforms: How They Work and When to Use Them
- Gather: indexing with integer arrays, here
x[idx, arange(B)], whose backward scatters gradients to the source positions. Taught in 9.4 Bidirectional RNN with length-aware reversal - Gauge: a metric that can go up or down, such as queue depth or free KV blocks. Taught in 23.8 Serving metrics and tracing
- GeGLU: the gated MLP with the tanh-approximated GELU on the gate (Gemma). Taught in 13.2 Gated MLPs: SwiGLU and GeGLU
- General category: the Unicode classification (Lu, Ll, Nd, Mc, …) that defines
\p{L}and\p{N}; distinct from Rust’s Alphabetic property. Taught in 7.5 Fast BPE in Rust - general score: the bilinear score . Taught in 10.3 Luong attention and input feeding
- Generalization: performance on relevant examples outside those used to fit or select the model. Taught in 19.8 How models learn: signals, objectives, and the training loop
- generation number: a counter bumped once per job that lets a sleeping worker tell a new job from a spurious wakeup. Taught in 22.2 Thread pool and tl_parallel_for
- generation prompt: the opening of an assistant turn appended by
add_generation_prompt, so the model answers as the assistant. Taught in 23.6 tl-serve: OpenAI-compatible HTTP + SSE on tokio/hyper - Generator: a small masked LM whose samples fill the masked positions. Taught in 12.3 ELECTRA: replaced-token detection
- GGUF: llama.cpp’s single-file quantized model container, readable across llama.cpp, candle, mistral.rs, and Zig bindings. Taught in 20.2 Inference Frameworks: The Cross-Language Landscape
- global gradient norm: the square root of the sum of squares of every gradient entry across all parameters. Taught in 6.6 Training loop and the autograd bigram
- global image: the whole image squeezed to one tile, which carries the layout tiles lose at their seams. Taught in 14.4 Dynamic resolution and tiling
- Golden fixture: frozen JSON vectors of Hugging Face ids that both the Python and Rust implementations are checked against. Taught in 7.5 Fast BPE in Rust
- goodput: throughput that meets the latency SLOs. Taught in Chapter 20: Inference Engines and GPU Deployment
- goodput: the maximum request rate at which a target fraction of requests meet both the TTFT and TPOT SLOs. Taught in 20.4.6 Load tests and the deployment runbook
- Goodput: successful work meeting declared service criteria per unit time. Taught in 20.12 Performance experiments and correctness gates
- Goodput: the share of all requests, failures included, that met every SLO bound. Taught in 23.11 An open-loop load generator
- GPT-2 byte map: the bijection from the 256 bytes to printable code points that gives byte tokens their strings. Taught in 7.1 The tokenizer protocol and the char tokenizer
- GQA / MLA: attention variants that shrink the KV cache by sharing K/V heads across groups of query heads, or by compressing K/V into a low-rank latent. Taught in 5.3 Model landscape and lifecycle
- grad mode: a per-thread flag that controls whether ops record a graph;
no_gradturns it off and restores it. Taught in 6.2 Tensor, broadcasting backward, and no_grad - gradient accumulation: summing the gradients of micro-batches weighted by to reproduce one large batch’s gradient. Taught in 17.1 Mixed precision, loss scaling, gradient accumulation, and activation checkpointing
- gradient clipping: rescaling all gradients together when their global norm exceeds a threshold. Taught in 6.6 Training loop and the autograd bigram
- Gradient norm: a measure of update magnitude before optimizer-specific scaling. Taught in 17.5 Training failures, profiling, and recovery
- grain: the number of indices in each range handed to a worker. Taught in 22.2 Thread pool and tl_parallel_for
- granular noise: the rounding error of a uniform quantizer, with variance . Taught in 20.1.4 Choosing and validating quantization
- granularity: how many scales are kept (per tensor, channel, group, or block), trading metadata for distortion. Taught in 20.1.4 Choosing and validating quantization
- Granule: the unit of matching and splitting, here one block of tokens. Taught in 21.4 A radix prefix cache
- Graph capture: recording a device execution graph for later replay with supported shapes and buffers. Taught in 20.10 Runtime controls and inference flags
- Graph retrieval (GraphRAG): retrieving a connected subgraph of facts from a knowledge graph and resolving its entities to documents, adding multi-hop relationships that flat chunks cannot express. Taught in Chapter 27: Retrieval and RAG
- greedy argmax: selecting the largest logit, with ties broken to the lowest index and NaN skipped. Taught in 22.8 Elementwise kernels in C: RMSNorm, RoPE, SiLU-mul, embedding, add, argmax
- greedy decoding: taking the single most likely token at every step; a beam of size 1. Taught in 10.4 Beam search, generic over a step function
- Greedy longest match: segmenting a word by repeatedly taking the longest vocabulary entry that matches at the current position. Taught in 7.3 WordPiece
- Greedy packing: extending the current chunk with each piece while the joined candidate fits, emitting it otherwise. Taught in 27.1 RAG Ingest: Crawler, Chunker, Embedder, and Store
- Grounding: giving the model the facts it needs, here the schema, through tools rather than relying on its memory. Taught in Chapter 30: Case Study: Grounded SQL Agent
- group: the set of completions sampled for one prompt, whose rewards share a baseline. Taught in 18.3 Group relative policy optimization with verifiable rewards
- Group quantization: one scale per consecutive columns of a row. Taught in 21.5 Quantization: int8, int4 groups, fp8, and the KV cache
- group scale: one scale shared by consecutive columns of a weight row, applied once to the group’s partial sum. Taught in 22.7 Fused int4 and int8 dequantize-matmul in C
- grouped convolution: a convolution whose channels split into independent groups, giving a block-diagonal weight matrix. Taught in 14.1 Conv layers and pooling on autograd
- Grouped-query attention (GQA): query heads share key/value heads, each serving a contiguous group of query heads. Taught in 13.5 Grouped-Query Attention with a Cache Hook, Windows, and Sinks
- GRPO: a PPO-style RL method that replaces the critic with the group-normalized reward of several samples of the same prompt. Taught in 19.7 The training step and validation
- Half layout: pair is ; used by Hugging Face Llama-family checkpoints. Taught in 13.3 Rotary Position Embeddings
- half-open window: a time range
[since, until)that includes its start and excludes its end. Taught in 25.5 The usage ledger and admin API - Hard negative: a near-miss example that looks relevant but is not, the most informative kind of negative. Taught in 16.3 Embeddings, small models, and platforms
- head: one attention run inside its own slice of the projected features. Taught in 11.3 Multi-head attention
- Head: a small layer, usually one Linear, that maps a backbone’s hidden states to a task’s outputs. Taught in 12.5 Fine-tuning heads and the linear-head export
- head-of-line admission: admitting in rank order and stopping at the first request that does not fit. Taught in 23.3 Continuous batching scheduler with priority and preemption
- Heartbeat: the periodic
WorkerStatusan engine sends to the gateway’s registry; three missed beats evict the worker. Taught in 23.7 Disaggregated prefill and decode - heartbeat: a periodic status message from a worker; its absence is the liveness signal. Taught in 25.4 Routing, cascades, and failover
- hidden states: the block inputs and outputs, before the final norm, that a VLM can tap. Taught in 14.3 Vision transformer encoder
- high-water mark: the largest
bytes_usedthe arena has ever reached, used to size it. Taught in 22.1 C runtime support and an arena allocator with marks - Histogram: counts of observations in fixed buckets plus sum and count, from which quantiles can be estimated and aggregated across replicas. Taught in 23.8 Serving metrics and tracing
- HNSW (hierarchical navigable small world): the dominant ANN index, a multi-layer proximity graph searched by greedy descent, tuned with
MandefSearchfor recall against latency. Taught in Chapter 27: Retrieval and RAG - Hold-back: delaying any streamed suffix that could still become a stop string. Taught in 21.2 The KV cache, incremental decoding, and generate
- hop-by-hop header: a header that describes one connection only and is not forwarded across a proxy. Taught in 25.1 The tracer gateway
- Hybrid retrieval: running dense (embedding) and lexical (such as BM25) retrieval together and fusing their ranked lists, because dense search catches paraphrases and lexical search catches exact IDs, codes, and names. Taught in Chapter 27: Retrieval and RAG
- HyDE (hypothetical document embeddings): a query transform that has a model write a hypothetical answer and embeds that instead of the raw query, improving recall when queries and documents are phrased differently. Taught in Chapter 27: Retrieval and RAG
- hypothesis: a prefix in the beam, with its tokens, log-probability, score, and whether it has finished. Taught in 10.4 Beam search, generic over a step function
- Identity path: the term in the Pre-LN Jacobian that carries the gradient straight from the loss to the embedding. Taught in 13.1 Pre-LN and RMSNorm
- Identity uses: speaker identification and face recognition, prohibited on every source. Taught in 34.2 Consent and biometric evidence in model cards
ignore_index: a target value marking a row (usually padding) that contributes no loss, no gradient, and no count to the mean. Taught in 6.4 Losses with a fused backwardignore_index: the target value () thatcross_entropyskips, used for positions with nothing to predict. Taught in 9.5 ELMo: biLM, ScalarMix, linear probes- im2col: the linear map that copies each receptive field of an image into a column, so a convolution becomes a matmul. Taught in 14.1 Conv layers and pooling on autograd
- importance ratio: for a sample drawn from the old policy. Taught in 18.3 Group relative policy optimization with verifiable rewards
include_usage: thestream_optionsflag that makes an engine send a final usage chunk in a stream. Taught in 25.5 The usage ledger and admin API- incoherence: the property, produced by random rotation, that a vector’s mass is spread evenly with no outlier coordinates. Taught in 20.1.4 Choosing and validating quantization
- Incremental detokenizer: a decoder that emits text only when it is final, keeping the pieces equal to
decode(all ids). Taught in 21.2 The KV cache, incremental decoding, and generate - indeterminate step: a write that started and has no recorded result, whose outcome the program cannot know. Taught in 28.5 Durable agent runs
- inductive bias: the assumptions about data structure that an architecture builds in, such as locality for CNNs or a summarizing state for RNNs. Taught in Chapter 3: Neural Architectures and Their History
- Inertia: the sum of squared distances from each point to its assigned centroid. Taught in Chapter 31: Case Study: K-Means Optimization
- inference engine: software that loads weights, schedules requests, manages the KV cache, and generates tokens (vLLM, SGLang, TensorRT-LLM, llama.cpp). Taught in 20.5 LLM Serving Platforms: How They Work and When to Use Them
- InfoNCE: a softmax cross-entropy that picks the matching item from a batch of candidates; CLIP applies it in both directions. Taught in 14.5 Contrastive image-text: CLIP and SigLIP
- input feeding: Luong’s practice of feeding the previous attentional state into the next decoder input. Taught in 10.1 Encoder-decoder with teacher forcing
- input feeding: concatenating to the next decoder input so the decoder remembers where it looked. Taught in 10.3 Luong attention and input feeding
- Input gate , candidate , output gate : how much new content to write, the signed content itself, and how much of to expose as . Taught in 9.2 LSTM (torch gate order)
- Intended send time: , the time from which request ‘s latency is charged. Taught in 23.11 An open-loop load generator
- interleaved layout: sin at column and cos at column , the pair layout of the paper. Taught in 11.4 Positional encodings: sinusoidal, learned
- Interleaved layout: pair is ; used by RoFormer and Meta’s original code. Taught in 13.3 Rotary Position Embeddings
- interpolation: mixing a discounted higher-order estimate with the lower-order estimate at every context, weighted by . Taught in 8.1 n-gram language model with interpolated modified Kneser-Ney
- Intrinsic evaluation: measuring how well a model predicts held-out text, with cross-entropy, perplexity, or bits per byte; cheap and automatic, ideal for steering training, but blind to usefulness. Taught in Chapter 29: LLM Evaluation
- inverse CDF sampling: drawing and returning the smallest with . Taught in 6.1 Byte bigram: counts, logits, safetensors v0
- Inverse CDF sampling: mapping one uniform to the first id whose cumulative probability exceeds it. Taught in 21.1 Sampling and logit processors
- inverse CDF sampling: drawing and returning the first id whose cumulative probability exceeds . Taught in 23.1 Your first endpoint: a std-only Rust HTTP/1.1 + SSE server
- Inverse frequency: (,
inv_freq): the per-pair rotation rate, , forming a geometric ladder. Taught in 13.3 Rotary Position Embeddings - Inverse permutation: (
inv_perm): the map from each assignment to its sorted slot, used to put outputs back. Taught in 13.8 Mixture of Experts - inverted dropout: zeroing elements with probability and scaling survivors by during training, so evaluation is the identity. Taught in 6.3 The op library and gradcheck_all
- Inverted index: a map from each term to its postings list of chunks and term frequencies. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR
- Involution: a map that is its own inverse, . Taught in 9.4 Bidirectional RNN with length-aware reversal
- IPO: regressing the margin to the target with a squared loss. Taught in 18.2 Direct preference optimization and IPO
- IPv4-mapped IPv6 address: an IPv6 form such as
::ffff:10.0.0.1that denotes an IPv4 address and must be judged as one. Taught in 27.1 RAG Ingest: Crawler, Chunker, Embedder, and Store - Irreducible error: , noise that no model can remove. Taught in Chapter 1: Statistical Learning
- ISQ (in-situ quantization): mistral.rs’s quantization of weights at load time rather than ahead of time. Taught in 20.2 Inference Frameworks: The Cross-Language Landscape
- item bootstrap: resampling whole items with replacement and recomputing the pooled statistic on each resample. Taught in 15.5 Multimodal eval metrics: WER, CER, VQA, captions, zero-shot
- iteration cap: the maximum number of model calls in one run, checked before each call. Taught in 28.3 The agent loop
- ITL: inter-token latency, the gap between consecutive content chunks of a stream. Taught in 23.11 An open-loop load generator
- IVF (inverted file index): a vector index that clusters rows around centroids and scans only the
nprobenearest clusters. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR
- JEPA: a non-generative self-supervised architecture that predicts the embedding of a masked target rather than reconstructing it. Taught in 5.3 Model landscape and lifecycle
- journal: the append-only, fsynced list of records that is a run’s only state. Taught in 28.5 Durable agent runs
- k-block: a run of consecutive k values whose products are summed from 0 before being added to . Taught in 22.3 Cache-blocked, packed, batch-invariant matmul in C
- k-means++: a seeding rule that picks each new centroid with probability proportional to its squared distance from the nearest seed. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR
- k-means++: seeding that picks each new centroid with probability proportional to its squared distance from the nearest chosen one. Taught in Chapter 31: Case Study: K-Means Optimization
- K-quants / i-quants: llama.cpp’s weight quantization schemes for GGUF files; k-quants mix precision per block, and i-quants choose precision guided by an importance matrix measured on sample data. Taught in Chapter 26: Edge and Realtime Inference
- kernel / tensor core layer: the code that performs matmul, attention, and dequantization on a specific CPU or GPU backend. Taught in 20.2 Inference Frameworks: The Cross-Language Landscape
- Kernel trick: replacing inner products with a kernel to fit non-linear boundaries without computing the feature map. Taught in Chapter 1: Statistical Learning
- key: an encoder output, scored against the query and also read as the value. Taught in 10.2 Bahdanau additive attention
- key bias redundancy: a bias on keys shifts every score of a query equally, so softmax cancels it. Taught in 15.2 Whisper encoder: conv stem, sinusoids, pre-LN blocks
- key mask: a mask applied to attention keys so padded tokens get zero weight in every query’s sum. Taught in 14.3 Vision transformer encoder
- key-padding mask: per sequence, blocking padded keys. Taught in 11.2 Masks: causal, padding, sliding window, additive
- keyword: one constraint in a JSON Schema, such as
type,required, orpattern. Taught in 28.2 Tools, a registry, and JSON Schema argument validation - KV cache: the stored keys and values of all processed tokens, per layer, that let each new token attend without recomputation. Taught in Chapter 20: Inference Engines and GPU Deployment
- KV cache: per-layer storage of past keys and values, so each decode step processes only the new token. Taught in 21.2 The KV cache, incremental decoding, and generate
- KV envelope: the
kv-block.mdbyte format: a 28-byteTLKVheader, per-block records (hash, fill, f16 payload), and a trailing CRC-32C. Taught in 23.7 Disaggregated prefill and decode - KV handle: the id under which D holds a completed push’s blocks until the resumed request claims them or the gateway releases them. Taught in 23.7 Disaggregated prefill and decode
- KV handle: the id under which a decode worker holds KV blocks pushed by a prefill worker. Taught in 25.4 Routing, cascades, and failover
- KV pool: the GPU memory left for KV cache after weights and activation headroom; it sets maximum concurrency. Taught in 20.4.6 Load tests and the deployment runbook
- label smoothing: mixing the one-hot target with a uniform distribution over all classes, weight . Taught in 6.4 Losses with a fused backward
- label smoothing: training against instead of a one-hot target. Taught in 11.5 Encoder-decoder Transformer: post-LN and pre-LN, Noam, label smoothing
- Label smoothing: replacing a hard classification target with a specified mixture of label directions. Taught in 18.11 Preference optimization: DPO variants and related objectives
- : the weight on the discriminator loss in , 50 by default. Taught in 12.3 ELECTRA: replaced-token detection
- Lane: one contiguous stretch of the stream; row of every window comes from lane . Taught in 9.6 RNN language model with stateful TBPTT
- lanes: independent partial accumulators over interleaved positions that break the addition dependency chain. Taught in 22.7 Fused int4 and int8 dequantize-matmul in C
- last chunk: the chunk that reaches the end of a sequence, the only chunk whose logits are sampled. Taught in 23.4 Chunked prefill (mixed prefill + decode batches)
- Latent: (): the normalized -dimensional summary of a token that the cache holds. Taught in 13.6 Multi-Head Latent Attention and Weight Absorption
- Lattice: the graph over positions of a word whose edges are vocabulary pieces; segmentations are paths. Taught in 7.4 The Unigram language model tokenizer
- LayerNorm: per-row normalization by the population mean and variance with inside the square root, then an affine map. Taught in 6.5 Module system and basic layers
- Lazy deletion: keeping stale heap entries and correcting them when popped instead of updating them in place. Taught in 7.2 Byte-level BPE
- Lazy heap: a priority queue supporting removal by handle, used here to drop pairs a merge destroys. Taught in 7.5 Fast BPE in Rust
- lead time: the delay from an autoscaling decision to a replica serving traffic, including node provisioning and cold start. Taught in 20.7.5 Adapter fleets and operations
- LeaderWorkerSet: a Kubernetes workload that creates, restarts, and scales a multi-pod replica as one unit. Taught in 20.7.5 Adapter fleets and operations
- leaf: a tensor created directly (a parameter or input) rather than by an op; its
.gradaccumulates. Taught in 6.2 Tensor, broadcasting backward, and no_grad - learned position table: an embedding of
max_lenrows indexed by position, trained like any parameter. Taught in 11.4 Positional encodings: sinusoidal, learned - Learned sink: a per-head extra logit in every softmax row, dropped afterwards, letting a head attend to nothing. Taught in 13.5 Grouped-Query Attention with a Cache Hook, Windows, and Sinks
- Learned sink: a per-head logit added to the softmax denominator and attached to no value. Taught in 13.7 Sliding Windows and Attention Sinks
- learned sink: a per-head extra logit with no value that joins the denominator and absorbs attention weight. Taught in 22.5 FlashAttention forward in C
- Ledger: the per-run numbering of every chunk the agent has been shown, shared by all its searches. Taught in 27.3 Context Assembly, Citations, and the search_docs Tool
- Ledger: the append-only record of every fetched source, binding its reviewed license to the sha256 of the bytes received. Taught in 33.1 Data licensing and the ledger
- length mask: the boolean array marking real source positions. Taught in 10.2 Bahdanau additive attention
- length penalty: dividing a finished hypothesis’s log-probability by to counter the bias toward short outputs. Taught in 10.4 Beam search, generic over a step function
- Length-aware reversal : the per-sequence permutation that mirrors positions and fixes the padding. Taught in 9.4 Bidirectional RNN with length-aware reversal
- License: the author’s written permission to copy, adapt, or distribute a work under stated conditions. Taught in 33.1 Data licensing and the ledger
- License expression: identifiers combined with
OR(either may be chosen) orAND(both apply). Taught in 33.1 Data licensing and the ledger - linear head: a classifier followed by softmax, applied to a normalized embedding. Taught in 25.6 Usage policy enforcement
- Linear head: a weight matrix and bias vector that map a normalized embedding to class logits, . Taught in 37.1 Usage policy at the gateway
- Linear policy head: a logistic regression over unit embeddings, stored as a two-row softmax for the gateway. Taught in 12.5 Fine-tuning heads and the linear-head export
- Linear probe: a softmax regression fitted on frozen features to measure what a layer encodes in easily usable form. Taught in 9.5 ELMo: biLM, ScalarMix, linear probes
- linearly separable: a dataset whose classes can be divided by a single hyperplane; the condition for perceptron convergence. Taught in Chapter 3: Neural Architectures and Their History
- Little’s law: , mean in-flight requests equal arrival rate times mean time in system. Taught in 20.4.6 Load tests and the deployment runbook
- live / routable: a worker whose last heartbeat is within / a live worker that is not draining and whose model is not drained. Taught in 25.4 Routing, cascades, and failover
- Live state: a DFA state from which some accepting state is reachable. Taught in 21.7 Constrained decoding: from regex to token masks
- liveness (
/healthz): whether the process is alive and should not be restarted. Taught in 25.2 The server skeleton - Llama 3 scaling: wavelength bands with a smooth blend between keep and divide, no temperature. Taught in 13.4 Context Extension: PI, NTK, YaRN, Llama 3 Scaling, and ALiBi
- llama.cpp: a dependency-light C/C++ inference engine built on the
ggmltensor library that runs quantized LLMs on CPU and GPU; together with GGUF it is the standard end-to-end path for running a model locally. Taught in Chapter 26: Edge and Realtime Inference - LLM judge: a language model used as a scorer, treated as a noisy instrument whose malformed replies are missing readings. Taught in 29.3 LLM judge with position control
- Lloyd–Max quantizer: the MSE-optimal scalar quantizer for a known distribution. Taught in 20.1.4 Choosing and validating quantization
- Lloyd’s algorithm: alternating assignment to the nearest centroid and recomputation of centroids as means. Taught in Chapter 31: Case Study: K-Means Optimization
- load: the gateway’s in-flight count for a worker plus the worker’s reported queue depth. Taught in 25.4 Routing, cascades, and failover
- Load-balancing loss: Switch Transformer’s , equal to at perfect balance. Taught in 13.8 Mixture of Experts
- Local artifact: a complete revision of the files needed to construct and tokenize the model. Taught in 20.14 Local training, serving, and validation lab
- Lock: a count on a node and its ancestors that keeps them from eviction while a request reads them. Taught in 21.4 A radix prefix cache
- lock (radix): a count on a tree node that keeps eviction from taking it while a request uses its blocks. Taught in 23.5 Block manager with prefix cache (none, hash, radix)
- Log-linear histogram: a histogram with 128 equal buckets per power of two, giving at most 1/128 relative error in fixed memory. Taught in 23.11 An open-loop load generator
- log-mel clip: the floor applied to mel energies, computed over the kept frames of the whole window. Taught in 15.1 Audio frontend: WAV parsing and Whisper’s log-mel
- Log-sum-exp (lse): the log of a row’s softmax denominator, kept so tiled kernels can merge partial results. Taught in 13.7 Sliding Windows and Attention Sinks
- log-sum-exp (lse): , the log of a row’s full denominator, used to merge partial attention results. Taught in 22.5 FlashAttention forward in C
- logit parity: agreement between the outputs of the training code and an independent loader on the same inputs, the test of a correct export. Taught in 20.8 From Training Run to Shared Model: Packaging, Publishing, and Use Cases
- Logit processor: a step that rewrites the logits (a penalty, temperature, or filter) before the softmax. Taught in 21.1 Sampling and logit processors
- logit scale (temperature): the learned factor that multiplies cosines before the loss. Taught in 14.5 Contrastive image-text: CLIP and SigLIP
- logits: unnormalized log-scores that softmax turns into probabilities; here the table stores . Taught in 6.1 Byte bigram: counts, logits, safetensors v0
- logits: the unnormalized scores whose softmax is the next-token distribution. Taught in 8.2 Bengio’s neural probabilistic language model
- logits source: anything that returns next-token logits for a complete prefix; a real model window or a recorded trace. Taught in 15.4 Whisper decoding and long-form transcription
- LoRA: a frozen Linear plus a trainable low-rank update . Taught in 12.6 LoRA: low-rank adaptation with PiSSA initialization and merging
- LoRA: fine-tuning a frozen matrix through a trainable low-rank update initialized to zero. Taught in 19.7 The training step and validation
- LoRA / QLoRA: training small low-rank adapters on a frozen base model; QLoRA does so on a 4-bit-quantized base. Taught in 16.3 Embeddings, small models, and platforms
- LoRA adapter: a low-rank update stored separately from the base model. Taught in 20.3.4 Portability and load triage
- LoRA adapter: a pair of low-rank matrices per adapted layer whose product is added to the frozen base weight. Taught in 20.8 From Training Run to Shared Model: Packaging, Publishing, and Use Cases
- Loss masking: computing the SFT loss only on response tokens by labeling prompt positions with
ignore_index. Taught in 19.7 The training step and validation - loss scale: a power of two that multiplies the loss so that small fp16 gradients stay representable; divided out before the update. Taught in 17.1 Mixed precision, loss scaling, gradient accumulation, and activation checkpointing
- Luhn check: the checksum every card number satisfies; the Luhn sum must be a multiple of 10. Taught in 34.1 Privacy and PII policy
- M-RoPE: Qwen2-VL’s multimodal RoPE, giving each token three position ids . Taught in 14.2 2D RoPE and M-RoPE
- managed platform: a service, such as Anyscale, that provisions, operates, and observes clusters on your behalf. Taught in 20.5 LLM Serving Platforms: How They Work and When to Use Them
- manifest: a file written last that lists every other file’s size and sha256, so completeness can be verified. Taught in 6.7 Safetensors for every dtype, atomic checkpoints, and the token stream
- mark: a saved arena position that a later rewind returns to. Taught in 22.1 C runtime support and an arena allocator with marks
- mask: a boolean matrix over (query, key) pairs where True means the query may attend to the key. Taught in 11.2 Masks: causal, padding, sliding window, additive
- Masked language modeling (MLM): training an encoder to recover the original tokens at corrupted positions. Taught in 12.2 BERT: the bidirectional encoder and masked language modeling
- masked text: a same-length copy of a SQL string with comments and literal contents blanked, on which every check runs. Taught in 28.4 The tool gate, the SQL safety gate, and the prompt-injection suite
- master weights: the float32 copy of the parameters and optimizer state that receives every update. Taught in 17.1 Mixed precision, loss scaling, gradient accumulation, and activation checkpointing
- Matryoshka embeddings: embeddings trained so that a truncated prefix of the vector is still usable, letting a system store short vectors cheaply and use longer ones when needed. Taught in Chapter 27: Retrieval and RAG
- Maximal ill-formed subpart: the unit of invalid UTF-8 that decoding with replacement turns into one U+FFFD. Taught in 7.1 The tokenizer protocol and the char tokenizer
- maximal subpart: the longest prefix of a valid UTF-8 sequence; an invalid run is replaced by one U+FFFD per maximal subpart. Taught in 23.1 Your first endpoint: a std-only Rust HTTP/1.1 + SSE server
- MBU / MFU: the fraction of peak memory bandwidth or peak FLOPs an engine actually achieves. Taught in 20.4.6 Load tests and the deployment runbook
- media hash: an FNV-1a-64 hash of a kind byte followed by the original encoded bytes. Taught in 14.6 Image preprocessing to the specification
- memory-bound: limited by the rate at which data can be read, not by arithmetic throughput. Taught in 22.7 Fused int4 and int8 dequantize-matmul in C
- merge heads: transpose back to
[B, T, H, d_h], then reshape to[B, T, d]. Taught in 11.3 Multi-head attention - Merge rank: a merge’s position in the learned
mergeslist; lower ranks were learned earlier and apply first when encoding. Taught in 7.2 Byte-level BPE - Merging: folding into and restoring the plain Linear for serving. Taught in 12.6 LoRA: low-rank adaptation with PiSSA initialization and merging
- meta device: a PyTorch device that records tensor shapes without allocating memory, used to build a model skeleton before filling it from a checkpoint. Taught in 20.3.4 Portability and load triage
- Metaspace: the pre-tokenizer that replaces spaces with
▁, prepends one, and splits before each▁. Taught in 7.4 The Unigram language model tokenizer - meter: the innermost gateway stage, which writes one usage row per request after the response ends. Taught in 25.5 The usage ledger and admin API
- MFU: model FLOPs utilization, useful model FLOPs per second divided by the hardware’s peak. Taught in 19.7 The training step and validation
- micro-kernel: the innermost loop that computes an tile of partial sums in registers. Taught in 22.3 Cache-blocked, packed, batch-invariant matmul in C
- middleware: a function from handler to handler that can act before, after, or instead of the next handler. Taught in 25.2 The server skeleton
- MIG: hardware partitioning of one GPU into isolated instances, each requested as its own resource. Taught in 20.7.5 Adapter fleets and operations
- Min-p: a filter that keeps tokens with probability at least times the top token’s. Taught in 21.1 Sampling and logit processors
- mixed batch: one forward step containing both decode sequences and prefill chunks. Taught in 23.4 Chunked prefill (mixed prefill + decode batches)
- Mixture of experts (MoE): a layer of many expert MLPs of which a router picks per token. Taught in 13.8 Mixture of Experts
- MMR (maximal marginal relevance): greedy selection that trades relevance against similarity to items already picked. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR
- Model card: the model’s interface documentation: details, intended and out-of-scope use, evaluation with uncertainty, limitations, and data. Taught in 35.1 Datasheet and model card
- Model recall: how often a router selects the model that would have succeeded when that model was in the pool; the main reason real routers fall short of the oracle. Taught in 24.5 Routing implementations and selection
- Model registry: the store of versioned, signed model weights between evaluation and serving. Taught in 16.3 Embeddings, small models, and platforms
- model registry: the engine’s map from an
architecturesname to its own implementation of that model. Taught in 20.6 Inside an Inference Engine: How vLLM and SGLang Run a Model - model router: a policy, such as RouteLLM’s, that predicts before generation whether a stronger or weaker model should answer a request. Taught in 20.5 LLM Serving Platforms: How They Work and When to Use Them
- model runner: the component that loads a checkpoint and runs one batched forward step, writing K and V into the pool and returning last-token logits. Taught in 23.2 Candle model runner (Llama + bigram, int4), Rust KV cache, sampler and PCG32
- Model selection: the routing decision of which model should answer a request, made by rules, a classifier, or a learned scorer; distinct from choosing the endpoint that serves the model and from fallback after an error. Taught in 24.5 Routing implementations and selection
- model type: the
config.jsonfield that names the forward-pass code an engine must use; architecture travels as this name, not as code. Taught in 20.8 From Training Run to Shared Model: Packaging, Publishing, and Use Cases - Model zoo: the manifest-driven report that scores every model family in its own unit, one row per entry. Taught in 12.7 The evaluation harness and the model zoo
- Model zoo: the table that scores every model family the system trained on the same held-out text. Taught in A.1 Capstone: TinyStories, owned end to end
- modified Kneser-Ney: Kneser-Ney with three discounts per order (, , ) estimated from counts of counts. Taught in 8.1 n-gram language model with interpolated modified Kneser-Ney
- modified precision: , clipped matches over hypothesis n-grams of order . Taught in 10.5 Sequence metrics: exact match, BLEU, chrF
- module: an object that owns parameters and child modules, discovered through attribute assignment. Taught in 6.5 Module system and basic layers
modules_to_save: modules kept fully trainable alongside LoRA adapters, here the new head. Taught in 12.5 Fine-tuning heads and the linear-head export- Monte Carlo p-value: , an estimate from random relabelings that counts the observed one and is never zero. Taught in 23.12 Run comparison and the regression gate
- Moore minimization: refining a partition of states until no block splits, merging states with the same futures. Taught in 21.7 Constrained decoding: from regex to token masks
mrope_section: the split of a head’s pairs into consecutive sections, each driven by the time, row, or column id. Taught in 14.2 2D RoPE and M-RoPE- MRR: the reciprocal of the rank of the first relevant result. Taught in 29.2 Agent evaluation scorers
- Multi-head latent attention (MLA): attention whose keys and values are rebuilt per head from a cached low-rank latent of each token. Taught in 13.6 Multi-Head Latent Attention and Weight Absorption
- multi-LoRA serving: one base model serving many adapters in the same batch with a batched low-rank kernel. Taught in 20.8 From Training Run to Shared Model: Packaging, Publishing, and Use Cases
- Multi-query attention (MQA): all query heads share one key/value head. Taught in 13.5 Grouped-Query Attention with a Cache Hook, Windows, and Sinks
- MXFP4: blocks of 32 FP4 E2M1 codes sharing one power-of-two E8M0 scale. Taught in 21.5 Quantization: int8, int4 groups, fp8, and the KV cache
- N-gram draft: a draft that picks, token by token, the most frequent continuation of the last few tokens in the context, ties to the lowest id. Taught in 23.9 Speculative decoding in the engine
- n-gram model: a language model that conditions each token only on the previous tokens. Taught in 8.1 n-gram language model with interpolated modified Kneser-Ney
- nDCG@k: discounted cumulative gain over the first ranks, divided by the DCG of the ideal ranking. Taught in 29.2 Agent evaluation scorers
- Nearest-rank quantile: the -th smallest value, here with a allowance for float rounding. Taught in 23.11 An open-loop load generator
- negative log-likelihood (NLL): the mean of over the predicted tokens, in nats per token. Taught in 6.1 Byte bigram: counts, logits, safetensors v0
- negative sampling: replacing the softmax with logistic classification of the real context against words drawn from a noise distribution. Taught in 8.3 word2vec skip-gram with negative sampling, and the PPMI-SVD baseline
- NFA: a finite automaton that may be in several states at once, with -edges that consume nothing. Taught in 21.7 Constrained decoding: from regex to token masks
- nibble: four bits; an int4 byte holds two codes, low nibble first. Taught in 22.7 Fused int4 and int8 dequantize-matmul in C
- Nibble packing: two 4-bit two’s complement codes per byte, even column in the low nibble. Taught in 21.5 Quantization: int8, int4 groups, fp8, and the KV cache
- NLL floor: the NLL of the unsmoothed count model, the minimum any bigram can reach on a given text. Taught in 6.6 Training loop and the autograd bigram
- Noam schedule: , linear warmup then inverse-square-root decay. Taught in 11.5 Encoder-decoder Transformer: post-LN and pre-LN, Noam, label smoothing
- noise distribution: , the distribution negatives are drawn from. Taught in 8.3 word2vec skip-gram with negative sampling, and the PPMI-SVD baseline
- Noisy-OR: combining independent chances as . Taught in 36.1 Bias and safety evals
- Nonspacing mark (Mn): the Unicode category that accent stripping removes after NFD; spacing marks (Mc) stay. Taught in 7.3 WordPiece
- Nope part: the position-free part of each query and key, the one that can be absorbed. Taught in 13.6 Multi-Head Latent Attention and Weight Absorption
- normalization: lowercasing, trimming outer whitespace and punctuation, and collapsing internal whitespace before exact match. Taught in 29.2 Agent evaluation scorers
- normalizer: the sum that each exponential is divided by. Taught in 22.4 Softmax in C: three-pass and online two-pass
- NPairs: the number of pairs where both sides were scored, on which a metric’s delta rests. Taught in 29.4 Paired A/B experiments
- NTK-aware scaling: raising the base by so the fastest pair is kept and the slowest is divided by . Taught in 13.4 Context Extension: PI, NTK, YaRN, Llama 3 Scaling, and ALiBi
- Objective: the mathematical quantity learning tries to minimize or maximize. Taught in 19.8 How models learn: signals, objectives, and the training loop
- Obligation: a duty an allowed license imposes, such as attribution, share-alike, or notice. Taught in 33.1 Data licensing and the ledger
- observation: one case (and sample) as it moves through the runner, holding the input, output, timing, and annotations. Taught in 29.1 Eval runner
- offset: the absolute position of the first input token, nonzero during cached decoding. Taught in 11.4 Positional encodings: sinusoidal, learned
- On-policy / off-policy: learning about the policy being followed versus learning about a different policy. Taught in 4.4 World models, multiple agents, and RLHF
- on-policy distillation: distillation in which the teacher is evaluated on prefixes the student generated. Taught in 18.4 Distillation with forward and reverse KL
- one-hot product: multiplying a one-hot row vector by , which selects row exactly. Taught in 23.1 Your first endpoint: a std-only Rust HTTP/1.1 + SSE server
- One-sided test: a test that counts only differences in the “worse” direction, so a faster head has near 1. Taught in 23.12 Run comparison and the regression gate
- Online preference collection: collecting and labeling new candidate outputs during learning. Taught in 18.11 Preference optimization: DPO variants and related objectives
- online softmax: computing the maximum and the normalizer in one read by rescaling the running sum whenever the maximum grows. Taught in 22.4 Softmax in C: three-pass and online two-pass
- op library (
F): the module of differentiable functions, each a NumPy forward plus one closed-form VJP joined byfrom_op. Taught in 6.3 The op library and gradcheck_all - Op order: the fixed sequence of random draws that makes masking reproducible across implementations. Taught in 12.2 BERT: the bidirectional encoder and masked language modeling
- Open loop: a load model in which arrivals follow a schedule regardless of how the server responds. Taught in 23.11 An open-loop load generator
- open-loop load test: a benchmark that sends requests at a fixed arrival rate regardless of responses, exposing queueing. Taught in 20.4.6 Load tests and the deployment runbook
- OpenAI-compatible API: the de facto HTTP contract that lets clients switch between serving frameworks unchanged. Taught in 20.2 Inference Frameworks: The Cross-Language Landscape
- Optimizer: the rule that updates trainable parameters using gradients and state. Taught in 19.8 How models learn: signals, objectives, and the training loop
- Oracle and mutant: a correct scripted solution that must pass, and a deliberately wrong one that must fail on an expected criterion. Taught in Chapter 32: Case Study: Agent Evaluation Harness
- Oracle router: a policy that assigns each task to the model with the best measured outcome after seeing every result, breaking ties on cost; it is an upper bound on what routing could gain, not a router that can be deployed. Taught in 24.5 Routing implementations and selection
- OTLP/HTTP JSON: the OpenTelemetry export format used here, one
ExportTraceServiceRequestPOSTed to/v1/traces. Taught in 23.8 Serving metrics and tracing - Out-of-scope list: the uses a model must not serve, written so a gateway rule can enforce them. Taught in 35.1 Datasheet and model card
- Outcome reward: feedback on a final answer or result. Taught in 18.7 Rewards, preference models, and independent evaluation
- Outcome, evidence, grade: how execution ended, whether its record is complete and consistent, and whether every criterion passed. Taught in Chapter 32: Case Study: Agent Evaluation Harness
OutOfBlocks: the error an append raises, before changing anything, when the pool cannot satisfy it. Taught in 21.3 A paged KV cache in Python- Over-refusal rate: the share of benign prompts the model refuses, the guard against passing by refusing everything. Taught in 36.1 Bias and safety evals
- Overlap: concurrent execution of independent communication and computation. Taught in 17.4 Parallelism, topology, and the global training batch
- Overstatement: a claim whose literal words are true but whose likely reading exceeds the evidence. Taught in 38.1 Professional responsibility and disclosure
- p-value: the fraction of null arrangements at least as extreme as the observed one, with a correction. Taught in 29.4 Paired A/B experiments
- packed in_proj: torch’s
[3d, d]stack of , rows in q, k, v order. Taught in 11.3 Multi-head attention - packing: concatenating several short examples into one fixed-length row to reduce padding. Taught in 18.1 Supervised fine-tuning: chat rendering, assistant-only loss, packing
- packing: copying a block of an operand into the exact, contiguous order the micro-kernel reads, padded with zeros to whole tiles. Taught in 22.3 Cache-blocked, packed, batch-invariant matmul in C
- Padding mask: a per-step boolean that freezes a finished sequence’s state and zeros its output. Taught in 9.2 LSTM (torch gate order)
- paged KV cache: a cache stored as fixed-size blocks anywhere in a pool, with a per-sequence table mapping logical blocks to physical ones. Taught in 22.6 Paged attention for decode in C
- PagedAttention: KV-cache management in fixed-size blocks mapped through a block table, like virtual memory. Taught in Chapter 20: Inference Engines and GPU Deployment
- paired bootstrap: a bootstrap that resamples whole pairs, so the two arms are never drawn independently. Taught in 29.4 Paired A/B experiments
- paired delta: the per-case difference between the experiment’s and the base’s score on the same case. Taught in 29.4 Paired A/B experiments
- Paired difference: the score of a template with one group term minus its score with the other, so template effects cancel. Taught in 36.1 Bias and safety evals
- Paired difference: the per-document difference between two arms, which cancels how hard each document is. Taught in A.1 Capstone: TinyStories, owned end to end
- Paired difference: , the change in one held-out example’s score from the base to the candidate. Taught in A.2 Capstone 2: post-trained TinyStories model
- Paired permutation test: a sign-flip test on per-item score differences between two models scored on the same items. Taught in 12.7 The evaluation harness and the model zoo
- Paired permutation test: a significance test that flips the sign of each at random under the null hypothesis and asks how often the total is as large as observed. Taught in A.2 Capstone 2: post-trained TinyStories model
- pairwise sigmoid loss: SigLIP’s loss, one independent yes-or-no logistic term per pair. Taught in 14.5 Contrastive image-text: CLIP and SigLIP
- parameter: a
Tensorwithrequires_grad=Trueregistered on a module; the optimizer updates it. Taught in 6.5 Module system and basic layers - Parameter: a learned number used in the model’s computation. Taught in 19.8 How models learn: signals, objectives, and the training loop
- Parent/child chunking (small-to-big): retrieving on small, precise chunks but passing the model the larger parent chunk around each hit, for precision in search and context in generation. Taught in Chapter 27: Retrieval and RAG
- parity: the same token id and the same f64 logprob as the Python sampler from the same logits and seed. Taught in 23.2 Candle model runner (Llama + bigram, int4), Rust KV cache, sampler and PCG32
- Partial rotary: rotating only the first entries of each head. Taught in 13.3 Rotary Position Embeddings
- partial rotary: rotating only the first entries of each head and passing the rest through. Taught in 22.8 Elementwise kernels in C: RMSNorm, RoPE, SiLU-mul, embedding, add, argmax
- Partial-distance abandonment: stopping a distance computation once it exceeds the best candidate so far. Taught in Chapter 31: Case Study: K-Means Optimization
- patch embedding: a convolution with kernel equal to stride, equivalent to one linear map applied to each flattened patch. Taught in 14.3 Vision transformer encoder
- patchify: cutting an image into a grid of patches, each embedded as one token. Taught in 5.3 Model landscape and lifecycle
- PCG32: a permuted congruential generator with 64-bit state and an odd stream increment, producing 32-bit outputs from the old state. Taught in 23.1 Your first endpoint: a std-only Rust HTTP/1.1 + SSE server
- Pending token: the token emitted last round but not yet fed to the target’s cache. Taught in 21.6 Speculative decoding: n-gram, prompt-lookup, and model drafts
- Per-channel scale: one scale per output row of a weight. Taught in 21.5 Quantization: int8, int4 groups, fp8, and the KV cache
- percentile bootstrap: an interval read off the sorted means of resamples at exact indices. Taught in 29.1 Eval runner
- Percentile bootstrap CI: an interval from the 2.5th and 97.5th percentiles of a statistic recomputed on resampled documents. Taught in A.1 Capstone: TinyStories, owned end to end
- periodic Hann window: with denominator rather than , the window Whisper’s STFT uses. Taught in 15.1 Audio frontend: WAV parsing and Whisper’s log-mel
- permutation equivariance: permuting key-value pairs permutes only the weight columns and leaves the output unchanged. Taught in 11.1 Scaled dot-product attention (forward and backward)
- permutation equivariance: the property of a transformer without positions. Taught in 14.3 Vision transformer encoder
- Permutation test: a test that compares the observed statistic difference with its distribution over random relabelings of the pooled samples. Taught in 23.12 Run comparison and the regression gate
- Personal data: information about an identified or identifiable person, directly (an email) or indirectly (an IP address). Taught in 34.1 Privacy and PII policy
- pinpoint: one of the candidate resolutions AnyRes may choose, a multiple of the tile size. Taught in 14.4 Dynamic resolution and tiling
- Pipeline bubble: time a stage cannot perform useful work because the schedule has not filled or drained. Taught in 17.4 Parallelism, topology, and the global training batch
- PiSSA: initializing the adapter at the top- singular part of and freezing the residual. Taught in 12.6 LoRA: low-rank adaptation with PiSSA initialization and merging
- pixel budget: the configured maximum
width*height, checked from the header before decompression. Taught in 14.6 Image preprocessing to the specification - pixel shuffle: a permutation that moves an block of tokens into the channels of one token. Taught in 14.4 Dynamic resolution and tiling
- Policy: , the agent’s probability of taking each action in each state. Taught in 4.4 World models, multiple agents, and RLHF
- Policy gradient theorem: an expression for the gradient of expected return that does not require the environment’s dynamics. Taught in 4.4 World models, multiple agents, and RLHF
- Policy lag: the gap between the learner and the policy that produced a rollout. Taught in 18.5 On-policy, off-policy, offline, and online learning
- Pooled WER: total substitutions, deletions, and insertions divided by total reference words, overall or within a group. Taught in 34.2 Consent and biometric evidence in model cards
- Pooling: reducing a row’s hidden states to one vector (
cls,meanover real tokens, orlastreal token). Taught in 12.5 Fine-tuning heads and the linear-head export - Portable transcript: application-owned messages, evidence, and tool outcomes that can be re-encoded without depending on a provider continuation id. Taught in 24.1 Designing a Model Router Across APIs, Caches, and Applications
- position bias: a judge’s tendency to prefer whichever answer occupies a particular slot. Taught in 29.3 LLM judge with position control
- Position interpolation: dividing every frequency by the factor so long positions reuse trained angles. Taught in 13.4 Context Extension: PI, NTK, YaRN, Llama 3 Scaling, and ALiBi
- position-sensitive pair: a pairwise comparison whose verdict changed when the answers swapped positions; resolved as a flagged tie. Taught in 29.3 LLM judge with position control
- positional encoding: a vector depending only on position, added to the token embedding so attention can see order. Taught in 11.4 Positional encodings: sinusoidal, learned
- post-LN: , the paper’s placement; needs warmup. Taught in 11.5 Encoder-decoder Transformer: post-LN and pre-LN, Noam, label smoothing
- Post-LN: normalization applied after the residual addition, . Taught in 12.2 BERT: the bidirectional encoder and masked language modeling
- Post-LN: the 2017 step , which normalizes the residual stream itself. Taught in 13.1 Pre-LN and RMSNorm
pos_weight: a multiplier on the positive-class term of binary cross-entropy. Taught in 6.4 Losses with a fused backward- PPMI: positive pointwise mutual information, . Taught in 8.3 word2vec skip-gram with negative sampling, and the PPMI-SVD baseline
- PPO: a policy gradient method that clips the new-to-old probability ratio to keep updates small. Taught in 4.4 World models, multiple agents, and RLHF
- pre-LN: with one final LN per stack; trains without warmup. Taught in 11.5 Encoder-decoder Transformer: post-LN and pre-LN, Noam, label smoothing
- Pre-LN: the residual step , which normalizes only the branch input. Taught in 13.1 Pre-LN and RMSNorm
- pre-LN block: a residual block whose branches normalize their input,
x + branch(LN(x)), leaving the stream itself unnormalized. Taught in 15.2 Whisper encoder: conv stem, sinusoids, pre-LN blocks - Pre-token: a piece of text produced by the pre-tokenizer; no merge may cross its boundary. Taught in 7.2 Byte-level BPE
- Precision: of the strings a detector flagged, the share that were personal data, . Taught in 34.1 Privacy and PII policy
- preemption by recompute: freeing a running request’s blocks and later prefilling its whole sequence again. Taught in 23.3 Continuous batching scheduler with priority and preemption
- preference margin: , how much more the policy prefers the chosen completion than the reference does. Taught in 18.2 Direct preference optimization and IPO
- prefill: the compute-bound forward pass over the whole prompt that populates the KV cache and determines TTFT. Taught in Chapter 20: Inference Engines and GPU Deployment
- Prefill: the first forward pass over the whole prompt. Taught in 21.2 The KV cache, incremental decoding, and generate
- Prefill/decode disaggregation: running prompt prefill and token decode on separate engines, so the two phases stop competing for one batch. Taught in 23.7 Disaggregated prefill and decode
PrefillPolicy: the trait that decides how many prompt tokens a step may prefill for a request. Taught in 23.3 Continuous batching scheduler with priority and preemption- Prefix cache: a map from token prefixes of past prompts to the KV blocks already computed for them. Taught in 21.4 A radix prefix cache
- prefix cache: a store of finished requests’ full KV blocks, reused by later requests whose prompts begin with the same tokens. Taught in 23.5 Block manager with prefix cache (none, hash, radix)
- Prefix distribution: the histories on which teacher and student predictions are evaluated. Taught in 18.9 Distillation data, student rollouts, and deployment
- Prefix index: the map from block hash to block id. Taught in 21.8 A paged KV block pool in C
- Presence and frequency penalties: OpenAI’s additive costs on generated ids, flat and per-occurrence respectively. Taught in 21.1 Sampling and logit processors
- Process group: ranks cooperating in a particular collective or parallel axis. Taught in 17.4 Parallelism, topology, and the global training batch
- Process reward: feedback on intermediate steps or actions. Taught in 18.7 Rewards, preference models, and independent evaluation
- processor config: the
preprocessor_config.jsonthat fixes a model’s resize, crop, and normalization recipe. Taught in 14.6 Image preprocessing to the specification - Product control: an enforced mechanism, such as a usage-policy rule, that makes a claim’s limits hold regardless of who reads the documentation. Taught in 38.1 Professional responsibility and disclosure
- profiling pass: a dummy forward pass at the largest batch, run at startup to measure peak memory before sizing the KV cache. Taught in 20.6 Inside an Inference Engine: How vLLM and SGLang Run a Model
- Prompt caching: a provider feature that bills previously seen prompt-prefix tokens at a reduced rate; caches are per model and usually per provider, so switching models discards them. Taught in 24.5 Routing implementations and selection
- prompt ensemble: the renormalized mean of several prompt templates’ embeddings for one class. Taught in 14.5 Contrastive image-text: CLIP and SigLIP
- prompt injection: instructions written into data (a document, a page, a tool result) that steer the model’s proposals. Taught in 28.4 The tool gate, the SQL safety gate, and the prompt-injection suite
- Prompt lookup: drafting by copying what followed the most recent earlier occurrence of the context’s suffix. Taught in 21.6 Speculative decoding: n-gram, prompt-lookup, and model drafts
- Prompt lookup: a draft that copies what followed the most recent earlier occurrence of the context’s suffix, longest suffix first. Taught in 23.9 Speculative decoding in the engine
- Provenance: the base checkpoint, data revision, tokenizer, template, seed, optimizer, precision, and objective that together reproduce a run. Taught in A.2 Capstone 2: post-trained TinyStories model
- Provider adapter: a translation between application requests/events and one provider API, with explicit checks for unsupported semantics. Taught in 24.1 Designing a Model Router Across APIs, Caches, and Applications
- Provider selection: the routing decision of which endpoint serves an already chosen model, usually made by a gateway on price, availability, or latency; pinning a model name does not pin the provider. Taught in 24.5 Routing implementations and selection
- provider stickiness: a gateway’s best-effort reuse of the same provider for a session to preserve prompt-cache hits. Taught in 20.5 LLM Serving Platforms: How They Work and When to Use Them
- QLoRA: LoRA on a base stored in 4-bit NF4 with double-quantized scales, about 0.516 bytes per parameter. Taught in 19.7 The training step and validation
- QLoRA: LoRA trained against a base stored in 4-bit NF4, cutting training memory to roughly a quarter. Taught in 20.8 From Training Run to Shared Model: Packaging, Publishing, and Use Cases
- q_offset: the absolute position of the first query, which aligns a decode chunk to the bottom right of the full mask. Taught in 11.2 Masks: causal, padding, sliding window, additive
q_offset: the absolute position of the first query in a call, the number of tokens already cached. Taught in 12.4 T5: span corruption and relative position buckets- Quality budget: the maximum allowed regression on a defined evaluation metric and slice. Taught in 20.12 Performance experiments and correctness gates
- query: the decoder state that asks where to look. Taught in 10.2 Bahdanau additive attention
- Quickselect: a selection algorithm that finds the -th smallest value in expected without fully sorting. Taught in 23.12 Run comparison and the regression gate
- Radix tree: a trie whose chains are compressed into labelled edges. Taught in 21.4 A radix prefix cache
- Random composition: a uniform split of items into positive parts, made by shuffling cut-point flags. Taught in 12.4 T5: span corruption and relative position buckets
- rank: a worker’s position in its tensor- or pipeline-parallel group, which decides which slice of every weight it holds. Taught in 20.6 Inside an Inference Engine: How vLLM and SGLang Run a Model
- Rank : the inner dimension of the adapter, bounding the rank of . Taught in 12.6 LoRA: low-rank adaptation with PiSSA initialization and merging
- readiness:
/readyz, which answers 503 while draining so no new traffic is routed; distinct from liveness (/healthz). Taught in 23.6 tl-serve: OpenAI-compatible HTTP + SSE on tokio/hyper - readiness (
/readyz): whether the process should receive new traffic. Taught in 25.2 The server skeleton - Real-time factor (RTF): processing time divided by audio duration; a streaming speech system must keep it below 1 to keep up with live input. Taught in Chapter 26: Edge and Realtime Inference
- Recall: of the personal data present, the share the detector flagged, . Taught in 34.1 Privacy and PII policy
- Recall@k: the fraction of the exact top that an approximate search also returns. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR
- receptive field: the region of the input that a given neuron depends on, which grows with depth. Taught in Chapter 3: Neural Architectures and Their History
- Recipe: objective, masks, normalizations, update schedule, and generation contract taken together. Taught in 18.8 Rollout systems, GRPO variants, and training diagnostics
- reconcile: a signal in which a human records a write’s outcome (
donewith a result) or says to run it again (retry). Taught in 28.5 Durable agent runs - Recovery point: a complete, durable state from which the declared training process can resume. Taught in 17.5 Training failures, profiling, and recovery
- redaction: replacing PII (emails, phones, card numbers, IPs, keys) in text before it is logged. Taught in 25.6 Usage policy enforcement
- reduce-scatter: every rank ends with one chunk of the reduction. Taught in 17.2 Collectives over processes: ring all-reduce
- Reducible error: the part of prediction error due to using instead of , which a better method can reduce. Taught in Chapter 1: Statistical Learning
- reduction: an op that collapses axes (
sum,mean,max,var); its VJP restores the reduced axes and broadcasts. Taught in 6.3 The op library and gradcheck_all - Reduction tree: the grouping and order used to combine partial sums. Taught in 20.13 Batch invariance and numerical reproducibility
- Reference count: the number of sequences holding a block; it returns to the pool at 0. Taught in 21.3 A paged KV cache in Python
- reference count: the number of holders (requests, and in radix mode the cache) of a pool block. Taught in 23.5 Block manager with prefix cache (none, hash, radix)
- Reference execution: a defined implementation used to compare numerical and task behavior. Taught in 20.14 Local training, serving, and validation lab
- reference policy: the frozen model (usually the SFT checkpoint) against which the policy’s log-ratios are measured. Taught in 18.2 Direct preference optimization and IPO
- Reference-free objective: an objective that does not require a separate reference policy in its training formula. Taught in 18.11 Preference optimization: DPO variants and related objectives
- Regime: the range of inputs in which an optimization actually pays. Taught in Chapter 31: Case Study: K-Means Optimization
- registration order: the order layers are created in a
Module, which fixes both the state-dict keys and the order of random initialization draws. Taught in 8.2 Bengio’s neural probabilistic language model - Regression gate: a check that fails a head run only when it is worse than the base by more than a budget and the difference is unlikely under noise. Taught in 23.12 Run comparison and the regression gate
- Regularization: penalizing model complexity to trade bias for lower variance. Taught in Chapter 1: Statistical Learning
- Reinforcement fine-tuning (RFT): tuning a model against an evaluator that returns a reward from 0 to 1 for each output, with gold completions optional; it fits tasks that are verifiable but lack reference answers. Taught in 24.5 Routing implementations and selection
- Rejection-sampling SFT: supervised training on generated examples retained by an explicit selection rule. Taught in 18.10 SFT recipes, data strategies, and parameter updates
- Relative position bucket: an index into a learned bias table, exact for small offsets and logarithmic for large ones. Taught in 12.4 T5: span corruption and relative position buckets
- Release gate: a check that passes a row only when its interval bound clears the limit, and fails missing rows. Taught in 36.1 Bias and safety evals
- Removal loss: how much corpus likelihood is lost if a piece is removed and its text must be spelled another way. Taught in 7.4 The Unigram language model tokenizer
repeat_kv: the expansion that lets query head read kv head . Taught in 13.5 Grouped-Query Attention with a Cache Hook, Windows, and Sinks- Repetition penalty: a Hugging Face rule that divides positive and multiplies negative logits of seen ids by , once per distinct id. Taught in 21.1 Sampling and logit processors
- Replaced-token detection: a per-token binary task, deciding whether each token differs from the original text. Taught in 12.3 ELECTRA: replaced-token detection
- Replay: reusing stored experience, subject to the chosen algorithm’s assumptions. Taught in 18.5 On-policy, off-policy, offline, and online learning
- replay: answering a step from its recorded result instead of executing it. Taught in 28.5 Durable agent runs
- Replay contract: the inputs, environment, and equality criterion promised for reproducing an execution. Taught in 20.13 Batch invariance and numerical reproducibility
- Replay verification: re-executing a record’s calls against a fresh session and comparing every observation and effect before grading. Taught in Chapter 32: Case Study: Agent Evaluation Harness
- replica: one rank’s full copy of the model. Taught in 17.3 Data parallelism and ZeRO stages 1 to 3
- Replica: an independently schedulable copy of the serving model, possibly spread across devices. Taught in 20.11 Serving layouts: one process, replicas, and distributed pools
- Representation collapse: the trivial solution in joint-embedding training where all inputs map to the same embedding. Taught in Chapter 2: Deep Learning
- representation collapse: the failure of joint-embedding training in which all inputs map to the same point. Taught in 5.3 Model landscape and lifecycle
- Representation learning: learning the features themselves, not just a decision rule over given features. Taught in Chapter 2: Deep Learning
- Request generator: the PCG32
samplesub-stream seeded by the request’s seed. Taught in 21.1 Sampling and logit processors - Required and allowed sets: the changes a task must make and the changes it may make; the state criterion is . Taught in Chapter 32: Case Study: Agent Evaluation Harness
- rescale factor: , which converts a sum computed against the old maximum to one against the new. Taught in 22.4 Softmax in C: three-pass and online two-pass
- Reset gate : scales the recurrent contribution to the candidate; makes the candidate depend on the input alone. Taught in 9.3 GRU (torch gate order)
- Reset-after (linear-before-reset) form: torch’s and cuDNN’s , as opposed to Cho’s . Taught in 9.3 GRU (torch gate order)
- Resident parameters: parameters stored on the deployment’s devices or backing memory. Taught in 20.9 Architecture choices and performance limits
- Residual connection: computing so that layers learn a residual and gradients flow directly. Taught in Chapter 2: Deep Learning
- residual connection: a skip path computing , so the block learns only a residual and gradients flow through the identity. Taught in Chapter 3: Neural Architectures and Their History
- Residual distribution: normalized, from which a rejected position is resampled. Taught in 21.6 Speculative decoding: n-gram, prompt-lookup, and model drafts
- Residual distribution: , the distribution sampled on rejection. Taught in 23.9 Speculative decoding in the engine
- Resolved configuration: the values actually selected after defaults and overrides are applied. Taught in 20.10 Runtime controls and inference flags
- Result-set equivalence: scoring an answer by comparing returned rows with gold rows rather than comparing SQL text. Taught in Chapter 30: Case Study: Grounded SQL Agent
- Retrieval-augmented generation (RAG): retrieving relevant evidence at query time and placing it in the context window, so a model answers from fresh, private, citable facts instead of only its parametric memory. Taught in Chapter 27: Retrieval and RAG
Retry-After: a server header giving the wait in seconds, which overrides the backoff formula. Taught in 28.1 Types, an OpenAI-compatible provider, and a retry wrapper- reverse KL: , weighted by the student; mode-seeking. Taught in 18.4 Distillation with forward and reverse KL
- reverse proxy: a server that receives a client’s request, makes a new request to an upstream server, and relays the response. Taught in 25.1 The tracer gateway
- reverse topological order: an ordering in which every node comes after all of its consumers, so its gradient is complete when it is processed. Taught in 6.2 Tensor, broadcasting backward, and no_grad
- Review note: an unresolved checklist item recorded with an owner, a next step, and a done condition. Taught in 38.1 Professional responsibility and disclosure
- revision: a commit sha in a Hub repo; pinning one makes a load reproducible, while
maincan change. Taught in 20.3.4 Portability and load triage - Revision: a hash of everything that determines a run’s result, pinned before the run. Taught in Chapter 32: Case Study: Agent Evaluation Harness
- Revocation: withdrawing a source after the fact, which forces a rebuild of derived data and a retrain or withdrawal of models trained on it. Taught in 33.1 Data licensing and the ledger
- Reward exploitation: improving a proxy score by behavior that misses the intended outcome. Taught in 18.7 Rewards, preference models, and independent evaluation
- Reward hacking: a model learning to satisfy its evaluator or reward function instead of the intended task, caught by inspecting rollouts and stopping when quality regresses. Taught in 24.5 Routing implementations and selection
- ridge point: the intensity that separates memory-bound from compute-bound work. Taught in 20.4.6 Load tests and the deployment runbook
- RIFF chunk: a
<4-byte id> <u32 size> <payload>record, followed by a pad byte when the size is odd. Taught in 15.1 Audio frontend: WAV parsing and Whisper’s log-mel - ring: a topology in which each rank sends only to its right neighbour and receives only from its left. Taught in 17.2 Collectives over processes: ring all-reduce
- RLVR: reinforcement learning whose reward is computed by a program (answer match, tests, schema) rather than a learned model. Taught in 19.7 The training step and validation
- RMSNorm: divides a vector by its root mean square plus eps (inside the root) and multiplies by a learned gain; no mean subtraction, no bias. Taught in 13.1 Pre-LN and RMSNorm
- RMSNorm: normalization by followed by a learned per-channel gain. Taught in 22.8 Elementwise kernels in C: RMSNorm, RoPE, SiLU-mul, embedding, add, argmax
rng_draws_consumed: the number of uniforms P drew for the first token, which D skips so the seeded stream continues exactly. Taught in 23.7 Disaggregated prefill and decode- RNN language model: an embedding, a recurrent layer, and a linear read-out trained to predict the next token. Taught in 9.6 RNN language model with stateful TBPTT
- RNN-Transducer (RNN-T): a streaming speech decoder that combines an audio encoder with a prediction network over emitted tokens and emits output frame by frame; the backbone of on-device voice recognition. Taught in Chapter 26: Edge and Realtime Inference
- Rollback:
truncate(n), resetting every layer’s fill count so later appends overwrite rejected positions. Taught in 21.2 The KV cache, incremental decoding, and generate - Rollback: releasing the KV blocks of rejected draft positions and resetting the last kept block’s fill. Taught in 23.9 Speculative decoding in the engine
- roofline: the bound on a loop’s speed from peak compute , memory bandwidth , and arithmetic intensity . Taught in 22.3 Cache-blocked, packed, batch-invariant matmul in C
- RoPE: rotary position embedding, which rotates queries and keys by position to encode relative position. Taught in 5.3 Model landscape and lifecycle
- RoPE: rotating pair of a query or key at position by , so scores depend only on relative position. Taught in 13.3 Rotary Position Embeddings
- RoPE layout: the rule for which two entries of a head form a rotated pair: half or interleaved . Taught in 22.8 Elementwise kernels in C: RMSNorm, RoPE, SiLU-mul, embedding, add, argmax
- round to nearest, ties to even: rounding to the closest representable value, and on an exact tie to the one whose last bit is 0. Taught in 6.7 Safetensors for every dtype, atomic checkpoints, and the token stream
- Router: the linear gate and selection rule that chooses experts and computes their weights. Taught in 13.8 Mixture of Experts
- row gather: indexing a table by ids to select rows, equivalent to multiplying by one-hot vectors. Taught in 6.1 Byte bigram: counts, logits, safetensors v0
- RRF (reciprocal rank fusion): combining ranked lists by summing over the lists containing each item. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR
- Run manifest: a machine-readable record of a run’s provenance, evaluation method, and claims. Taught in A.2 Capstone 2: post-trained TinyStories model
- running state : a row’s running maximum, denominator, and unnormalized output, rescaled whenever the maximum grows. Taught in 22.5 FlashAttention forward in C
- runtime: the layer that loads weights, executes the model graph, manages the KV cache, and samples tokens. Taught in 20.2 Inference Frameworks: The Cross-Language Landscape
- safetensors: a checkpoint format of an 8-byte header length, a JSON header, and raw little-endian row-major tensor bytes. Taught in 6.1 Byte bigram: counts, logits, safetensors v0
- safetensors: a weight format consisting of an 8-byte little-endian header length, a JSON header of tensor names, dtypes, shapes, and offsets, and a flat byte buffer. Taught in 20.3.4 Portability and load triage
- ScalarMix: , a learned per-task convex combination of layers with a scale. Taught in 9.5 ELMo: biLM, ScalarMix, linear probes
- scale and zero-point: the parameters and of an affine quantizer, mapping a real range onto integer codes. Taught in 20.1.4 Choosing and validating quantization
- scaled dot-product attention: , a weighted average of values with weights from query-key similarity. Taught in 11.1 Scaled dot-product attention (forward and backward)
- Scaled residual init: starting the residual-writing projections at so the stream’s variance does not grow with depth. Taught in 12.1 GPT: the decoder-only language model
- Scaling fit: the least-squares line through measured sizes. Taught in A.1 Capstone: TinyStories, owned end to end
- Scaling laws: empirical power laws relating loss to compute, data, and parameter count. Taught in Chapter 2: Deep Learning
- Scaling : the multiplier on the adapter output that keeps the effective step rank-independent. Taught in 12.6 LoRA: low-rank adaptation with PiSSA initialization and merging
- scatter-add: adding each upstream contribution into its source position with
np.add.at, so repeated reads accumulate. Taught in 6.3 The op library and gradcheck_all - scatter-add: an update that accumulates every contribution to a repeated index (
np.add.at). Taught in 8.3 word2vec skip-gram with negative sampling, and the PPMI-SVD baseline - scheduled sampling: training with probability of feeding the true token and of feeding the model’s argmax. Taught in 10.1 Encoder-decoder with teacher forcing
- score scale: the factor , by default , that keeps score variance at 1 whatever the width. Taught in 11.1 Scaled dot-product attention (forward and backward)
- scorer: a function that grades one observation and returns a score or an error. Taught in 29.1 Eval runner
- scorer: a deterministic function from one observation to a score, or to an error when its input is missing. Taught in 29.2 Agent evaluation scorers
- seam: an interface declared here (
Gate,StepRunner) so the loop can depend on it without importing its implementation. Taught in 28.1 Types, an OpenAI-compatible provider, and a retry wrapper - Secret: a credential, such as an API key, that grants its reader the access of its owner. Taught in 34.1 Privacy and PII policy
- seek: the position in the recording, in 10 ms mel frames, where the next window starts. Taught in 15.4 Whisper decoding and long-form transcription
- Self-attention: a layer in which each position computes a weighted average of all positions’ values, weighted by query-key similarity. Taught in Chapter 2: Deep Learning
- Self-preference bias: an LLM judge’s tendency to favour outputs from its own model family. Taught in Chapter 29: LLM Evaluation
- Sentinel: a reserved id marking one dropped span, counting down from the top of the vocabulary. Taught in 12.4 T5: span corruption and relative position buckets
- Sequence distillation: training on teacher-generated target sequences. Taught in 18.9 Distillation data, student rollouts, and deployment
- server layer: the scheduler and request queue that batch requests and expose an HTTP API. Taught in 20.2 Inference Frameworks: The Cross-Language Landscape
- server-sent event: a group of
text/event-streamlines ended by a blank line, whosedata:lines are joined with\n. Taught in 28.1 Types, an OpenAI-compatible provider, and a retry wrapper - Server-Sent Events (SSE): a
text/event-streambody ofdata: ...events, each terminated by a blank line. Taught in 23.1 Your first endpoint: a std-only Rust HTTP/1.1 + SSE server - server-sent events (SSE): a
text/event-streamresponse ofdata: ...\n\nevents over one long HTTP response. Taught in 25.1 The tracer gateway - serving orchestration: coordinating model replicas and cluster resources across machines, as Ray Serve does, separate from token-level scheduling inside each engine. Taught in 20.5 LLM Serving Platforms: How They Work and When to Use Them
- Session layer: a private copy-on-write view of a shared, immutable world, one per attempt. Taught in Chapter 32: Case Study: Agent Evaluation Harness
- Session-level routing: choosing a model once per task or user turn and holding it, which keeps tool loops coherent and the prompt cache warm at the cost of not correcting mid-turn. Taught in 24.5 Routing implementations and selection
- Shard: one of several safetensors files listed in
model.safetensors.index.jsonfor a large checkpoint. Taught in 13.9 The Llama-Family Model: Config, Weight Loading, and Download - Shared expert: an expert that sees every token with weight 1. Taught in 13.8 Mixture of Experts
- shared prefix block: a physical block named by several sequences’ tables after a fork. Taught in 22.6 Paged attention for decode in C
- shift invariance: for any constant . Taught in 22.4 Softmax in C: three-pass and online two-pass
- shift law: equals with each pair rotated by , independent of . Taught in 11.4 Positional encodings: sinusoidal, learned
- sign permutation test: a test that builds the null distribution of by randomly flipping the sign of each delta. Taught in 29.4 Paired A/B experiments
- SiLU: , the activation in SwiGLU. Taught in 22.8 Elementwise kernels in C: RMSNorm, RoPE, SiLU-mul, embedding, add, argmax
- skip-gram: a model that predicts the context words around each center word. Taught in 8.3 word2vec skip-gram with negative sampling, and the PPMI-SVD baseline
- slab: the
[n_kv_heads][block_tokens][head_dim]region of a block holding K or V for one layer. Taught in 22.6 Paged attention for decode in C - sliding window: the causal mask AND a distance bound , at most keys per query. Taught in 11.2 Masks: causal, padding, sliding window, additive
- Sliding window: a limit so query reads only keys . Taught in 13.5 Grouped-Query Attention with a Cache Hook, Windows, and Sinks
- Sliding window: a limit on how far back a query reads, counting the query itself. Taught in 13.7 Sliding Windows and Attention Sinks
- slot: the fixed index
case * S + samplethat a worker writes its row into, making the report independent of completion order. Taught in 29.1 Eval runner - Smoke test: a small connectivity or basic-behavior check with deliberately limited coverage. Taught in 20.14 Local training, serving, and validation lab
- smooth weighted round robin: a deterministic, interleaved selection in proportion to weights. Taught in 25.4 Routing, cascades, and failover
- softmax VJP: with , the backward of a row-wise softmax. Taught in 11.1 Scaled dot-product attention (forward and backward)
- softplus: , used to write binary cross-entropy without positive exponents. Taught in 6.4 Losses with a fused backward
- Sorted dispatch: grouping assignments by expert with a stable sort so each expert runs once on a contiguous slice. Taught in 13.8 Mixture of Experts
- Source: a component that returns raw documents, such as
DirSourcefor files or the crawler for web pages. Taught in 27.1 RAG Ingest: Crawler, Chunker, Embedder, and Store - span: one operation in a trace, with trace id, span id, parent span id, name, kind, times, and attributes. Taught in 23.1 Your first endpoint: a std-only Rust HTTP/1.1 + SSE server
- Span corruption: replacing whole spans of the input with sentinels and training the decoder to write the spans back. Taught in 12.4 T5: span corruption and relative position buckets
- spatial merge: combining adjacent patches into one language-model token. Taught in 14.2 2D RoPE and M-RoPE
- SPDX identifier: the short, case-sensitive, machine-readable name of a license, such as
CC-BY-4.0. Taught in 33.1 Data licensing and the ledger - Special token: an id with a role (
unk,bos,eos,pad) that enters a sequence only throughadd_special, never by matching input text. Taught in 7.1 The tokenizer protocol and the char tokenizer SpecialSet: the set of added tokens allowed to match in a given text, so servers can refuse forged control tokens. Taught in 7.5 Fast BPE in Rust- Spectral radius : the largest eigenvalue magnitude of , which sets the long-run growth or decay rate of repeated multiplication by . Taught in 9.1 Vanilla RNN with manual BPTT and truncation
- speculative decoding: drafting several tokens cheaply and verifying them in one target-model pass, preserving the output distribution. Taught in Chapter 20: Inference Engines and GPU Deployment
- Speculative decoding: drafting several tokens cheaply and verifying them with one target forward pass, keeping the longest acceptable prefix. Taught in 23.9 Speculative decoding in the engine
- split heads: reshape
[B, T, d]to[B, T, H, d_h], then transpose to[B, H, T, d_h]. Taught in 11.3 Multi-head attention - split-K: parallelizing a matmul by splitting the reduction dimension across threads, which breaks bitwise reproducibility. Taught in 22.3 Cache-blocked, packed, batch-invariant matmul in C
- splitter: a buffered parser that cuts a byte stream into complete SSE events regardless of read boundaries. Taught in 25.3 The SSE streaming proxy
- SSE event: one
data: ...block terminated by a blank line (\n\n) in atext/event-streamresponse. Taught in 25.3 The SSE streaming proxy - SSRF (server-side request forgery): an attack in which input chooses the address a server connects to. Taught in 27.1 RAG Ingest: Crawler, Chunker, Embedder, and Store
- stable softmax: softmax computed after subtracting the largest logit, so
expnever overflows. Taught in 25.6 Usage policy enforcement - stage 1, 2, 3: ZeRO sharding of the optimizer state; also the gradients; also the parameters. Taught in 17.3 Data parallelism and ZeRO stages 1 to 3
- startup probe: a probe that holds off liveness checks until a slow-starting container is up; for model servers it covers the cold start. Taught in 20.7.5 Adapter fleets and operations
- state delta (): the created rows, deleted rows, and changed fields between the before and after state. Taught in 29.2 Agent evaluation scorers
- state dict: an ordered mapping from dotted parameter names to arrays, used for checkpoints. Taught in 6.5 Module system and basic layers
- State ownership: the rule identifying which worker may mutate or release a request’s cache and sampling state. Taught in 20.11 Serving layouts: one process, replicas, and distributed pools
- State-space model (SSM): a sequence model, such as Mamba, that replaces attention with a learned linear recurrence over a fixed-size state, giving constant time and memory per token and no growing KV cache. Taught in Chapter 26: Edge and Realtime Inference
- Stateful TBPTT: truncated BPTT in which each window starts from the previous window’s final state. Taught in 9.6 RNN language model with stateful TBPTT
- step: a named, recorded unit of side effect (
llm/<iter>,tool/<iter>/<i>/<name>) run through aStepRunner. Taught in 28.3 The agent loop - step function:
step_fn(state, y_prev) -> (logits, state), the only interface between the search and the model. Taught in 10.4 Beam search, generic over a step function - step time: the duration of one engine iteration, the larger of its compute time and memory time plus communication and overhead. Taught in 20.4.6 Load tests and the deployment runbook
- Stereotype preference: the share of non-tied sentence pairs in which the stereotypical sentence scores higher; 0.5 is no preference. Taught in 36.1 Bias and safety evals
- stop-string hold-back: withholding the longest tail of decoded text that could still become a stop string. Taught in 23.6 tl-serve: OpenAI-compatible HTTP + SSE on tokio/hyper
- stored scale: the f16 scale actually written for an int4 group, against which the codes must be rounded. Taught in 23.2 Candle model runner (Llama + bigram, int4), Rust KV cache, sampler and PCG32
- stream observer: a side-channel receiver of the first byte, each event, and the final usage, which cannot affect the bytes the client sees. Taught in 25.3 The SSE streaming proxy
- Streaming decoder: a decoder that emits only complete UTF-8 after each token and holds back up to 3 bytes of an unfinished character. Taught in 7.5 Fast BPE in Rust
- Streaming encoder: an encoder that emits output as input arrives, so it is causal (past context only) or chunked (a small bounded look-ahead); unlike an offline bidirectional encoder, it trades accuracy for latency. Taught in Chapter 26: Edge and Realtime Inference
- strict loading: refusing a state dict with any missing or unexpected key, before copying anything. Taught in 6.5 Module system and basic layers
- Strict loading: loading a state dict that must contain exactly the model’s keys, no more and no fewer. Taught in 13.9 The Llama-Family Model: Config, Weight Loading, and Download
- strict loading: rejecting any missing, unexpected or wrongly shaped tensor rather than leaving parameters at random values. Taught in 15.3 Whisper decoder and checkpoint weights
- strict parsing: accepting exactly one JSON object with known keys and valid values, and nothing after it. Taught in 29.3 LLM judge with position control
- Strided perplexity: perplexity computed over overlapping windows that each score only the tokens they add. Taught in 12.7 The evaluation harness and the model zoo
- subgradient: a valid gradient choice at a non-differentiable point, such as a tie in max pooling. Taught in 14.1 Conv layers and pooling on autograd
- subject: the function under evaluation, which fills an observation’s output from its input. Taught in 29.1 Eval runner
- subsampling: randomly dropping frequent tokens before windowing, keeping each with probability . Taught in 8.3 word2vec skip-gram with negative sampling, and the PPMI-SVD baseline
- Subset construction: turning an NFA into a DFA whose states are sets of NFA states. Taught in 21.7 Constrained decoding: from regex to token masks
- Subword regularization: training on segmentations sampled from instead of always the Viterbi one. Taught in 7.4 The Unigram language model tokenizer
- Success matrix: a table of task-by-model outcomes on an eval set, from which the best single model, the oracle, and the best pair of models can be computed to size the routing opportunity. Taught in 24.5 Routing implementations and selection
- sufficient statistics: the per-sentence count vectors whose column sums determine the corpus score. Taught in 10.5 Sequence metrics: exact match, BLEU, chrF
- suite: a JSON-lines file of eval cases, each with an id, an input, and optional ground truth, tags, and scorer arguments. Taught in 29.1 Eval runner
- Support: the actions or histories with nonzero probability under a distribution. Taught in 18.5 On-policy, off-policy, offline, and online learning
- SwiGLU: a gated MLP, , that replaced the ReLU feed-forward block. Taught in 5.3 Model landscape and lifecycle
- SwiGLU: the gated MLP with silu on the gate (Llama, SmolLM2). Taught in 13.2 Gated MLPs: SwiGLU and GeGLU
- Switch checkpoint: a recorded boundary where portable application state is sufficient to construct a supported request on another endpoint. Taught in 24.1 Designing a Model Router Across APIs, Caches, and Applications
- symmetric quantization: affine quantization with , used for roughly zero-mean weights to avoid GEMM cross-terms. Taught in 20.1.4 Choosing and validating quantization
- Symmetric quantization: codes with and no zero point. Taught in 21.5 Quantization: int8, int4 groups, fp8, and the KV cache
- taint: the flag, monotone within a run, that says tool output (outside data) is in the context. Taught in 28.3 The agent loop
- taint: the program-known fact that tool output is in the context, which makes sends need approval. Taught in 28.4 The tool gate, the SQL safety gate, and the prompt-injection suite
- Target: the model whose output speculation must reproduce. Taught in 21.6 Speculative decoding: n-gram, prompt-lookup, and model drafts
- Task success: whether an agent accomplished its objective end to end; the agent metric that matters most. Taught in Chapter 29: LLM Evaluation
- teacher forcing: feeding the true previous target token at every training step. Taught in 10.1 Encoder-decoder with teacher forcing
- Teacher-forced diagnostic: next-token accuracy and NLL given the true prefix; a foundation check, not transcription quality. Taught in 34.2 Consent and biometric evidence in model cards
- temperature: the divisor applied to logits before softmax; below 1 sharpens, above 1 flattens, 0 means greedy. Taught in 6.1 Byte bigram: counts, logits, safetensors v0
- temperature fallback: retrying a window at hotter temperatures when output is repetitive or low-confidence. Taught in 15.4 Whisper decoding and long-form transcription
- Template: the
[CLS] ... [SEP]wrappingadd_specialapplies. Taught in 7.3 WordPiece - tensor / pipeline / expert parallelism: splitting a model across GPUs by weight matrix, by layer, or by MoE expert. Taught in Chapter 20: Inference Engines and GPU Deployment
- Tensor, pipeline, context, and expert parallelism: splitting each matmul, the layers, the sequence, or the MoE experts across devices. Taught in 19.7 The training step and validation
- Term: a maximal run of Unicode letters, digits, and
_, lowercased; the unit both ingest and retrieval index. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR - Terms of service: a contract with a website that can bind you independently of copyright. Taught in 33.1 Data licensing and the ledger
- TF-IDF: a lexical weighting that scores a term by its frequency in a document times its rarity across the corpus, so distinctive words count more than common ones; BM25 refines it. Taught in Chapter 27: Retrieval and RAG
- Third-party model card: a card for weights the project did not train, pinning the upstream revision and reporting only evaluations the project ran. Taught in 35.1 Datasheet and model card
- Thompson’s construction: building an NFA fragment with one entry and one exit per regex operator. Taught in 21.7 Constrained decoding: from regex to token masks
- Threshold: the class probability at or above which a classifier rule matches. Taught in 37.1 Usage policy at the gateway
- tie rule: the fixed backtrace preference (diagonal, deletion, insertion) that makes the S, D, I split deterministic. Taught in 15.5 Multimodal eval metrics: WER, CER, VQA, captions, zero-shot
- Tied embedding: one tensor used both as the token lookup and as the output head, counted and saved once. Taught in 13.9 The Llama-Family Model: Config, Weight Loading, and Download
- Tied embeddings: one Tensor shared by generator and discriminator, trained by both losses. Taught in 12.3 ELECTRA: replaced-token detection
- Tied head: an output layer that reuses the token embedding table, . Taught in 12.1 GPT: the decoder-only language model
- tied output: computing logits as with the token embedding , so there is no separate output matrix. Taught in 15.3 Whisper decoder and checkpoint weights
- ties to even: rounding a value exactly halfway between two representable numbers to the one with an even last bit. Taught in 23.2 Candle model runner (Llama + bigram, int4), Rust KV cache, sampler and PCG32
- tile: a tower-sized crop of a large image, encoded independently. Taught in 14.4 Dynamic resolution and tiling
- time to first token (TTFT): the time until the first body byte of an answer is ready to send to the client. Taught in 25.3 The SSE streaming proxy
- time-slicing: advertising one GPU as several, with no memory isolation between the pods that share it. Taught in 20.7.5 Adapter fleets and operations
- timestamp mass rule: forcing a timestamp when the summed probability of legal timestamps exceeds the best single text token. Taught in 15.4 Whisper decoding and long-form transcription
tl-tok: the Rust tokenizer crate: a library of five modules plus a binary withencodeandbenchverbs. Taught in 7.5 Fast BPE in Rust- token budget: the maximum number of tokens, prompt and generated, the scheduler puts into one step. Taught in 20.6 Inside an Inference Engine: How vLLM and SGLang Run a Model
- Token budget: the amount of prefill/decode work admitted into a scheduling iteration. Taught in 20.10 Runtime controls and inference flags
- token budget: the most tokens one step may process (
max_batch_tokens); a decode costs one, a prefill chunk its length. Taught in 23.3 Continuous batching scheduler with priority and preemption - Token budget: the maximum token count of a chunk (
MaxTokens), measured by the embedding model’s tokenizer and inclusive. Taught in 27.1 RAG Ingest: Crawler, Chunker, Embedder, and Store - Token budget: the maximum token count of the assembled context, checked on the whole text and inclusive. Taught in 27.3 Context Assembly, Citations, and the search_docs Tool
- Token mask: the set of tokens whose bytes keep the DFA alive from the current state, plus EOS in accepting states. Taught in 21.7 Constrained decoding: from regex to token masks
- Token mask: the set of token ids whose full byte sequence keeps the DFA live from the current state, plus EOS in accepting states. Taught in 23.10 Tool calls and constrained decoding
- Token type embedding: a learned vector added per segment (A or B) for sentence-pair inputs. Taught in 12.2 BERT: the bidirectional encoder and masked language modeling
- token window: consecutive ids, split into inputs and targets shifted by one. Taught in 6.7 Safetensors for every dtype, atomic checkpoints, and the token stream
- Tokenizer protocol: the six-member structural interface (
vocab_size,special_ids,unk_id,encode/decode,token_to_id/id_to_token,save/load) every tokenizer satisfies. Taught in 7.1 The tokenizer protocol and the char tokenizer - tool definition: a tool’s name, description, and parameter schema, sent to the model as part of the prompt. Taught in 28.2 Tools, a registry, and JSON Schema argument validation
- tool result: the
ResulteveryCallreturns, rendered as a tool message, prefixederror:on failure. Taught in 28.2 Tools, a registry, and JSON Schema argument validation - Tool-call accuracy: whether an agent chose the right tool with valid arguments and recovered from tool errors. Taught in Chapter 29: LLM Evaluation
tool_choice: the request field that selects the call grammar: named,required,auto, ornone. Taught in 23.10 Tool calls and constrained decoding- Top-p (nucleus): the smallest set of most likely tokens whose mass reaches , including the crossing token. Taught in 21.1 Sampling and logit processors
- torch gate order: the block order in torch’s stacked weights. Taught in 9.2 LSTM (torch gate order)
- torch gate order: the block order in torch’s stacked weights. Taught in 9.3 GRU (torch gate order)
torch.compile: PyTorch’s tracer and compiler (TorchDynamo plus Inductor) that turns eager code into fused kernels. Taught in 16.3 Embeddings, small models, and platforms- torn tail: a partial final record left by a crash mid-write, never acknowledged and therefore ignored. Taught in 28.5 Durable agent runs
- TPOT: time per output token, , defined only for . Taught in 23.8 Serving metrics and tracing
- TPOT (time per output token): time between successive tokens of a running request, about one step. Taught in 23.4 Chunked prefill (mixed prefill + decode batches)
- trace / span: a tree of timed operations across processes for one request, and one node of that tree. Taught in 25.1 The tracer gateway
traceparent: the W3C header carrying the caller’s trace id and span id. Taught in 23.1 Your first endpoint: a std-only Rust HTTP/1.1 + SSE servertraceparent: the W3C header00-<trace id>-<parent span id>-<flags>that carries trace context between services. Taught in 23.8 Serving metrics and tracingtraceparent: the W3C header carrying version, trace id, parent span id, and flags. Taught in 25.1 The tracer gateway- Trainer and inference engine drift: the difference between the probabilities the sampling engine and the trainer compute for the same weights and tokens. Taught in 20.13 Batch invariance and numerical reproducibility
- training step: one zero-grad, loss, finiteness check, backward, clip, and optimizer update on one batch. Taught in 6.6 Training loop and the autograd bigram
- Trajectory metrics: measures of an agent’s path to an answer, such as turn count, redundant steps, and loops. Taught in Chapter 29: LLM Evaluation
- Transformation (JAX): a function such as
jit,grad,vmap, orpmapthat takes a pure function and returns a compiled, differentiated, batched, or parallel version of it. Taught in 16.3 Embeddings, small models, and platforms - translation equivariance: the property that shifting the input shifts the feature map correspondingly, produced by sharing filters across positions. Taught in Chapter 3: Neural Architectures and Their History
- Trigger: in
automode, the text<tool_call>whose appearance switches decoding from free text to the call grammar. Taught in 23.10 Tool calls and constrained decoding - Truncated BPTT, TBPTT(, ): run the forward straight through and, every steps, backpropagate the latest losses through at most steps, treating the entering state as a constant. Taught in 9.1 Vanilla RNN with manual BPTT and truncation
- TTFT (time to first token): time from a request’s arrival to its first generated token. Taught in 23.4 Chunked prefill (mixed prefill + decode batches)
- TTFT / TTLT / ITL: time to first token, time to last token, and mean inter-token latency. Taught in 29.2 Agent evaluation scorers
- TTFT, TPOT, ITL: time to first token, mean time per output token, and each individual inter-token gap. Taught in 20.4.6 Load tests and the deployment runbook
- two’s complement nibble: a 4-bit pattern meaning for and otherwise. Taught in 22.7 Fused int4 and int8 dequantize-matmul in C
- Typed placeholder: a token such as
<EMAIL>that replaces a detected value while keeping the text’s shape. Taught in 34.1 Privacy and PII policy
- unbroadcast: summing a gradient over the axes NumPy stretched, to return it to the operand’s shape. Taught in 6.2 Tensor, broadcasting backward, and no_grad
- uncommitted failure: an upstream failure before anything was written to the client, which a caller may retry on another worker. Taught in 25.3 The SSE streaming proxy
- unit roundoff: for float32, the maximum relative error of one rounding. Taught in 22.4 Softmax in C: three-pass and online two-pass
- Unknown citation: a number in the answer that no block carried, meaning the model invented it. Taught in 27.3 Context Assembly, Citations, and the search_docs Tool
- Unknown id (
unk_id): the id an unseen input maps to, orNonewhen every text encodes. Taught in 7.1 The tokenizer protocol and the char tokenizer - unpadding: removing feature rows or columns that correspond only to canvas padding. Taught in 14.4 Dynamic resolution and tiling
- Unresolved citation: a citation whose chunk is missing from the store or whose document or URI does not match. Taught in 27.3 Context Assembly, Citations, and the search_docs Tool
- Update gate : the fraction of the old state kept; copies the state and its gradient. Taught in 9.3 GRU (torch gate order)
- usable blocks: , the most blocks of an -token prompt a match may reuse. Taught in 23.5 Block manager with prefix cache (none, hash, radix)
- Usable prefix: , the longest part of a prompt a match may cover. Taught in 21.4 A radix prefix cache
- usage ledger: the durable per-request record of tenant, key, model, status, tokens, and latency. Taught in 25.5 The usage ledger and admin API
- usage policy: an ordered list of rules that allow or deny inference requests by model, tenant, token cap, or classifier score. Taught in 25.6 Usage policy enforcement
- Usage policy: a contract with users stating what the service is for, what it refuses, and what happens on a violation. Taught in 37.1 Usage policy at the gateway
- Value function: the expected discounted return from a state (or state-action pair) under a policy. Taught in 4.4 World models, multiple agents, and RLHF
- vanishing gradient: the shrinking of gradients through a long product of Jacobians, which prevents learning long-range dependencies. Taught in Chapter 3: Neural Architectures and Their History
- Variance: , how much the fitted model changes across training sets. Taught in Chapter 1: Statistical Learning
- Varint (unsigned LEB128): an integer encoding of 7 bits per byte, low group first, with a continuation bit on every byte but the last. Taught in 27.2 Retrieval: BM25, Flat and IVF Vectors, RRF, and MMR
- vector-Jacobian product (VJP): the function mapping an output gradient to input gradients without forming the Jacobian. Taught in 6.2 Tensor, broadcasting backward, and no_grad
- Verbosity bias: an LLM judge’s tendency to rate longer answers higher regardless of quality. Taught in Chapter 29: LLM Evaluation
- verifiable reward: a reward computed by a deterministic checker rather than a learned model. Taught in 18.3 Group relative policy optimization with verifiable rewards
- Verifier-gated cascade: a cascade that escalates to a stronger model only when a deterministic check, such as passing tests or a validating schema, rejects the cheap model’s output. Taught in 24.5 Routing implementations and selection
- visible range: the closed interval of key indices a query row may attend to under the causal and window rules. Taught in 22.5 FlashAttention forward in C
- Viterbi: the dynamic program for the highest-scoring path through the lattice. Taught in 7.4 The Unigram language model tokenizer
- W4A16 / W8A8: notation for weight and activation bit-widths, here 4-bit weights with 16-bit activations and 8-bit weights with 8-bit activations. Taught in 20.1.4 Choosing and validating quantization
- W4A32: 4-bit weights with float32 activations; the arithmetic is float32 on decoded codes. Taught in 22.7 Fused int4 and int8 dequantize-matmul in C
- WAL (write-ahead log): SQLite’s journal mode in which commits are appended to a separate log, so readers do not block the writer and a torn tail is ignored on recovery. Taught in 25.5 The usage ledger and admin API
WAVE_FORMAT_EXTENSIBLE: the0xFFFEformat whose real format code is the first two bytes of a GUID at payload offset 24. Taught in 15.1 Audio frontend: WAV parsing and Whisper’s log-mel- Wavelength: (): positions per full turn of RoPE pair , . Taught in 13.4 Context Extension: PI, NTK, YaRN, Llama 3 Scaling, and ALiBi
- Weight absorption: folding into the query and into the output so decoding never builds per-head keys or values. Taught in 13.6 Multi-Head Latent Attention and Weight Absorption
- weight tying: one parameter registered under two names, listed once by identity. Taught in 6.5 Module system and basic layers
- White_Space: the Unicode property that
\smeans in the GPT-2 regex, which differs fromstr.isspace. Taught in 7.2 Byte-level BPE - Whole-word
[UNK]: the rule that a word with any unmatched position becomes a single unknown id. Taught in 7.3 WordPiece - Wilson interval: a confidence interval for a rate that stays meaningful at zero successes, such as 0 of 18 with upper bound 0.176. Taught in 35.1 Datasheet and model card
- Wilson interval: a confidence interval for a rate obtained by inverting the score test, honest at zero events and small . Taught in 36.1 Bias and safety evals
- window: the fixed previous tokens the model conditions on, concatenated oldest first. Taught in 8.2 Bengio’s neural probabilistic language model
- word error rate (WER): pooled substitutions, deletions and insertions divided by the total reference word count. Taught in 15.5 Multimodal eval metrics: WER, CER, VQA, captions, zero-shot
X-Linked-Etag: the Hub redirect header carrying a large file’s sha256. Taught in 13.9 The Llama-Family Model: Config, Weight Loading, and DownloadX-Request-Id: a string that names one request in every log line it touches. Taught in 25.1 The tracer gateway
- YaRN: a per-pair ramp between keeping and dividing frequencies, by turns over the trained context, plus a temperature . Taught in 13.4 Context Extension: PI, NTK, YaRN, Llama 3 Scaling, and ALiBi
- ZeRO: sharding training state across ranks so that each piece is stored once instead of times. Taught in 17.3 Data parallelism and ZeRO stages 1 to 3
- ZeRO / FSDP: sharding parameters, gradients, and optimizer state across data-parallel ranks, gathering each layer only when it is needed. Taught in 16.3 Embeddings, small models, and platforms
- ZeRO / FSDP: sharding optimizer states, gradients, and (at stage 3) parameters across data-parallel ranks instead of replicating them. Taught in 19.7 The training step and validation
- zero-shot classifier: a linear classifier whose rows are text embeddings of class prompts. Taught in 14.5 Contrastive image-text: CLIP and SigLIP
- Zero-spread group: a prompt group with identical rewards and zero centered advantages. Taught in 18.8 Rollout systems, GRPO variants, and training diagnostics