Skip to content
← All tracks

Decoding Strategies

PyTorch

Greedy through speculative — every way to turn logits into tokens.

0 / 8 solved
  1. 1. Not solved yet. Greedy Decoding
  2. 2. Not solved yet. Temperature Scaling
  3. 3. Not solved yet. Top-k Sampling
  4. 4. Not solved yet. Nucleus (Top-P) Sampling
  5. 5. Not solved yet. Beam Search
  6. 6. Not solved yet. Speculative Decoding Accept/Reject
  7. 7. Not solved yet. Nucleus Sampling Generation Loop
  8. 8. Not solved yet. Causal LM with KV Cache Generation

Check yourself

4 questions · one attempt each

These do not count toward finishing the track. They are here to catch the things that are easy to read past.

0 / 4

What does beam search find that greedy decoding misses?

# greedy: argmax at each step
# beam:   keep the k best partial sequences
Question 1 of 4