Index by subject
Topics
Five threads. The archive is chronological; this page is by subject. Nothing here is a complete survey — it is the parts that took two tries to work out.
Inference
3 notesKV caches, speculative decoding, quantization. The memory and latency bill for serving a model, and which lever actually moves it.
-
9 min
The KV cache is the real context window
Long context is a memory budget, not a model feature. The arithmetic behind the cache.
-
8 min
Speculative decoding is a bet on your draft model
The target still does the work. The speedup lives or dies on the acceptance rate.
-
9 min
Quantization is a memory trade
Fewer bits buy memory and bandwidth, not FLOPs. What you trade depends on the task.
Retrieval
2 notesEmbeddings, rerankers, and RAG. What makes the right passage reach the context, and how to tell when it did not.
-
7 min
Embeddings and rerankers do different jobs
Recall decides what enters the shortlist; the reranker decides the order.
-
10 min
RAG is a retrieval problem
If the passage never reaches the context, no prompt will save the answer.
Evaluation
2 notesTokenizers, benchmarks, judges. How to tell whether any of it worked, and when the number is a setup artifact.
-
7 min
A benchmark number is a claim, not a measurement
Unpack the prompt, the split, the sample size, and the judge before comparing.
-
6 min
What the tokenizer does to your eval
Token counts are not word counts. Silent truncation changes the measurement.
Architecture
2 notesTransformers and mixture-of-experts. The block, the routing, and what it costs to serve.
-
8 min
MoE: you pay for the parameters you don’t use
Sparse compute, dense memory. The router has opinions about your batch.
-
7 min
A transformer is a stack of weighted averages
Attention as a weighted average, the MLP per position, the residual stream.
Training
1 noteFine-tuning, adapters, and the decision between changing the model and changing the context.
-
8 min
Fine-tuning or RAG? Start with the failure
Retrieval adds knowledge. Fine-tuning changes behavior. Diagnose first.