A guided engineering series
Systems,
step by step.
Six explanations, six runnable experiments. Follow the boundaries between requests, tasks and tensors.
Before you begin
Working familiarity with Go and Python helps. The tensor articles introduce their shapes and assumptions as they go. All experiments run on CPU.
Choose your route
Start with Go for lifecycle and cancellation, Python for orchestration and measurement, or read Attention before KV Cache for the numerical path.
Environment and reproduction guide ↗Go · 10 min read
Bounded Concurrency in Go: Admission Control, Cancellation, and Shutdown
A small admission gate makes overload and shutdown explicit. Follow the lifecycle from acquiring a slot to proving that every worker has finished.
Companion lab ↗Go · 11 min read
Inside a Go Agent Loop: Tool Calls, State Transitions, and Failure Recovery
An agent is a state machine around unreliable boundaries. Build a deterministic loop that makes tool identity, errors, cancellation, and termination inspectable.
Companion lab ↗Python · 9 min read
Structured Concurrency for Model Workloads in Python
Bound the queue and the number of tasks, preserve result identity, and make failures cancel the work they own. A standard-library asyncio lab.
Companion lab ↗Python · 9 min read
Measuring Streaming Systems Without Fooling Yourself
Separate first-event latency, inter-event gaps, completion time, and failures. Build a small measurement tool whose arithmetic can be checked against known timelines.
Companion lab ↗LLM · 9 min read
Causal Attention from First Principles: Shapes, Masks, and Numerical Checks
Implement causal attention on CPU, trace every tensor dimension, and test outputs and gradients against PyTorch before reasoning about performance.
Companion lab ↗LLM · 10 min read
KV Cache Explained Through a Tiny Decoder
Compare full-prefix and incremental decoding in the same CPU model. Verify positions, logits, cache growth, and measurement boundaries before claiming a speedup.
Companion lab ↗