Explore Library
FlashcardIntermediate

Top-k and Top-p Sampling

Two ways to limit which next tokens an LLM can sample from.

Question

How do top-k and top-p (nucleus) sampling differ?

Click to reveal answer