Systems & mathematical monograph
LLM & AI Infra Research
The problem
Architectural papers and systems papers are often studied in isolation: model equations omit HBM bandwidth constraints, while kernel benchmarks omit algebraic invariants.
The work
Synthesizes 50 foundational and 2026 frontier papers into nine mathematical and systems chapters, paired with an H100 Roofline calculator, publication-grade SVG figures, and CPU PyTorch verifications.
Design tradeoff
Uses exact algebraic and algorithmic equivalence tests (such as MLA weight absorption, Online Softmax tiling, Muon Newton-Schulz orthogonalization, terminal-loop KV sharing, and block-causal MDLM unmasking) on deterministic CPU tensors so every mechanism can be verified without a multi-node GPU cluster.
Validation
Unit tests verify RoPE relative-position invariance, Online Softmax vs. SDPA equivalence, MLA matrix absorption, GRPO zero-sum advantages, depth-routed AttnRes, Muon singular-spectrum flattening, constant O(1) terminal-loop KV caching, and block-causal parallel unmasking.
Limits
Roofline models use analytical HBM and Tensor Core bounds; local CPU tests prove mathematical and algorithmic equivalence rather than multi-node InfiniBand or CUDA kernel throughput.
Inspect the evidence
Small teaching implementations; these files do not establish production or GPU performance.
Read the accompanying work
- From Vanilla Transformer to Llama-3 and Mixtral: Five Architectural Mutations
- The AI Infrastructure Ledger: Roofline Analysis, FlashAttention-2, and PagedAttention
- Distributed Training & Compute-Optimal Scaling: Megatron-LM, ZeRO, and Chinchilla Laws
- Post-Training Alignment & Test-Time Reasoning: RLHF, DPO, and DeepSeek-R1's GRPO
- Hardware-Algorithm Co-Design at Frontier Scale: DeepSeek-V2/V3 MLA, DualPipe, and DistServe
- Beyond Fixed-Context Text: Ring Attention, Native Sparse Attention, Mamba-2, Agents, and Physical AI
- 2026 Flagship Co-Design: Sub-Kilobyte CED KV Cache, Depth-Wise Attention Residuals, and Muon
- Looped Transformers: Latent-Space Recurrence, Constant Terminal KV Cache, and Elastic Depth
- Diffusion Language Models: Block-Causal Parallel Decoding, Hybrid Migration, and Prefix-Block RL