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.

01

Inference

3 notes

KV caches, speculative decoding, quantization. The memory and latency bill for serving a model, and which lever actually moves it.

  1. The KV cache is the real context window

    Long context is a memory budget, not a model feature. The arithmetic behind the cache.

    9 min
  2. Speculative decoding is a bet on your draft model

    The target still does the work. The speedup lives or dies on the acceptance rate.

    8 min
  3. Quantization is a memory trade

    Fewer bits buy memory and bandwidth, not FLOPs. What you trade depends on the task.

    9 min
02

Retrieval

2 notes

Embeddings, rerankers, and RAG. What makes the right passage reach the context, and how to tell when it did not.

  1. Embeddings and rerankers do different jobs

    Recall decides what enters the shortlist; the reranker decides the order.

    7 min
  2. RAG is a retrieval problem

    If the passage never reaches the context, no prompt will save the answer.

    10 min
03

Evaluation

2 notes

Tokenizers, benchmarks, judges. How to tell whether any of it worked, and when the number is a setup artifact.

  1. A benchmark number is a claim, not a measurement

    Unpack the prompt, the split, the sample size, and the judge before comparing.

    7 min
  2. What the tokenizer does to your eval

    Token counts are not word counts. Silent truncation changes the measurement.

    6 min
04

Architecture

2 notes

Transformers and mixture-of-experts. The block, the routing, and what it costs to serve.

  1. MoE: you pay for the parameters you don’t use

    Sparse compute, dense memory. The router has opinions about your batch.

    8 min
  2. A transformer is a stack of weighted averages

    Attention as a weighted average, the MLP per position, the residual stream.

    7 min
05

Training

1 note

Fine-tuning, adapters, and the decision between changing the model and changing the context.

  1. Fine-tuning or RAG? Start with the failure

    Retrieval adds knowledge. Fine-tuning changes behavior. Diagnose first.

    8 min