How does an LLM (Large Language Model) actually generate text?

Reviewed by Jason Burns, Editorial Steward · Last updated

A large language model generates text one token at a time by predicting the probability distribution over the next token given all preceding tokens, then sampling from that distribution using settings like temperature and top-p.