18/29
Part 5 of 6 · The whole samplerLearn and do

Temperature and top-k can swap places, top-p can't

Does the order really matter? Test each pair.

for T in (0.5, 1.0, 2.0):
    print(T, torch.isfinite(filter_logits(row, T, top_p=0.9)).sum().item())
Predict

Top-p 0.9 after dividing by T = 0.5, 1 and 2. How many tokens does the nucleus hold?

Pick one to see what it prints.
Pick an answer above to see the rest