ls -lh ~/ai-ml-handbook/articles/
Long reads
Six articles that go deeper than the roadmap has room for. Each one covers a mechanism, the trade-offs it forces, and the failure modes that follow — the things that decide whether a system works in production rather than in a notebook.
articles/
- ├──transformers.htmltransformers
- ├──inference.htmlwhere the money goes when you serve a language model
- ├──finetuning.htmlfine-tuning
- ├──evaluation.htmlevaluation engineering
- ├──vector-search.htmlvector search internals
- └──agents.htmlagents
Transformers, from attention to KV cache
Scaled dot-product attention and why it is scaled. Multi-head projections as a partition rather than an addition. Positional encoding from absolute to RoPE, and the algebra that makes rotation encode relative position. Then the KV cache, and how it stops being an optimisation and becomes the constraint that decides your batch size.
Where the money goes when you serve a language model
Prefill is compute-bound and decode is memory-bandwidth-bound, and almost every serving mistake comes from conflating them. Continuous batching, paged attention, quantisation, speculative decoding — with a table of which lever moves which metric, because several trade directly against each other.
Fine-tuning: mostly, a guide to not doing it
Fine-tuning teaches form; retrieval supplies facts. Confusing those is the most expensive mistake in applied LLM work. The decision framework, the ladder of cheaper things to try first, LoRA and QLoRA mechanics, DPO against RLHF, and the costs nobody budgets for.
Evaluation engineering
The work that makes an LLM product improvable rather than merely changeable. Building a golden set that is not contaminated, decomposing the pipeline so a regression is attributable, programmatic checks before model-based ones, calibrating a judge so its numbers mean something, and a paired bootstrap before believing a small difference.
Vector search internals
How flat, IVF, product quantisation and HNSW actually work, and which parameter moves which point on the recall–latency–memory triangle. Tuning against a measured target rather than a feeling. And why filtered search breaks ANN indexes, with the three things production systems do about it.
Agents, and why they fail
Per-step success raised to the number of steps is the arithmetic that governs everything, and it explains the whole gap between the demo and the product. Tool design, context management, a failure taxonomy with mechanisms rather than symptoms, the security model, and why the right answer is often to write the sequence instead.
Free, no signup, nothing to buy. A gift to my subscribers on X.
If any of these are useful, share them with someone building the same thing — and follow @ka1manov on X.