Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

next-token distribution

The full probability distribution a language model produces over every possible next token, before any token is actually chosen.

The next-token distribution is the probability distribution P(w_i \mid w_{<i}) a language model outputs over its entire vocabulary at each generation step, produced by applying softmax to that step's logits. A sampling strategy (greedy, temperature, top-k, top-p) turns this distribution into one chosen token.

Examples

  • Given "The capital of France is", the next-token distribution might assign 0.92 to "Paris" and spread the rest thinly across thousands of other tokens.

Read the full section →
Graph settings

Calculator