// ⚡ Inference Acceleration & Serving
Temperature & Nucleus (Top-p) Sampling
Controls randomness by sampling only from the top-p probability mass.
温度与 Top-p 采样 2019 Beginner core
IN PLAIN WORDS
Greedy decoding repeats; pure sampling rambles. Top-p keeps the smallest set of tokens covering probability p, and temperature sharpens or flattens the distribution.
Used in: temperature / top_p in every LLM API
TIMELINE · prerequisites → this → what builds on it
01Original paper
The Curious Case of Neural Text Degeneration
Ari Holtzman, Jan Buys, Li Du, et al. · 2019
arXiv ↗ ✓ Verified · arXiv API
02Where it sits
Learn the left column first; the right column builds on this one.
Learn first
Then you can learn
Left: prerequisites · right: builds on this · dashed: related. Full map →
03Learning resources
Official docs, explainers, courses and reference code. All links checked.
04Where the course teaches it
On learning paths:Understanding an LLM End to End
For AI / data
- Verification: verified, checked 2026-10-21.
- JSON: /api/learn/algorithms.json (id:
sampling)