Belajar
Tutor AI
Berita
Alat
Pekerjaan
Glosari
Sijil
Kuiz
Misi
Sokongan
English
Search
⌘K
Hantar alat
Derma
English
Search
⌘K
Belajar
AI Guides & Foundations
Tutor AI
Ask AI anything, free
Berita
Latest AI Developments
Alat
Top AI Directory
Pekerjaan
AI Hiring Board
Glosari
AI Terms Dictionary
Sijil
Get Your AI Certificate
Kuiz
Interactive AI Assessments
Misi
Why We Exist
Sokongan
Help and Contact
Hantar alat
Derma
English
Home
/
Glossary
/
Top-k Sampling
AI Glossary Term
What is Top-k Sampling?
Definition
A decoding strategy that samples only from the k most likely next tokens.
Related terms
Top-p (Nucleus) Sampling
A decoding strategy that samples from the smallest token set whose probabilities sum to p.
Guarded Decoding
A generation strategy that constrains output tokens to valid structures or policy-compliant choices.
Few-Shot Learning
Learning or adapting behavior from only a small number of examples.
Perplexity
A language-model metric measuring how surprised the model is by true next tokens.
Speculative Decoding
An inference acceleration method where a small draft model proposes tokens that a larger model verifies in parallel.
KV Cache
Stored key and value tensors from previous tokens that let transformers generate new tokens without recomputing past attention.
Learn more in our free guides
Typical Sampling
Speculative Sampling Verification
Entropy-Based Sampling
Early Stopping
Browse the full AI Glossary
Explore all free AI guides