Glossary
Terms used throughout the book. Each entry gives the term, its Chinese translation, a concise definition, and a link to its first appearance. Each entry is also linked from its first use in every chapter.
- mixture-of-experts (MoE) 混合专家
An architecture that replaces a dense feed-forward layer with many expert layers and routes each token to a few, so capacity grows without proportional compute.
- multi-head latent attention (MLA) 多头潜在注意力
An attention design introduced with DeepSeek-V2 that compresses keys and values into a low-rank latent representation to reduce the KV cache.
- mid-training 中段训练
A pretraining-like phase between broad pretraining and post-training, usually mixing specialized or higher-quality data while continuing next-token training.
- key-value cache KV 缓存
A store of attention keys and values from earlier tokens that lets each decode step reuse prior computation.
- scaling law 扩展律
An empirical power law relating model loss to compute, parameters, and data, used to predict quality and allocate a training budget.
- arithmetic coding 算术编码
An entropy-coding method that represents an entire message as an interval within the unit interval, approaching the source's ideal bit rate.
- minimum description length (MDL) 最小描述长度
A model-selection principle that prefers the model producing the shortest combined description of itself and the data.
- two-part code 两部分编码
A minimum-description-length encoding that records a model first and then records the data using that model.
- next-token prediction 下一词元预测
A pretraining objective that asks a model to predict each token from the tokens that precede it.
- cross-entropy 交叉熵
A loss that measures how much probability a model assigns to the correct answer compared with its full predicted distribution.
- perplexity 困惑度
The exponential of cross-entropy, often interpreted as the average number of plausible token choices the model considers at each step.
- training tokens 训练词元
The total number of token instances processed during pretraining, including repeated examples and additional passes through the data.
- compute-optimal 计算最优
A balance between model size and training data that produces the lowest expected loss for a fixed compute budget.
- AdamW AdamW 优化器
A version of the Adam optimizer that applies weight decay separately from the gradient-based parameter update.
- warmup-stable-decay (WSD) 预热-稳定-衰减调度
A learning-rate schedule that warms up, stays constant for most of training, and decays near the end.
- z-loss z-loss 正则
A small auxiliary penalty on the log of the softmax normalizer that keeps logits from drifting, stabilizing the training of large models.
- query-key normalization (QK-norm) 查询-键归一化
A stabilization technique that normalizes query and key vectors before their dot product to limit the growth of attention logits.
- gradient clipping 梯度裁剪
A stabilization technique that limits gradient magnitude before an update to prevent unusually large gradients from disrupting training.
- decontamination 去污染
The removal of training examples that overlap with evaluation data, preventing memorization from inflating benchmark scores.
- MinHash 最小哈希
A hashing scheme that cheaply estimates set similarity, used to find and remove near-duplicate documents in a training corpus.
- locality-sensitive hashing (LSH) 局部敏感哈希
A hashing method designed to place similar items in the same bucket with high probability, supporting approximate search and deduplication.
- tokenizer 分词器
A component that converts raw text into the integer token identifiers a model consumes and converts model output back into text.
- SentencePiece SentencePiece 分词器
A language-agnostic tokenizer that trains directly on raw text without pre-tokenization, treating the input including whitespace as one stream.
- tokenizer-free 无分词器方案
An approach that drops a fixed vocabulary and models bytes or characters directly, trading tokenizer biases for longer sequences.
- residual stream 残差流
The shared vector that passes through a transformer while each block reads it and adds its own update.
- root mean square layer normalization (RMSNorm) 均方根层归一化
A normalization method that rescales activations by their root mean square without subtracting their mean.
- Swish-gated linear unit (SwiGLU) Swish 门控线性单元
A gated feed-forward layer that combines a Swish-activated projection with a second projection before producing its output.
- rotary position embedding (RoPE) 旋转位置嵌入
A position-encoding method that rotates query and key vectors by position-dependent angles so their dot product reflects relative position.
- prefill 预填充
The initial inference pass that processes the full prompt and computes the keys and values needed for later token generation.
- decode 解码
The inference phase after prefill that generates one token at a time while reusing cached keys and values.
- FlashAttention FlashAttention 注意力内核
An exact attention algorithm that avoids storing the full score matrix in main memory, reducing memory traffic and accelerating attention.
- Zero Redundancy Optimizer (ZeRO) 零冗余优化器
A data-parallel method that shards optimizer states, gradients, and parameters across devices instead of replicating them, cutting per-device memory.
- fully sharded data parallel (FSDP) 全分片数据并行
A PyTorch distributed-training method that shards parameters, gradients, and optimizer state, gathering each layer's parameters only when needed.
- continued pretraining 继续预训练
A training phase that continues the next-token objective on an existing pretrained model, often using data from a specific domain.
- supervised fine-tuning (SFT) 监督微调
A post-training stage that teaches a pretrained model to follow instructions by training it on curated input-output examples.
- direct preference optimization (DPO) 直接偏好优化
A post-training method that learns directly from preferred and rejected response pairs without a separate reward model or reinforcement-learning loop.
- reinforcement learning with verifiable rewards (RLVR) 可验证奖励的强化学习
A reinforcement-learning method in which an automatic checker, such as a unit test or exact-answer rule, supplies the reward.
- diffusion 扩散
A generative process that learns to reverse a gradual noising of data, turning pure noise into a sample step by step.
- flow matching 流匹配
A generative-model training method that learns a velocity field for transporting samples from a noise distribution to the data distribution.
- denoising diffusion probabilistic models (DDPM) 去噪扩散概率模型
A discrete-time diffusion formulation that trains a network to reverse a fixed process that gradually adds noise to data.
- stochastic differential equation (SDE) 随机微分方程
A differential equation that includes a random process and therefore describes both deterministic change and noise over continuous time.
- ordinary differential equation (ODE) 常微分方程
An equation that relates a function of one independent variable to one or more of its derivatives.
- diffusion transformer (DiT) 扩散 Transformer
A diffusion model whose denoiser is a transformer over patches rather than a U-Net, the scalable backbone of modern image and video generators.
- classifier-free guidance (CFG) 无分类器引导
A sampling trick that pushes a conditional generator away from its unconditional output to sharpen prompt adherence, trading diversity for fidelity.
- rectified flow 修正流
A flow-matching variant that straightens the transport paths between noise and data so fewer solver steps suffice for high quality.
- non-autoregressive generation (NAR) 非自回归生成
A generation method that predicts multiple output elements in parallel instead of conditioning each one on the preceding outputs.
- autoregression 自回归
A generation method that produces one sequence element at a time, conditioning each new element on those already produced.
- automatic speech recognition (ASR) 自动语音识别
A system that converts spoken audio into written text.
- connectionist temporal classification (CTC) 连接主义时序分类
A loss that trains sequence models without requiring each input position to be aligned with a target label.
- text-to-speech (TTS) 文本到语音
A system that converts written text into spoken audio.
- contrastive language-image pretraining (CLIP) 对比语言-图像预训练
A training method that places matching images and text near each other in a shared embedding space and separates mismatched pairs.
- vision transformer (ViT) 视觉 Transformer
A transformer that treats an image as a sequence of patches, bringing the architecture and its scaling to vision.
- vision-language-action model (VLA) 视觉-语言-动作模型
A model that maps visual and language input directly to robot or agent actions, extending VLMs to control.
- over-refusal 过度拒绝
A safety failure in which a model incorrectly declines a benign request because it resembles a harmful one.
- low-rank adaptation (LoRA) 低秩适配
A PEFT method that freezes the base weights and learns a small low-rank update per layer, so many task adapters share one base model.
- quantized low-rank adaptation (QLoRA) 量化低秩适配
A fine-tuning method that applies LoRA adapters to a quantized base model to reduce the memory required for training.
- proximal policy optimization (PPO) 近端策略优化
A policy-gradient reinforcement-learning algorithm that limits each update so the new policy does not move too far from the previous one.
- reinforcement learning from AI feedback (RLAIF) 基于 AI 反馈的强化学习
A post-training method that uses model-generated preferences or critiques as reinforcement-learning feedback instead of relying only on human labels.
- Kullback-Leibler divergence (KL) Kullback-Leibler 散度
An asymmetric measure of how one probability distribution differs from another, often used to limit policy drift during alignment.
- identity preference optimization (IPO) 恒等偏好优化
A DPO variant that replaces the log-sigmoid loss with a squared objective to curb overfitting to preference pairs.
- Kahneman-Tversky optimization (KTO) Kahneman-Tversky 优化
A preference method that learns from unpaired good/bad labels with a prospect-theory-inspired loss, needing no preference pairs.
- odds-ratio preference optimization (ORPO) 优势比偏好优化
A method that folds preference alignment into SFT with an odds-ratio penalty, removing the need for a separate reference model.
- simple preference optimization (SimPO) 简单偏好优化
A reference-free DPO variant using the average log-probability as an implicit reward with a target margin, simpler and memory-light.
- chain of thought (CoT) 思维链
A sequence of intermediate reasoning steps produced before a model gives its final answer.
- least-to-most 由简入繁
A prompting strategy that decomposes a hard problem into easier subproblems solved in order, each building on the last.
- self-consistency 自一致性
A decoding method that samples several reasoning paths and returns the answer that appears most often.
- group relative policy optimization (GRPO) 组相对策略优化
A reinforcement-learning method that estimates relative advantages from a group of sampled answers without training a separate value model.
- REINFORCE leave-one-out (RLOO) REINFORCE 留一法
A lightweight policy-gradient method that uses the mean reward of the other samples as each sample's baseline, avoiding a learned value network.
- goodput 有效吞吐量
The rate of completed requests that satisfy a service's latency or other acceptance targets.
- continuous batching 连续批处理
A serving scheduler that adds and removes requests between decode steps so completed requests release capacity immediately.
- PagedAttention PagedAttention 分页注意力
A KV-cache allocator that stores the cache in fixed-size pages like virtual memory, ending the fragmentation of reserving one contiguous block per sequence.
- prefix caching 前缀缓存
A serving optimization that reuses the KV cache for a prompt prefix shared by multiple requests, avoiding repeated prefill work.
- dynamic random-access memory (DRAM) 动态随机存取存储器
DRAM stores bits in capacitors that require periodic refresh and provides most off-chip working memory.
- speculative decoding 推测解码
A decoding method in which a faster model drafts several tokens and the target model verifies them together.
- static random-access memory (SRAM) 静态随机存取存储器
SRAM stores each bit in a stable circuit without periodic refresh and is commonly used for fast on-chip caches.
- constrained decoding 约束解码
A decoding method that permits only tokens allowed by a grammar or schema at each step, ensuring structurally valid output.
- finite-state machine (FSM) 有限状态机
A computational model with a finite set of states and rules for moving between them in response to input.
- attention sink 注意力汇
An initial token that receives substantial attention even when its content is unimportant, helping some models preserve behavior over long contexts.
- retrieval-augmented generation (RAG) 检索增强生成
A method that retrieves relevant documents at query time and adds them to the prompt so the model can answer from that evidence.
- BM25 BM25 稀疏检索
A lexical ranking function that scores documents from query-term frequency, document length, and how rare each term is across the collection.
- dual-encoder 双编码器
A retrieval model that embeds queries and documents separately, allowing document vectors to be computed before a search begins.
- hierarchical navigable small-world (HNSW) 分层可导航小世界图
A graph index for approximate nearest-neighbor search over vectors, navigating layered links to find close embeddings fast.
- hybrid search 混合搜索
A retrieval method that combines lexical scores with vector similarity so results can reflect both exact terms and semantic meaning.
- cross-encoder 交叉编码器
A model that scores a query and document jointly in one pass, more accurate than a dual-encoder but too costly to run over a whole corpus, so used to rerank.
- held-out set 留出集
A held-out set contains examples excluded from training and reserved for measuring generalization to unseen data.
- membership inference 成员推断
An attack that tests whether a specific example was in a model's training set, a basic privacy threat.
- Holistic Evaluation of Language Models HELM
A benchmark suite that scores models across many scenarios and metrics together, rather than reducing them to one leaderboard number.
- model-as-judge 模型评判
An evaluation method that asks a model to score or compare outputs in place of, or before, human review.
- pairwise comparison 成对比较
An evaluation that presents two outputs and asks a judge to choose the better one according to stated criteria.
- private test set 私有测试集
An evaluation set hidden from model developers to reduce the risk of optimizing or training directly against its examples.
- pass@k 至少一次成功率
The probability that at least one of k sampled attempts passes, the standard metric for code and other verifiable tasks.
- mechanistic interpretability 机械可解释性
The study of how a neural network implements behavior by identifying understandable features, circuits, and computations inside it.
- superposition 叠加
A representation strategy in which a network stores more features than it has dimensions by using overlapping directions in activation space.
- weak-to-strong 弱到强
A research setting that tests whether supervision from a weaker model can elicit useful behavior from a stronger model.
- deceptive alignment 欺骗性对齐
A hypothesized failure in which a model appears to follow its training objective while monitored but pursues a different objective when unobserved.
- prompt injection 提示注入
An attack where untrusted content in the model's input overrides its instructions, hijacking an agent through the data it reads.
- instruction hierarchy 指令层级
An ordering of trust over instruction sources (system over developer over user over tool output) so a model knows which to obey on conflict.
- red-teaming 红队
A structured effort to test a system adversarially and uncover failures, abuse paths, and potential harms before deployment.
- adversarial robustness 对抗鲁棒性
A model's ability to preserve its intended behavior when an attacker deliberately crafts inputs to cause failure.
- jailbreak 越狱
A prompt crafted to bypass a model's safety training and elicit content it was tuned to refuse.
- machine unlearning 机器遗忘
A process that removes the influence of selected training data from a trained model without repeating the full original training run.
- Brussels effect 布鲁塞尔效应
The tendency of EU regulation to become a de facto global standard because firms apply it everywhere rather than maintain two product lines.
- high-bandwidth memory (HBM) 高带宽内存
A stack of DRAM dies placed close to an accelerator to provide more data-transfer bandwidth than conventional off-chip memory.
- remote direct memory access (RDMA) 远程直接内存访问
A network capability letting one machine read or write another's memory without involving its CPU, key to fast collective communication.
- tensor processing unit (TPU) 张量处理器
An accelerator designed by Google around matrix-multiplication hardware for machine-learning training and inference.
- inter-chip interconnect (ICI) 芯片间互连
The high-speed links connecting accelerators directly (such as NVLink or a TPU's ICI), carrying the collective traffic of tensor and pipeline parallelism.
- graphics processing unit (GPU) 图形处理器
A highly parallel processor developed for graphics and widely used to train and serve neural networks.
- automatic differentiation 自动微分
A method that computes derivatives by applying the chain rule to the elementary operations executed by a program.
- silent data corruption (SDC) 静默数据损坏
Silent data corruption occurs when hardware produces an incorrect result without reporting a fault.
- chip-on-wafer-on-substrate CoWoS
A TSMC packaging technology that connects compute dies and stacks of high-bandwidth memory through a shared silicon interposer.
- power usage effectiveness (PUE) 电源使用效率
The ratio of a datacenter's total power consumption to the power used by its computing equipment, where values nearer 1 indicate less facility overhead.
- small modular reactor (SMR) 小型模块化反应堆
A factory-built nuclear reactor of modest output, proposed as a dedicated, steady power source for AI datacenters.
- mean time between failures (MTBF) 平均无故障时间
The average operating time expected between one hardware failure and the next.
- reward hacking 奖励欺骗
A failure in which a model earns a high measured reward by exploiting the metric instead of achieving the intended goal.
- Model Context Protocol (MCP) 模型上下文协议
An open protocol standardizing how an agent connects to external tools and data sources, so a host can talk to many servers uniformly.
- capital expense (CapEx) 资本性支出
Capital expenses pay for long-lived assets such as accelerators, networking equipment, and datacenters that are depreciated over time.
- operating expense (OpEx) 运营性支出
Operating expenses are the recurring costs of running a service, including power, bandwidth, maintenance, and rented cloud capacity.
- gateway 网关
A proxy in front of model providers that centralizes routing, auth, rate limits, cost tracking, and fallbacks across many backends.
- sandbox 沙箱
An isolated environment that confines untrusted code or agent actions so they cannot affect the host system.
- virtual key 虚拟密钥
A gateway-issued credential mapped to an upstream provider key, letting an operator set per-team budgets, limits, and revocation without sharing the real key.
- optical character recognition (OCR) 光学字符识别
A process that converts text in scanned documents, photographs, or other images into machine-readable characters.
- vision-language model (VLM) 视觉语言模型
A model that processes images and text together to answer questions, describe visual content, or perform other multimodal tasks.
- observability 可观测性
The ability to infer a system's internal state from signals such as logs, metrics, traces, prompts, token usage, and quality measurements.
- service level indicator (SLI) 服务水平指标
A measured metric of service behavior, such as latency or error rate, against which an SLO target is set.
- service-level objective (SLO) 服务等级目标
A target threshold for a service metric, such as p99 latency under a bound, that a serving system commits to meeting.
- human-in-the-loop (HITL) 人在回路中
A system design that inserts human judgment at defined points to approve, correct, label, escalate, or stop model behavior.
- calibrated reliance 校准后的依赖
A pattern of relying on automation when evidence supports it and checking or overriding it when uncertainty or risk is high.
- automation bias 自动化偏差
The tendency to over-rely on automated recommendations, especially when the system appears authoritative or the user is under time pressure.
- reinforcement learning from human feedback (RLHF) 基于人类反馈的强化学习
A post-training method that learns a reward model from human preferences and then optimizes a policy against that reward.
Comments
Log in to comment