2026-09-21
Daily Tech Challenge
An LLM server replaces top-p with min-p sampling, implemented as below with min_p = 0.1. How does the set of candidate tokens behave compared with a fixed cutoff?
probs = torch.softmax(logits / temperature, dim=-1) threshold = min_p * probs.max() probs = torch.where(probs >= threshold, probs, torch.zeros_like(probs)) probs = probs / probs.sum() next_token = torch.multinomial(probs, 1)
Monday, September 21, 2026 · A new challenge drops every day