How Text Generation Works
From logits to the next word: how an LLM actually turns your prompt into text, one token at a time.
START HEREWhat Is Next-Token Prediction? How LLMs Actually Generate TextThe one idea behind every LLM: predict the next token, append it, and repeat.BEGINNER
INTERMEDIATEWhat Is Autoregressive Generation? How LLMs Write One Token at a TimeINTERMEDIATELogits in an LLM: Raw Scores to a Logits Probability DistributionINTERMEDIATESoftmax Function Machine Learning Guide: Turning Scores Into ProbabilitiesINTERMEDIATEToken Sampling vs Greedy Decoding: How an LLM Picks the Next Token