Notation and Symbols
This chapter standardizes the symbols, abbreviations, and conventions used throughout the book. Definitions are precise; where a symbol carries multiple meanings in the literature, the book’s chosen convention is stated explicitly. Units are always written out on first use in each chapter; the table below lists the canonical forms.
Model and Architecture
| Symbol | Meaning | Notes |
|---|---|---|
| Total parameter count | e.g. for a 7B model | |
| Number of transformer layers (depth) | ||
| Hidden / residual stream dimension | also written | |
| Hidden dimension (explicit form) | synonym for | |
| Attention head dimension | typically 128 | |
| Feed-forward (MLP) intermediate dimension | for SwiGLU; for ReLU/GeLU | |
| Number of query attention heads | ||
| Number of key-value heads | (MHA); (GQA/MQA) | |
| Head dimension; also | context disambiguates | |
| Query head count | used in GQA ratio | |
| Key-value head count | (MQA); (GQA) | |
| GQA group size () | reduction factor for KV cache | |
| Vocabulary size | tokens in the tokenizer | |
| Sequence length in tokens | also written in some chapters | |
| Sequence length in tokens | synonym for ; also used for training tokens | |
| Expert utilization rate in MoE | fraction of experts activated per token | |
| LoRA rank | dimension of low-rank adapters |
Training and Optimization
| Symbol | Meaning | Notes |
|---|---|---|
| Total compute budget (FLOPs) | ||
| FLOPs for one forward pass | ||
| FLOPs for one training step | (fwd + bwd) | |
| Total tokens in a batch: | ||
| Training dataset size (tokens) | ||
| Chinchilla-optimal token count | at compute-optimal | |
| Chinchilla-optimal parameter count | ||
| Learning rate | ||
| Adam decay (first moment) | or generic scaling coefficient | |
| Adam decay (second moment); also KL penalty coefficient | context disambiguates | |
| Adam numerical stability term; also PPO clip ratio tolerance | ||
| Adam first moment (mean) at step | ||
| Adam second moment (variance) at step | ||
| Momentum coefficient; also mean of a distribution | ||
| Gradient clipping threshold; also discount factor in RL | ||
| L2 regularization weight; also GAE discount in RL |
Inference and Serving
| Symbol | Meaning | Notes |
|---|---|---|
| Batch size (number of concurrent sequences) | ||
| Maximum batch size given VRAM | ||
| KV-crossover batch size | ; throughput shifts from superlinear to sublinear | |
| KV cache memory per sequence | bytes (bf16) | |
| KV cache memory per sequence (alternate notation) | synonym for | |
| Model weight memory | bytes in bf16 | |
| Total GPU VRAM | e.g. 80 GB for H100 SXM | |
| Decode step latency | BW | |
| TPS | Tokens per second (throughput) | aggregate across all concurrent sequences |
| TTFT | Time to first token | prefill latency; compute-bound |
| TBT | Time between tokens (decode latency) | per-token; memory-bandwidth-bound |
| TPOT | Time per output token | synonym for TBT |
| ITL | Inter-token latency | synonym for TBT / TPOT |
| Policy (language model) parameterized by | used in RLHF/RL chapters | |
| Reference policy (frozen pre-RLHF model) | ||
| Reward model parameterized by | ||
| Model parameters (generic) | ||
| Number of rollouts per prompt in GRPO | distinct from GQA group size ; context disambiguates | |
| Group-normalized advantage for response | GRPO: | |
| Preferred / rejected response in a preference pair | DPO/RLHF notation |
Hardware and Performance
| Symbol | Meaning | Notes |
|---|---|---|
| BW | Memory bandwidth (HBM) | GB/s or TB/s |
| MFU | Model FLOPs Utilization | achieved FLOP/s peak FLOP/s; target |
| MBU | Memory Bandwidth Utilization | achieved BW peak BW |
| Parameters in attention layers | per layer (MHA) | |
| Parameters in MLP layers | per layer (SwiGLU) | |
| FlashAttention tile (block) sizes for rows and columns | SRAM tile dimensions | |
| Left and right matrix tiles in tiled GEMM | ||
| Time to execute one SM wave | GPU scheduling unit | |
| Total expert count in MoE | ||
| Active experts per token in MoE |
Alignment and Post-Training
| Symbol | Meaning | Notes |
|---|---|---|
| Kullback-Leibler divergence | ||
| Policy drift from reference | regularization term in RLHF/DPO | |
| Standard deviation; also sigmoid activation | context disambiguates | |
| Generic probability distributions | ||
| Input token sequence | ||
| Generic indices |
Common Abbreviations
| Term | Meaning |
|---|---|
| MHA | Multi-Head Attention |
| GQA | Grouped-Query Attention |
| MQA | Multi-Query Attention (GQA with ) |
| MLA | Multi-Head Latent Attention |
| KV cache | Key-Value cache stored between decode steps |
| HBM | High-Bandwidth Memory (GPU DRAM) |
| SRAM | Static RAM; on-chip shared memory / L1 cache |
| SM | Streaming Multiprocessor (GPU compute unit) |
| FLOP | Floating-point operation (one multiply-add FLOPs) |
| MFU | Model FLOPs Utilization |
| TP | Tensor Parallelism (intra-layer, intra-node) |
| PP | Pipeline Parallelism (inter-layer, inter-node) |
| DP | Data Parallelism |
| ZeRO | Zero Redundancy Optimizer (stages 1-3) |
| FSDP | Fully Sharded Data Parallelism (ZeRO stage 3 in PyTorch) |
| SFT | Supervised Fine-Tuning |
| RLHF | Reinforcement Learning from Human Feedback |
| DPO | Direct Preference Optimization |
| PPO | Proximal Policy Optimization |
| GRPO | Group Relative Policy Optimization |
| RLVR | Reinforcement Learning from Verifiable Rewards |
| LoRA | Low-Rank Adaptation |
| QLoRA | Quantized LoRA |
| PEFT | Parameter-Efficient Fine-Tuning |
| MoE | Mixture of Experts |
| CoT | Chain of Thought |
| BF16 | Brain Float 16 (1 sign, 8 exponent, 7 mantissa bits) |
| FP16 | IEEE Float 16 (1 sign, 5 exponent, 10 mantissa bits) |
| INT8 | 8-bit integer quantization |
| SLO | Service Level Objective |
| QPS | Queries per second |
Conventions
-
Tokens vs. sequences. “Tokens” refers to individual vocabulary elements; “sequence” or “context” refers to an ordered list of tokens. Batch size counts sequences, not tokens; counts tokens.
-
FLOPs counting. One multiply-accumulate (MAC) operation FLOPs. The formula follows this convention. “FLOP/s” (floating-point operations per second) uses the same factor.
-
Memory units. GB bytes throughout (SI prefix, not binary). Bandwidth is reported in GB/s or TB/s.
-
Latency units. Milliseconds (ms) for per-token and per-request latencies; seconds (s) for end-to-end generation time; microseconds (s) for kernel-level timings.
-
Throughput units. Tokens per second (tok/s or tokens/s) for generation throughput; queries per second (QPS) for request-level throughput.
-
Precision notation. Memory footprints assume bf16 (2 bytes/parameter) unless otherwise stated. The training-memory figure of bytes assumes AdamW in fp32.
-
Prefill vs. decode. Prefill encodes the full prompt in one parallel forward pass (compute-bound). Decode generates tokens one at a time in an autoregressive loop (memory-bandwidth-bound). These two phases have distinct bottlenecks and optimizations.
-
Latency vs. throughput. TTFT optimizes differently from aggregate TPS. Minimize TTFT with small batches and fast prefill hardware; maximize TPS with large batches and high memory bandwidth. A single serving configuration cannot simultaneously optimize both without workload-specific scheduling.
-
Overloaded symbols. denotes both the GQA group size and the GRPO rollout count; denotes both sequence length and training token count; denotes both the Adam second-moment decay and the KL penalty coefficient. In each case, context and the surrounding equation make the intended meaning unambiguous.