For real though: how do you think they predict the next tokens?
I mean, they do generate sequences of tokens based on the input prompt and a huge amount of data, but saying they "predict the next token" completely misses the point and doesn't explain why they're able to solve problems that have stumped the brightest living humans for decades or even centuries. Folks lately have taken to referring to it as "compression", but even that term is lacking. You can't "compress" or "predict" 2+2 and get 4 unless it's already in the training data, but LLM's can and do learn to do math, logic, and other multi-step computational tasks that aren't in the training corpus every day. I've trained a few myself.
I might be wasting my time explaining, but I'll try:
During training the output they generate is scored based on how well it matches novel data that is NOT IN the training corpus. Essentially they have to compress the sum total of human knowledge, give or take a bit, in such a way that it produces an output that answers the prompt without ever being told what the correct answer was until after the fact, that means they have to determine how to generate the correct answer given only the information they have in the weights, the prompt, and a bit of compute. They often have to do that without the correct answer even existing in the training data.
They can only achieve that miracle because they are taught using criteria that typically involve logic, reasoning, math, and other skills that many humans don't even possess. They aren't just databases, they aren't just autocomplete, and they aren't just "predicting" the next token... They are generating a novel output based on the training data, the weights, the prompt - and perhaps most importantly - a great deal of computation.
END. OF... Nevermind.
it's a next token predictor