Causal self-attention, each position attends only to earlier positions. Score \(s_{ij}=q_i\cdot k_j/\sqrt{d}\), softmax, weighted sum of values. Repo: attention/baseline.py, tested for strict causality (tests/test_attention.py).
KV cache, storing past keys/values turns \(O(n^2)\)training-style attention into \(O(n)\)decode-style. Cost: memory grows linearly with context. This linear growth is precisely what CSA/HCA attack.
GQA / MQA: fewer key/value heads than query heads (GQA) or one shared KV head (MQA). V4's core attention over compressed entries is MQA-shaped: one KV lane shared by all query heads [PAPER Section 2.3.1].
Max-entropy adversarial case, i.i.d. random tokens carry maximal information per token; compression must lose something. Real text has redundancy. All lab retrieval numbers are therefore lower bounds on production behavior [MEASURED framing].
Reverse KL: \(\mathrm{KL}(p\|q)=\sum p\log(p/q)\); mode-seeking (q concentrates where p does). OPD's consolidation force [PAPER Eq 29].
Straight-through estimator, forward through a non-differentiable op (quantize, top-k); backward as if identity. Used twice: FP4 QAT and our indexer STE phase.