Archive
Notes
Ten notes on inference, retrieval, evaluation, architecture, and the training decision. Newest first; mostly things that took two tries to understand.
-
Inference
The KV cache is the real context window
Long context is a memory budget, not a model feature. The arithmetic behind the cache, and why 128k on one card is usually a promise about someone else’s hardware.
-
Inference
Speculative decoding is a bet on your draft model
The target model still does the work. A smaller draft just guesses which tokens it will accept, and the speedup lives or dies on the acceptance rate.
-
Inference
Quantization is a memory trade
Fewer bits buy memory and bandwidth. They do not buy FLOPs, and they do not automatically make a model faster or worse.
-
Retrieval
Embeddings and rerankers do different jobs
The embedding decides what enters the shortlist. The reranker decides the order. Neither one fixes a corpus that does not contain the answer.
-
Retrieval
RAG is a retrieval problem
If the right passage never makes it into the context, no prompt will save the answer. Where retrieval actually fails, and what to measure.
-
Training
Fine-tuning or RAG? Start with the failure
Retrieval adds knowledge. Fine-tuning changes behavior. Most teams reach for the wrong one because they diagnosed the symptom, not the failure.
-
Evaluation
A benchmark number is a claim, not a measurement
Before you compare two models by a score, unpack the prompt, the split, the sample size, and the judge. Most of the difference is in the setup.
-
Evaluation
What the tokenizer does to your eval
Token counts are not word counts. A benchmark that truncates silently is measuring your tokenizer, not your model.
-
Architecture
MoE: you pay for the parameters you don’t use
Sparse experts cut the compute per token. They do not cut the memory, and the router has opinions about your batch.
-
Architecture
A transformer is a stack of weighted averages
Attention as a weighted average, the MLP as a per-position transform, and the residual stream as the thing every block writes to.