← Lab
samplercost
confirmedPython · llama.cppInference, serving & evaluationJuly 6, 2026
the question
Which sampling method actually costs latency, and does sampler order matter?
what came out
top-p is the costly one; top-k and min-p are near free; putting top-k before top-p removes top-p's cost (it shrinks the candidate set first); and top-p's overhead is larger for the smaller model. All four pre-registered predictions held.
method & receipts
- Result: confirmed
- Pre-registered: the prediction was written down and committed before the run.
- Reproducible: one script re-runs the whole thing from scratch.
- Adversarial self-review: my own skeptic's pass over each claim, kept in the repo.
- Machine-readable claims: every reported number, in a checkable file.
- Tested: a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/samplercost