Research monograph · 9 chapters · 50 arXiv papers
Models,
hardware, & proofs.
Nine in-depth chapters connecting first-principles mathematical derivations, HBM/SRAM Roofline ledgers, and runnable PyTorch CPU verifications. 50 arXiv papers synthesized.
First-principles methodology
Every architectural mutation, from RoPE, FlashAttention-2, and DeepSeek MLA to V4.1 asymmetric CED, depth-wise AttnRes, Muon, Looped Transformers, and Block Diffusion LLMs, was forced by a physical hardware bottleneck. Each chapter pairs closed-form LaTeX derivations with explicit compute-and-memory ledgers.
Reproducible CPU verifications
Mathematical claims are accompanied by deterministic CPU PyTorch tests: verify complex-plane RoPE invariance, Online Softmax blockwise tiling, and MLA matrix absorption locally.
Environment and reproduction guide →Part I
Foundations & Hardware Ledger
Positional geometry, SRAM-tiled attention, and distributed memory-bandwidth bounds that govern transformer pretraining and serving.
LLM · 11 min read · 7 primary arXiv papers
From Vanilla Transformer to Llama-3 and Mixtral: Five Architectural Mutations
Trace the five exact structural mutations—Pre-RMSNorm, RoPE, Grouped-Query Attention, SwiGLU, and Top-K Sparse MoE—that turned the 2017 Transformer into modern open-weights frontier models.
Systems · 10 min read · 3 primary arXiv papers
The AI Infrastructure Ledger: Roofline Analysis, FlashAttention-2, and PagedAttention
Derive the arithmetic intensity ridge point on an NVIDIA H100, eliminate quadratic HBM traffic via Online Softmax SRAM tiling, and reclaim fragmented KV cache memory with vLLM's PagedAttention.
Systems · 7 min read · 3 primary arXiv papers
Distributed Training & Compute-Optimal Scaling: Megatron-LM, ZeRO, and Chinchilla Laws
Account for every byte of the 16-byte mixed-precision training rule, eliminate Data Parallel redundancy via ZeRO-1/2/3, slice operators with Megatron-LM 3D parallelism, and reconcile Chinchilla optimality with inference-optimal over-training.
Part II
Alignment & Frontier Co-Design
Critic-free RL reasoning, low-rank latent KV compression, long-context agentic loops, and 2026 sub-kilobyte CED/AttnRes/Muon co-design.
LLM · 8 min read · 4 primary arXiv papers
Post-Training Alignment & Test-Time Reasoning: RLHF, DPO, and DeepSeek-R1's GRPO
Derive the closed-form Direct Preference Optimization (DPO) objective from the KL-constrained RLHF reward, eliminate the Value Critic via Group Relative Policy Optimization (GRPO), and examine how HybridFlow (veRL) orchestrates distributed RL dataflows.
Systems · 8 min read · 4 primary arXiv papers
Hardware-Algorithm Co-Design at Frontier Scale: DeepSeek-V2/V3 MLA, DualPipe, and DistServe
Prove how Multi-head Latent Attention (MLA) absorbs decompression matrices into Query and Output projections to slash KV cache by 93.3%, overlap all-to-all MoE traffic with DualPipe, and disaggregate Prefill from Decode.
LLM · 8 min read · 9 primary arXiv papers
Beyond Fixed-Context Text: Ring Attention, Native Sparse Attention, Mamba-2, Agents, and Physical AI
Scale contexts beyond millions of tokens with Ring Attention and Native Sparse Attention (NSA), prove the State Space Duality (SSD) in Mamba-2, design Agent-Computer Interfaces (SWE-agent), and bridge VLMs to 50Hz continuous robot control (Pi-Zero).
Systems · 9 min read · 7 primary arXiv papers
2026 Flagship Co-Design: Sub-Kilobyte CED KV Cache, Depth-Wise Attention Residuals, and Muon
How 2026 frontier models break the symmetric Decoder-only and Pre-RMSNorm mold: DeepSeek-V4.1-Flash asymmetric CED and 890 B/tok KV compression, Kimi K3 Attention Residuals, Qwen3.8-Next 4-branch gated residuals, and Muon orthogonalized momentum.
Part III
Latent Recurrence & Diffusion Paradigms
Moving beyond fixed-depth autoregressive decoding via looped shared-weight recurrence and block-causal discrete diffusion.
LLM · 8 min read · 7 primary arXiv papers
Looped Transformers: Latent-Space Recurrence, Constant Terminal KV Cache, and Elastic Depth
Scale test-time reasoning depth without adding weights or inflating KV cache: Prelude-Recurrent-Coda topology, hyperspherical input injection, O(1) terminal-loop KV sharing, and fixed-point truncated BPTT.
LLM · 7 min read · 6 primary arXiv papers
Diffusion Language Models: Block-Causal Parallel Decoding, Hybrid Migration, and Prefix-Block RL
Break the 1-token-per-forward-pass Roofline wall with Block Masked Diffusion: continuous-time NELBO derivations, migrating Gated DeltaNet hybrids in dQwen3.5 and Clover-35B-A3B, Mix-FT sampler alignment, and PBPO reinforcement learning.