Selected systems & validation

Built to be
understood.

Projects and experiments, with their design decisions, evidence, and limits kept close to the code.

Systems & mathematical monograph

LLM & AI Infra Research

PyTorchRooflineDeepSeek V4.1MuonLooped LMDiffusion LLM

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

Agent engineering

pi-go

GoAgent loopsProtocol compatibility

The problem

An agent coordinates model output, tool execution, and session state. Errors at those boundaries can outlive the request that caused them.

The work

The local pi-go project rewrites the upstream pi agent in Go. This site examines its agent loop and extracts a smaller, independently tested teaching implementation. It does not claim authorship of the upstream design.

Design tradeoff

Behavioral compatibility is more useful than an attractive new abstraction when porting an existing protocol. The lab deliberately reduces the protocol surface so its lifecycle is inspectable.

Validation

The accompanying agent-loop lab tests tool results, malformed arguments, model errors, cancellation, and bounded termination using a deterministic model substitute.

Limits

The teaching lab is not the complete pi-go application. Provider compatibility and production behavior require their own validation.

Inspect the evidence

Small teaching implementations; these files do not establish production or GPU performance.

Read the accompanying work

Executable explanations

Engineering Labs

GoPythonCPU PyTorch

The problem

An explanation is difficult to trust when its code, assumptions, and measurements cannot be inspected together.

The work

A companion lab collection built for these articles: bounded admission, an agent loop, structured concurrency, streaming measurements, causal attention, a cached decoder, modern transformer blocks, online tiled attention, MLA/GRPO, 2026 flagship CED/Muon blocks, looped transformers, and block masked diffusion.

Design tradeoff

Small, deterministic fixtures make correctness visible. CPU runs keep the first iteration reproducible without paid APIs or downloaded model weights.

Validation

Behavioral tests cover failure paths; numerical comparisons check attention, RoPE, MLA weight absorption, and cached decoding. Reproduction commands and raw measurement records accompany the labs.

Limits

Synthetic streams are not model tokens. Tiny random-weight decoders do not demonstrate language quality, GPU throughput, or a production serving stack.

Inspect the evidence

Small teaching implementations; these files do not establish production or GPU performance.

Read the accompanying work