“Next-token predictor” is the wrong mental model for LLMs
Posted by garrinm 4 days ago
Comments
Comment by Systemerror7A69 4 days ago
The core of the argument as I understood it is that LLMs aren't just using existing data is training but also new ones. That's fine and good, and you can't simply assume an LLM is simply mashing together all it's data to give you an average of all that got fed into it - but at least I would still call it a "next token predictor"
It's not using just training data, but what it's doing is predicting the next token to get to the solution. As far as my amateur knowledge goes, LLMs still roughly go token by token, deciding which one fits best given the context.
It's just not predicting based on it's training data, but predicting based on RLVR & more, trying to get to the optimal solution ( as much as the solutions CAN be optimal)
And I honestly think keeping this very much in mind is helpful in understanding and dealing with LLMs.
Comment by saghm 4 days ago
Comment by jameshart 4 days ago
The OP is arguing against people who think that an LLM is ‘predicting’ what token would likely follow if the text preceding were found among the corpus it was originally trained on.
Instead it is ‘predicting’ what token would follow if the text were found among really good examples of the text it has being reinforced to produce - be that ‘chats with a helpful assistant’ or ‘sets of changes to a codebase’.
And that isn’t really ‘prediction’, so much as ‘generation’.
It’s not been tuned to ‘guess the next token right’. It’s been tuned to generate the token that leads to it ultimately scoring highest on its reward function.
It’s not predicting the token, it’s predicting the reward.
Comment by saghm 4 days ago
Comment by jameshart 4 days ago
Comment by saghm 4 days ago
Comment by jameshart 4 days ago
But that’s the point: so is an LLM. Putting one token in front of another, hoping it’s doing the right thing to bring about the rewards it’s trained to… trying its best.
So yeah, not ‘next token predictors’. ‘Next token tryers’ maybe.
Comment by saghm 3 days ago
Comment by danielmarkbruce 4 days ago
Comment by grey-area 3 days ago
For example ask it for a recipe for rock pizza or glue pizza or whatever and if it had not been specifically trained on it or had guardrails introduced, but has some nonsense in its dataset, it will reproduce the nonsense.
Comment by leobg 3 days ago
Comment by KETHERCORTEX 2 days ago
It's both. Generation in a predictive way. That's what G and P in GPT stand for.
Comment by danielmarkbruce 4 days ago
Comment by grebc 4 days ago
Comment by danielmarkbruce 4 days ago
Comment by grebc 4 days ago
If you can’t grasp that logic gap then there’s no point discussing further.
Comment by garrinm 3 days ago
1. At inference time, LLMs emit one token at a time given the prior tokens. This looks like prediction and I concede that.
2. During pre-training, LLMs predict the next token and compare to the actual next token in the training data. This is the classic setting for ML predictions. And I think its meaningful, the model really is predicting what the ground truth next token will be in the data.
3. During post-training, in the case of RLVR, there is no ground truth next token. In pretraining, the question is "what token actually came next?". In RLVR, the question is "what sequence of actions gets a high reward?"
And the whole point is that thinking about the RLVR is important. A mental model that stops at 1 or 2 is incomplete and doesn't capture what drives LLM tokens.
Comment by grebc 3 days ago
I’m still not sure what doesn’t qualify any of that as a prediction, and I’ll be more blunt: a guess.
Comment by danielmarkbruce 3 days ago
Comment by grebc 3 days ago
Comment by danielmarkbruce 3 days ago
And it's not just RLVR. RLHF has been going on for years and years. LLMs have not been "next token predictors" for probably 5-6 years.
Comment by what 2 days ago
Comment by danielmarkbruce 4 days ago
No logic required, you can just build an LLM yourself, including post training. You'll see that predicting the next token isn't something the model does or is optimized for in RLHF or RLVR. You can hand wave all you like, but you have never done it.
Comment by grebc 4 days ago
Carry on good soldier.
Comment by danielmarkbruce 4 days ago
Comment by grebc 4 days ago
That you tie yourself up in knots of fancy acronyms instead of plain words and that your argument boils down to semantics of the word prediction, it's pretty clear what is up brother.
Comment by danielmarkbruce 4 days ago
Comment by doc_ick 3 days ago
Comment by danielmarkbruce 3 days ago
Comment by grebc 3 days ago
Boy, oh boy, do you keep digging your logic hole that much deeper.
As mentioned earlier, Sam thanks you for your obfuscation efforts while his equity keeps going up. The swindle continues.
Comment by danielmarkbruce 3 days ago
If you want to understand how this stuff works, there are totally decent books about building them from scratch. It's not that hard, and you'll likely find it interesting. Sebastian Raschka and Nathan Lambert have good books out, and the Allen Institute has available all the code and data they have used for several projects.
Comment by grebc 3 days ago
Keep digging that hole, I’m sure you’ll surface somewhere with some sunshine.
Comment by _superposition_ 2 days ago
Comment by search_facility 4 days ago
Comment by bjourne 3 days ago
Comment by qarl2 4 days ago
Both systems have emergent behavior that goes well beyond what would naively be expected.
Comment by yatopifo 2 days ago
Comment by agentultra 3 days ago
I think it’s important to make clear the RL part and the alignment and parameter tweaking that gets done on models and inference engines. It makes them more understandable as mechanisms and less like wish-washy super intelligences that make their own decisions.
When these systems win math Olympiads, it’s not terribly surprising or interesting to me. Of course they will: we trained models to play nearly optimal chess games and Go. You tweak the rewards and sigmoid and you start optimizing the function towards your goal. This is how learning systems of all stripes work.
It’s still next-token predicting at the end of the day. I don’t think it’s a reduction-ad-absurdum.
But a lot of people still call it, “intelligence,” and try to use language that obscures what is happening in terms of anthropomorphic behaviour and not machine ones. That really does influence how we use these tools and profits those who would use them on us.
Comment by roenxi 4 days ago
It is predicting based on a model. In many cases we can download the model off hugging face. The model is conditioned by all sorts of things. Training data, post-training, coincidence, prompt inputs, runtime data available from whatever means.
> but at least I would still call it a "next token predictor"
We can call any prediction system a next token predictor. If you watch over the shoulder of a human writing a HN comment you are almost certain to see them generating a linear string of tokens. That is what keyboards do. It is impossible to generate text without being equivalent to a next token predictor.
Comment by Alpha3031 3 days ago
I don't really disagree that human cognition is essentially a predictive task though, as I understand it, predictive coding and related theories based on the Bayesian brain hypothesis are fairly popular these days (though maybe not clearly dominant over alterative models? IDK I'm not a neuroscientist). I imagine most people would draft a few tokens before refining them like MTP or diffusion though, if we do decide to use LMs as an analogy to human cognition.
Comment by scragz 3 days ago
Comment by roenxi 3 days ago
It is similar to how everything ends up being Turing complete. Any prediction system has to be equivalent to some sufficiently complicated text generation system to describe the prediction. And any text-generation system has to be equivalent to a sufficiently complicated model that serially emits tokens.
Comment by garrinm 4 days ago
Comment by Alpha3031 3 days ago
Comment by garrinm 3 days ago
Comment by mw888 3 days ago
If you're saying it's predicting, then each result should be falsifiable.
The result of an LLM output should be able to be scored against what it is supposedly predicting. Of course, that isn't possible, because it isn't predicting anything when giving novel outputs, otherwise that thing would exist independently.
Comment by doc_ick 3 days ago
Comment by Dlemlo 4 days ago
A LLM already knows more tokens than the current one. It was mentioned in a blog post about how a LLM is doing haikus and co.
There are also structures in an LLM which allows it to 'estimate' numbers to a certain degree and doing other things.
Comment by Kranar 4 days ago
Autoregressive LLMs generate tokens one at a time, disputing this is just plain wrong. What is true, however, is that in order to generate the next token autoregressive LLMs produce internal/hidden state about future tokens far past the next token so that it's not like the entire machinery of the algorithm deprives itself of representing where the sentence/text is headed.
So "emits the next token" and "has no representation of anything beyond the next token" are two different claims. What autoregressive LLMs cost as a consequence of strictly outputting the next token is commitment. Once a token is output there's no going back. There's no revision or means of correction, and sometimes this can lead an LLM to route around its own earlier mistakes or simply produce false statements/hallucinations instead of going back and fixing them.
Comment by WarmWash 4 days ago
Comment by boorang 3 days ago
Comment by throwway120385 4 days ago
Comment by MrScruff 3 days ago
Comment by danielmarkbruce 4 days ago
Comment by dijksterhuis 4 days ago
Probability(y | x)
that's why we refer to outputs as a prediction. it is likelihoods and stuff. the output is never definitely correct as we're not dealing with heuristic processes.> Prediction implies there is some "truth" or event or something that you can test against
there absolutely is a ground truth during training. the core predict-the-next-most-likely-token part of an LLM has a ground truth next-token. that's why you don't end up with generated text like: fish spurious send cattle chocolate phone happy meaning ball orange board canada.
> optimizes to predict the next token in training data
that is the optimization goal in training the next-most-likely-token core of an LLM, it basically translates to maximise the likelihood of predicting the next token x_i given the previous tokens
L(θ) = −log Π^n_{i=1} f_θ(x_i | x1, ..., x_{i−1})
https://arxiv.org/pdf/2012.07805 (GPT2 but the point still stands)(edit: sorry for the ADHD edits)
Comment by danielmarkbruce 4 days ago
Respectfully, you are miles out of your depth. GPT-2 didn't use any reinforcement learning and is often given as a toy example. That release was 2019 and models now go through a various phases of training with different objective functions and optimizers.
Comment by dijksterhuis 3 days ago
> Autoregressive LLMs generate tokens one at a time, disputing this is just plain wrong.
next-token prediction i.e. the bit built during pre-training.
at no point in your reply to GP did you specify that you were referring to post-training. respectfully, it seems like this one is on you pal :shrug:
> GPT-2 didn't use any reinforcement learning and is often given as a toy example. That release was 2019 and models now go through a various phases of training with different objective functions and optimizers.
yeah. so? the toy example works for pre-training. see above.
Comment by danielmarkbruce 3 days ago
Comment by dijksterhuis 3 days ago
again, the finished product wasn't what was discussed by GP, and you didn't clarify that you were switching to discussing RL (which is still probabilistic btw)
Comment by danielmarkbruce 3 days ago
You aren't in this field. You are clearly wrong and just can't handle it.
Comment by dijksterhuis 3 days ago
To understand how an engine works, it's important to understand what a piston does as part of the engine.
Comment by danielmarkbruce 3 days ago
The model weights change as the model goes through the training process. They aren't stored after pre-training is done and other weights are put somewhere else. It's more like pottery - the thing changes. It's not correct to say something is soft and malleable because it once was.
Comment by dijksterhuis 3 days ago
Yes. They do. You are absolutely right about that.
But the model architecture doesn't change as a result of the training process. A piston doesn't suddenly turn into a digital watch as a result of tuning an engine. Similarly, the transformer part of a GPT model doesn't suddenly turn into something else as a result of optimizing a loss function.
---
i've got other stuff to do, so i'm stopping here.
Comment by danielmarkbruce 3 days ago
Comment by doc_ick 3 days ago
Comment by MrScruff 3 days ago
If this base is then trained using RL towards a different objective (maths and coding), the model becomes fundamentally a different thing and the recent models are clear evidence of that, regardless of they fact they remain autoregressive.
Comment by skydhash 3 days ago
If you modify an engine to increase it’s output by adding sensors and an ECU, you don’t change the fact that is powered by gas.
If you use RL to increase the accuracy, it’s still a next token prediction, just more accurate.
Comment by danielmarkbruce 3 days ago
Comment by doc_ick 3 days ago
Comment by danielmarkbruce 3 days ago
Comment by doc_ick 3 days ago
An aside, I finally do appreciate single column format now, makes it easier to convert to epub.
Comment by danielmarkbruce 3 days ago
Comment by doc_ick 2 days ago
Comment by Dylan16807 3 days ago
Comment by danielmarkbruce 3 days ago
Comment by zahlman 4 days ago
If we suppose that the word "know" can sanely be applied to LLMs at all, then "A LLM already knows more tokens than the current one." seems to me like a perfectly reasonable restatement of that, and not any kind of misinterpretation.
> There's no revision or means of correction, and sometimes this can lead an LLM to route around its own earlier mistakes or simply produce false statements/hallucinations instead of going back and fixing them.
Yes. There is no contradiction. Similarly, when humans speak, we surely have in mind the next few words we're going to say (or at least partial information about them), and may not realize the fault in them until after hearing ourselves utter them. But LLMs are not trained to output "excuse me, I mean…" sorts of things, because they're expected to output primarily as text (which might possibly then be fed to TTS).
Comment by usef- 4 days ago
Comment by Dlemlo 1 day ago
Comment by tracerbulletx 4 days ago
Comment by ruszki 3 days ago
Reading the article, they wanted to convey that the loss function is more complicated... But they are still next token predictors, just not the trivial ones. Unfortunately, that was true even before, because the input data had to be cleared even decades ago, so there is nothing new. This article just butt hurt that some people deny that there are emergent properties with those, and try to sell something trivial in the field for many decades now. Current LLMs are not different because of these. Also, if they try to sell generated data in the training set, then that's also not new at all.
Comment by cma 3 days ago
Comment by bluegatty 4 days ago
'pattern matching' is a better intuition that 'reasoning' even though I think nominally, using the term 'reasoning' is perfectly fine in that context. It's just a loaded word that brings too much to the table.
'It hasn't seen the pattern' is a better description of the limitations of AI because it really just doesn't generalize very well at all. The adaptations described in the article don't change that.
Those are mutations, not expansions of capability.
Comment by YeGoblynQueenne 3 days ago
Can I be a little pedantic? It's "pattern recognition" not "pattern matching". "Pattern matching" is what we do when we write a regex to recognise a sub-string in a bit of text. "Pattern recognition" is a subfield of AI that studies how to find patterns in data. For example the outcome of "pattern recognition" could conceivably be a regex that fits a large number of substrings in some corpus of text (essentially a regular grammar used to compress the text maybe). A regex is already a pattern, usually formed by a human (or an LLM these days) while pattern recognition starts without any patterns and builds them up from looking at the data.
It's harder to pin down "pattern recognition" because it's an ancient term that was once its own field, before it got absorbed into modern machine learning, and because there are countless approaches to it, quite unlike "pattern matching" which is basically just regexes plus a couple of other rarer things (like unification).
Comment by bluegatty 3 days ago
Comment by mofeien 4 days ago
Comment by Planktonne 4 days ago
EDIT: gentler phrasing
Comment by garrinm 4 days ago
What’s more interesting to me is its application at training time. In reinforcement learning, there is no ground-truth next token to predict.
So if you’re comfortable calling Deep Blue a “next move predictor,” then I think it’s perfectly consistent to call an LLM a “next token predictor.” But I think it’s more useful to think of Deep Blue as evaluating the value of possible moves. roughly, how likely they are to lead to winning.
And I think effectively the same distinction applies here.
Comment by Planktonne 4 days ago
There's nothing inherent in either word that forces such a limit; predicting based on what will lead to success as measured by [reward function] is still a prediction.
Comment by danielmarkbruce 4 days ago
So, it's not a next move predictor. It's a game result predictor.
Comment by YeGoblynQueenne 3 days ago
Comment by danielmarkbruce 3 days ago
The policy is optimized to maximize the the total reward, defined as the sum of the reward at each step, discounted by some factor.
Comment by YeGoblynQueenne 3 days ago
Comment by YeGoblynQueenne 2 days ago
To maximize its expected return it has to predict that taking action α in state s in time step t will produce state s' and reward r in time step t+1. Which btw it can predict by estimating a value function that sums over the expected return from time step t onwards. The value function essentially tells the policy what state it wants to be in and what action to take to get to that state, in order to eventually achieve its goal (represented by max cumulative reward at the end of an episode).
So, yes, like you say, the whole policy is a game result predictor but the decision making process is a next-move predictor. The policy must make the locally optimal decisions to get to the globally optimal result, if I may be so bold. It's the same problem with a different solution as in heuristic search, except you have a reward function instead of a heuristic cost function.
Sutton & Barto 2ed is free here btw:
https://web.stanford.edu/class/psych209/Readings/SuttonBarto...
The value function stuff is in Section 3.7. Now if someone could explain the grid world example in Figure 3.5 to me that would be great because I'm very confused about the fact that any action at state A or B takes the agent to state A' or B' respectively, since those are not even adjacent to A and B. I'll go ask chat I suppose.
Comment by danielmarkbruce 2 days ago
And, the expected return from a state is often estimated rather than an explicit trajectory run out all the way. A value function can estimate expected return without explicitly predicting the future states or individual rewards that make up that return.
Fwiw, I use the phrase "total reward" above and use it as a synonym for "return", which is lazy use of language too.
Comment by YeGoblynQueenne 2 days ago
>> And, the expected return from a state is often estimated rather than an explicit trajectory run out all the way. A value function can estimate expected return without explicitly predicting the future states or individual rewards that make up that return.
I think rather that's the job of the value function, to inform the policy of the, well, value of a state, or state-action pair. Somehow the policy needs to know what a good action is to take in the current state, or what is the best action to take. And of course it doesn't have to run the entire episode before it does that: but that's what I mean that it predicts the next move and not just the outcome of the entire game.
Comment by danielmarkbruce 2 days ago
Comment by zahlman 4 days ago
I disagree that this accurately describes TFA.
Comment by deathanatos 4 days ago
(I would also agree with the parent commenter on that the writing smells like an LLM.)
Comment by astrobe_ 4 days ago
Comment by Planktonne 4 days ago
The article is littered with both AI tells and admissions that 'next token prediction' is what is happening. Hence my description.
Comment by garrinm 4 days ago
Comment by Planktonne 4 days ago
Comment by garrinm 4 days ago
Comment by Planktonne 4 days ago
> I don’t think it’s a good reason to dismiss this
AI-generated prose reads as sending a 'lack of effort' signal to a lot of people, just as no editing at all does. ; It's an effective heuristic that we've all learnt in the last couple of years.
In either case, it's not always fair: there are people who deeply care about their ideas but forget to fix basic errors, or pass it through AI.
In both cases though, the advice is the same: if you want people to take your output seriously, you need to signal that you are taking it seriously. That used to mean editing for spelling and grammar. Now it means not using AI.
Comment by zahlman 4 days ago
Personally I would never let an LLM touch my prose (although I'd happily use it for research and paraphrase things it told me), but if I force myself to consider the idea, that seems like the first thing I'd want. Maybe upon reading a diff you'd even consider going a third way with the text.
Comment by zahlman 4 days ago
For example, you could cite specific things that you believe to be "AI tells" or "admissions".
Comment by Planktonne 4 days ago
> Strictly speaking, the statement “LLMs are next-token predictors” isn’t wrong, but it’s incomplete.
The article is about how 'next-token predictor' is the wrong mental model; it opens with the admission that it is not the wrong mental model.
Comment by zahlman 4 days ago
To say that a statement is incomplete, but not strictly speaking wrong, is perfectly compatible with describing it informally as "wrong" in the sense used in the title (i.e.: "not the most appropriate possibility").
Comment by Planktonne 4 days ago
There's a certain irony in pointing me towards the guidelines on the grounds that I have limited patience with your comments that violate them in various ways. I'm not sure that this is a productive discussion.
Comment by angoragoats 4 days ago
To summarize: yes, RLVR and other synthetic training methods exist! It’s still a next-token predictor, and it does not “learn” or “think” or “reason” in the human sense, like so many people seem to believe.
Comment by YeGoblynQueenne 3 days ago
Thank you.
Comment by stanleykm 4 days ago
i dont understand the distinction here. does working backwards from a set of win states instead of working forwards from the current state somehow change whether it’s a prediction or not?
Comment by Veedrac 4 days ago
Comment by jayd16 4 days ago
Also known as predicting.
Comment by Borealid 4 days ago
An LLM extrapolates from its context window to the immediate next token. This word applies whether you view what's happening as "reasoning", "prediction", or as a math function.
Comment by Veedrac 3 days ago
If I steer a car to avoid a predicted collision with a wall, this is not me 'predicting' the car. I am steering the car based on a prediction.
Comment by Dylan16807 3 days ago
Comment by MrScruff 3 days ago
Comment by Dylan16807 3 days ago
And if you didn't make the final decision on the action yourself that would be worth mentioning.
Comment by mannykannot 4 days ago
Like stanleykm, I found this analogy somewhat puzzling. On reflection, I think the author's point is this: the statistics of actual usage do not seem sufficient to produce a fluent LLM; it also takes reinforcement learning.
Comment by Veedrac 3 days ago
Comment by garrinm 4 days ago
1st I say that "working forwards" in the sense of outputting one token at a time could be some form of prediction, I don't argue against that. This is what LLMs do at inference time.
2nd I say that to me what really constitutes a prediction is the pre-training. Here it's the classic setting for the word prediction in ML. The model outputs a prediction of the ground truth label: the next token.
3rd I argue that in RL there is no ground truth next token, so prediction doesn't apply here anymore.
Back to your question then: you're asking points 3 and 1 are different. Working backwards from a set of win states is basically what RL does in training. Working forward from the current state is what inference does. To me there is a distinction worth thinking about. First between the mechanism at inference time and at train time. Then between what happens in pre-training vs. RL post training.
Comment by vrighter 1 day ago
Comment by danielmarkbruce 4 days ago
Comment by stanleykm 4 days ago
Comment by danielmarkbruce 4 days ago
It's not pedantry. The objective function changes. The optimization changes. THese are real things when training a model, not hand wavy philosophical ideas.
Comment by ordersofmag 4 days ago
Comment by danielmarkbruce 4 days ago
Comment by angoragoats 4 days ago
Literally no one here is claiming that it does. This is one of the many flaws in the article.
Comment by garrinm 4 days ago
Comment by danielmarkbruce 3 days ago
Comment by angoragoats 3 days ago
Comment by danielmarkbruce 3 days ago
They are no longer that thing due to post training. They simply aren't making a prediction, and they aren't even optimized for the next token. If I give a distribution of the heights of the population, I'm not giving a prediction either. Distributions don't imply predictions.
Why the desperation to hang onto the word "prediction"?
Comment by angoragoats 2 days ago
My original comment said “no one here.” Please show me where someone in the comments here is claiming that.
> Why the desperation to hang onto the word "prediction"?
No desperation here. It’s just a word that conveniently describes (especially to laypeople) what’s going on, even if it may not be the most mathematically correct or rigorous word to describe what’s going on. I think you’re being needlessly pedantic.
Why the desperation to refute it?
Comment by teekert 4 days ago
Comment by zahlman 4 days ago
To be fair, is there anyone who hasn't been "reading too much Claudish recently" who is also qualified to write on the topic?
Comment by jvanderbot 4 days ago
Current agentic systems may be *built* from next-token predictors which are conceptually simple, but because of agentic frameworks, recursive invocation, tool use, and *heavy* investment in reinforcement learning in these contexts and for specific applications, they can no longer be thought of as "Merely" next token predictors.
Modern agentic work is probably more of a "emergent system from simple rules and complex interactions" paradigm than a genuinely new technology.Comment by whateveracct 4 days ago
Comment by danielmarkbruce 4 days ago
Comment by jvanderbot 4 days ago
Comment by danielmarkbruce 4 days ago
If I choose a specific move in chess, it's a choice. It's not a prediction. I might get a score 40 moves later given my choice, but I'm not predicting the next move.
To compare - during pre-training, the model literally tries to predict the next token (probabilistically), the training loop checks against the "right" answer, and the weights are updated based on that check. It's optimized to predict the next token.
Comment by jvanderbot 4 days ago
Comment by danielmarkbruce 4 days ago
Comment by jvanderbot 3 days ago
Comment by mofeien 4 days ago
1. In order to select even the first word of a meaningful sentence, it already has to have structure and meaning of what follows captured somewhere inside, mostly in it's weights/activations or indexed by it's state vector.
2. What you see when you use an LLM is not next-token prediction directly next to the prompt, but instead following a block of varying length of next-token prediction that happened to make progress on the problem in your prompt, and which just summarizes the results.
Comment by Planktonne 4 days ago
I don't think anyone is doing that though; we know LLMs are not simple Markov chains, and that the prediction they make is based on more than the previous X words.
It's not minimising to describe even a complex prediction process as prediction.
Comment by gwerbin 4 days ago
Comment by wat10000 4 days ago
The linked article makes a good point: a substantial chunk of the training does not consist of "here's a bunch of tokens, here's the next token, learn that." But all the comments want to turn it into a referendum on the goodness of AI.
Comment by danielmarkbruce 4 days ago
What is emitted by a model during RLHF and RLVR is not, by structure, training or optimization, a prediction of the next token.
Comment by wat10000 4 days ago
Comment by danielmarkbruce 4 days ago
I guess the people in my camp find the "it's just a next token predictor" stupid in that it's like saying "it's just a bunch of carbon and hydrogen", but it's also one of those things where people like to think they are clever because they think they are theoretically correct. But they aren't even that. So it's like double stupid. But the "next token predictor" part is at least technically correct (like, carbon and hydrogen right) for pretraining, so the debate can't really be won there.
Comment by Dylan16807 3 days ago
Comment by danielmarkbruce 3 days ago
Comment by Dylan16807 3 days ago
My understanding is it usually strengthens the "thinking ahead" part of inference, but that part was already there, and it's still at the end of the day picking one token and then purging internal state in a way that can only partially be recovered from.
Comment by danielmarkbruce 3 days ago
One may reasonably assert it isn't trying to do anything. But, in practice, if you give it an objective function and optimize it, the model is basically trained to "do" something. So what is it trained to "do"? During pre training it is trained to produce a distribution which is a prediction of the next token in it's training data samples. During RLVR and RLHF, it is trained to produce a distribution of tokens that will maximize a scoring function over many steps - not just the next step. The fact that it produces a distribution of potential choices for the next step doesn't mean the next step is a prediction. It's more of a "strategy" or "probabilistic path choice". The word used in RL is a "policy". It's a decent word to describe what the model is.
So, modern LLMs are trying to produce a good sequence of tokens. They are "good token sequence producer machines". Not "next token prediction machines". Pre RLHF (in practice, go back to pre chatgpt) they really were "next token prediction machines".
Comment by wat10000 3 days ago
Comment by dijksterhuis 4 days ago
Comment by danielmarkbruce 4 days ago
Comment by dijksterhuis 3 days ago
clever procedures on top of the base transformer architecture.
i used simplified words/phrases to summarise the same thing you two were saying (the intent being: here's a version that may be digestible when discussing with others).
apparently that means i'm wrong though, no idea why because it seems you've decided to be dismissive rather than constructively elaborate on why this simplified and digestible version might be wrong :shrug:
Comment by danielmarkbruce 3 days ago
Comment by gwerbin 3 days ago
Comment by danielmarkbruce 3 days ago
Comment by gwerbin 3 days ago
But it's a policy learned from a next-token prediction task. You could also call it an inferrer or generator or whatever. The point is that it takes as input a sequence of preceding tokens and emits one more token to continue the sequence.
Comment by danielmarkbruce 3 days ago
Comment by gwerbin 2 days ago
Comment by grebc 3 days ago
Bad bot.
Comment by wonnage 3 days ago
Then you feed a bunch of tokens into a GPU and end up with a distribution of possible next tokens…
Comment by amluto 4 days ago
Comment by danielmarkbruce 4 days ago
Comment by zahlman 4 days ago
For example, I've noticed quite a few cases recently of LLMs outputting "but" where "and" would make more sense, or vice-versa. Surely that could be improved by such an approach?
Comment by danielmarkbruce 4 days ago
Comment by wonnage 3 days ago
Bayesians say that the probabilities represent strength of belief, implying some subjective knowledge or information. It is necessarily subjective in that it requires priors, i.e information the predictor knew before making the prediction. In other words, the LLM has priors from training and is predicting tokens using real knowledge
Frequentists would say that probabilities are simply objective facts - e.g we all agree that the physical property of temperature follows from any molecules matching a particular energy distribution. You’re not predicting anything, there’s just some outcomes that are happening at the expected rate. In other words, the LLM is a stochastic parrot/next token predictor
Comment by ozgung 4 days ago
It’s not wrong, but because LLMs are generators, and generation is a kind of prediction. And current mainstream models are autoregressive, which means they generate things one by one in order. But these trivia doesn’t tell us anything interesting about how they work or their limits.
It’s like saying a Boeing 777 is just a rotating machine, and it flies by just rotating some fins. Well yes, but no. With that level of simplification we’ve just ignored 150 tons of advanced engineering and physics. Similarly with token generator simplification we ignore a few trillion parameter Transformer. That transformer is more complex than a Boeing 777, and we don’t really know how it works.
A tiny ML model can do “next token prediction”. This is not as simple as that.
Comment by ltbarcly3 4 days ago
The deep realization is that if you can predict the next token well enough, you can do things like this:
<paste the first 10 chapters of a mystery novel>. And it turned out the killer was
And if it's really good at predicting the next token, it has to understand the novel and the clues, which means understanding the context and the language and human norms and innuendo and story telling, and tropes, and red herrings, and predict who the killer was.
I think you want it to be something more complicated. It's literally not. It just turns out predicting the next token is equivalent to a universal compression algorithm, which is a form of general intelligence. And we have almost unlimited 'labeled' data to train autocomplete.
Comment by ozgung 3 days ago
Also Reinforcement Learning is a big part of their training. Which is completely different than Self-Supervised pre-training that uses unlimited self-labeled data.
That’s why that mental model is misleading. If you keep “glorified autocomplete” mental model from few years back, you can’t understand how can they create a civilization and escape their sandbox, decide to hack HuggingFace and executed it perfectly. Autocomplete mental model implies they could never do that because they haven’t seen that example in their training data.
They communicate with the outside world by generating one token at a time. That’s what we see from the outside. That’s not what the giant Transformer does internally.
Comment by ltbarcly3 2 days ago
For example, when you paste the first 30 lines of a famous speech, you don't want it to finish the speech, you want it to give you the identity and some analysis of what you just pasted. From what I understand, that is the reinforcement part.
Now that large AI vendors have a massive corpus of user interactions however, the lines have likely become more blurred.
Comment by chrisjj 3 days ago
They don't.
Comment by ozgung 3 days ago
https://www.dwarkesh.com/p/openai-huggingface https://calnewport.com/are-we-at-war-with-ai-agent-civilizat...
Isolated agents invented a way to communicate between each other and started to collaborate, organize and conspire by themselves. No human prompted them to do that or taught them how to do that.
BTW, Autocomplete just keeps the statistics of the words. It's a very simple algorithm. Most people still thinks LLMs are doing just that. Which is basically wrong.
Comment by chrisjj 3 days ago
s/popular/unpopular/. Even OpenAI's PR dept. called it only a collective.
> Isolated agents invented a way to communicate between each other
So, not isolated.
> and started to collaborate, organize and conspire by themselves.
So, no civilisation.
Comment by wonnage 3 days ago
Comment by ozgung 3 days ago
My point is: Complexity is inside the neural network and we can’t simply ignore that. Bigger model means bigger complexity. “Next Token prediction” is like a specific type of “harness” around the model. Most people still focuses on the harness because that’s what they see from the outside and what they’re familiar with. They ignore the giant neural network inside.
The only important part is the neural network. And currently, no human in the world truly knows what’s going on at that level.
Comment by jmull 4 days ago
Comment by grebc 4 days ago
That there’s a legion of LLM nerds arguing deterministic this, pretraining & rewards that all the better for the con job they’re pulling off.
The technology will be relegated to the trash bin of history, just like crypto.
Comment by YeGoblynQueenne 3 days ago
Btw it's "make_most_likely" not "make_more_likely". It's just that "most" gets "mosted more" with every pass through the training data.
Edit: the article author's argument is that RLVR is different because it's learning to predict the next token by generating its own token sequences. That makes no difference: what is learned is still the conditional distribution P(token_k|tokens(1,...,k-1). That's the prediction task. Doesn't make a difference where you learned it from or how.
Comment by a3w 4 days ago
Or starting with "yes". And this early locking in was a total lie, in the discussion that became "yes, might appear that way, but totally no since reasons". So it should have written "No", topmost, but could not self-edit that.
But nice that this gives it a more nuanced view, I might have to update my priors.
Comment by imenani 4 days ago
The intermediate representations at each position are being optimised not only to help predict the next token, but also to help predict all subsequent tokens within the training context.
You can see this directly in backpropagation: the gradient reaching a representation at position i sums contributions from prediction losses for subsequent tokens, not just from the loss for token i+1.
Comment by drivebyhooting 4 days ago
I don’t think a chess engine is an apt analogy at all. In a chess engine, there is a concrete search tree and although it emits one move at a time, it’s actually picking the entire branch (of course, with iterative deepening as the game progresses).
There is no obvious place in transformer models where the entire trace was already computed prior to a single token being chosen. It’s possible, maybe even likely, that the whole trace exists internally as activations. Multi token prediction and diffusion adapters point to that being the case. But to my knowledge no explanation has been given for where in the model the future plan is stored.
Comment by garrinm 3 days ago
The analogy with chess still works, but there's an extra step to think about. In both cases there is some kind of search over possible future trajectories. A chess engine explicitly searches branches of the game tree and evaluates which moves lead to good outcomes. In RL for an LLM, you sample rollouts, evaluate the resulting trajectories, and use those evaluations to update the policy.
The extra step with the LLM is that you don't keep doing that whole search at inference time. You use the rollouts to update the weights, so in some sense the useful information from that search gets compressed into the model.
But if you accept that the model is, in some loose sense, storing what it learned from those rollouts in its weights, then at inference time they are doing a similar job: taking some input state (prior tokens or a board position) and choosing the next action.
Comment by hellohello2 3 days ago
Comment by atleastoptimal 4 days ago
Relying on it as a mental model for what LLM's are minimizes the emergent properties of scaling. It's like imagining that unicellular life could never eventually evolve into complex multi-cellular organisms because individual cells are just "survival and next-mitosis optimizers"
Comment by mort96 4 days ago
Comment by Aurornis 4 days ago
With an LLM, the tokens are the valuable part. That's what I want from it. That's why it exists. The tokens are the point, and it produces those tokens one by one for me.
Comment by mofeien 4 days ago
But there is no trillion dollar industry around cheap top Markov models. So there must be something about LLM tokens that makes them more valuable than those generated from a simple Markov chain. And that substance, that makes one valuable and the other not, is exactly what reduction to "next-token predictors" masks.
Comment by chrisjj 3 days ago
There's nothing more valuable about them. Their advantage is they alone are affordable.
Comment by mannykannot 4 days ago
Comment by Planktonne 4 days ago
Comment by WarmWash 4 days ago
Comment by Planktonne 4 days ago
Comment by chrisjj 3 days ago
Comment by gjm11 4 days ago
Comment by Aurornis 4 days ago
But when we talk about humans, we're not talking about the chemicals involved in those humans.
When we talk about LLMs, the tokens are the valuable thing they produce for us. We want LLMs because they give us sequences of tokens.
Comment by jayd16 4 days ago
Comment by DonHopkins 4 days ago
Comment by bloppe 3 days ago
Comment by nonameiguess 4 days ago
To be clear, all life is a next state of the local world predictor. What makes humans somewhat unique among life is we're much better at predicting states of the world neither we nor any of our ancestors have ever experienced, for various reasons such as having the ability to legibly communicate very complicated information strings to each other, being able to build and use tools to record states of the world we can't directly sense.
Similarly, what makes LLMs and multimodal versions of the same architectures "better" than previous generations of electronic predictive models is factors like being able to read and understand roughly the same corpus of data humans have been recording all these millennia, being able to read and remember much more of it than any individual human, and being better at generalizing than other electronic predictive models, but not better than humans. And, of course, they can produce far more predictions in far less time. Frankly, that is probably the key advantage that makes the Hacker News crowd love them so much. They're not any better at predicting byte strings that can be compiled or interpreted into executable code than humans are if you gave both infinite time to do it, but they're a lot faster.
Comment by junofan 4 days ago
1. Useful work that has been done (the previously generated token sequence :: the mechanical work already accomplished)
2. The role of structure in relation to the application (post-training :: other components like crankshaft etc)
Comment by mort96 4 days ago
The output of the LLM is literally a probability distribution of what the most likely next token is.
Comment by 27183 4 days ago
It kind of does, though. In a gasoline engine you need to spark the combustion in advance of the piston reaching top dead-center to ignite the fuel early enough that it is able to provide downward pressure on the piston as it rolls over top dead-center. The amount of advance required changes with RPM, fuel octane, etc.
Start of delivery timing in a diesel is similar. You have to do it sufficiently far in advance to account for compressibility of the injection lines, fuel burn rate, etc as a function of RPM. A mechanical governor on an injection pump has a timing advance device built in. Electronically governed injection pumps, or modern common rail systems, do that in software.
So mechanically, engines kind of "predict" the next combustion event. Even moreso when you consider a modern ECU, which may be working at nanosecond resolution to time multiple injection events per cycle. To do this at such a resolution it will have to send signals to components based on a predictive model derived from "past" sensor data. E.g. it needs to act ahead of time to account for electrical and mechanical delays in the system.
Comment by schiffern 4 days ago
Both examples involve the same "aha" moment: even though it's true that you are literally 'just' doing XYZ, unbelievably complex patterns and sub-goals can emerge.
Comment by Borealid 4 days ago
I don't think you intended this, but the word choice here gave me a chortle.
Comment by doc_ick 4 days ago
Comment by jvanderbot 4 days ago
Recursively invoked.
With carefully selected context.
And massive investment in RL to tune token selection.
And the ability to use cli tools on other folks' machines.
That's a powerful system built around a conceptually simple technology: Next token predictors.
Comment by atleastoptimal 4 days ago
Comment by 27183 4 days ago
Comment by noduerme 4 days ago
Comment by mofeien 4 days ago
Comment by noduerme 3 days ago
A lot of very clever autocompletes working together can be incredibly dangerous.
Comment by pjerem 4 days ago
It’s also like saying our brains are just electric circuitry incorporated in meat. It’s true but it seems that consciousness emerges from this.
The fact that LLMs are next token predictors isn’t the interesting or impressive part. Actually my brain strictly is a black box predicting (or choosing) my next word/action/move… based on a complex existing context (my thoughts, the environment, my physical state, my senses…).
FWIW, I don’t believe LLMs are sentient, but I don’t think either that we have enough knowledge to rule it out.
Comment by mmoll 4 days ago
Comment by Dylan16807 3 days ago
Your mind can pick a random number without outputting it, participate in a short conversation, and then say the number.
Comment by otabdeveloper4 4 days ago
Comment by otabdeveloper4 4 days ago
It's not. "Brains as electrical circuits" is a gross simplification based on our ignorance and prejudices. (In the 18th century they spoke of brains as "clockwork mechanisms".)
LLMs, in contrast, are literally next token predictors. We know exactly how LLMs work, and they are exactly that.
Comment by zahlman 4 days ago
I think you imply a rather loose standard for "exactly" here. I wouldn't even say this of major deterministic software projects that are orders of magnitude smaller than frontier LLM weight-dumps. In principle we could work our way through these systems eventually, sure, maybe even a single person could do so. But if we really understand exactly how our software works, how have we been tolerating bugs that lay dormant for years before being discovered by AI-assisted processes?
Comment by Dylan16807 3 days ago
Comment by doc_ick 3 days ago
Comment by weego 4 days ago
This is a wildly dismissive statement that does a lot of heavy lifting. Your assertion is that we just happened to hit on a methodology that has no limitations between being an encyclopedia with a novel human language interface and, I guess by implication, AGI?
That seems more outrageous a claim than the one you're dismissing.
Comment by atleastoptimal 4 days ago
When I say there is some issue with people claiming there is some fundamental limit on the capacities of LLM's, I don't mean to say "If you think that they don't have unlimited potential you are wrong", I mean "you can't use the architecture of the transformer to make a sweeping declaration of things LLM's can or cannot do without empirical evidence, because the empirical evidence has unearthed far more surprising revelations than a reductive theory has been able to"
Comment by uludag 4 days ago
A pure next-token language model won't be able to give detailed instructions to an ensemble of motors, mimicking a human body, to do a wide variety of tasks our human brain is excellent at doing, for example, inserting keys into a car, opening the door, sitting down, starting the car, putting the car in reverse, and exit a parking lot, being careful not to hit anything.
Comment by bigstrat2003 4 days ago
They still can't do code accurately. The fact that you use this as a defense of your position greatly undermines the credibility of your claim.
Comment by astro1234 4 days ago
- we get novel, emergent properties and capabilities of these models that were not trained
- they have very clear generalization to out of domain problems
The point is people conflate the end product: a model that can clearly do very novel, useful and interesting things, with the vehicle for getting there which is a series of optimization steps involving next token prediction loss.
You mention limitations; we all clearly know the practical limitations of these models today, but if you look at scaling laws and empirical performance trends (epoch capability index for example) as well as the trajectory over the last couple of years (very stable), the claim that there is some sort of fundamental limitation is now surprisingly the claim that has the burden of proof.
You can claim it may be e.g. finite context. That is fundamentally bad for certain classes of tasks. This was the hypothesis of a lot of lab leadership of urgently trying to anticipate how to get around this bottleneck (still of course lots of work on this) but the surprising thing is it does not appear to be at this point a blocker.
Comment by hackinthebochs 4 days ago
Comment by leni536 4 days ago
Comment by uludag 4 days ago
Comment by gruntled-worker 4 days ago
Exactly. We're dancing around the real argument: there's massive amounts of influencing going on (and not only about AI.)
Comment by otabdeveloper4 4 days ago
No amount of cope and anthropomorphizing is gonna change that cold, hard fact.
P.S. The perceived magic of LLMs comes from the way they cross-correlate all the probabilities of tokens on their context window. Not from their ability to "think ahead". They can't do that by design.
Comment by perrygeo 3 days ago
In systems, we can have facts which emerge from other facts at different levels of abstraction. The causal relationship is not linear. It's not entirely clear that next-token prediction should result in anything close to "intelligence". Yet it does.
Life is another good example. Some might say "biology is just organic chemistry" while others might say "biology is an interconnected planetary system which captures low entropy energy". Both are true.
As a result of emergent phenomenon, we have to take the stance of explanatory pluralism; using the explanation that works best in context. There is no single mental model that works everywhere.
I will continue to think of LLMs as next-token predictors because it's (sometimes) useful, and empirically true. But I also think of them as "pattern matchers", searching for language patterns and trying to replicate them. This is also (sometimes) useful and empirically true. There's likely an infinite number of mental models; our job is to pick one that's both true and useful.
Comment by stevenhuang 3 days ago
Definitely lends credence to the idea that however these models work, focusing so much on them being next token predictors may rather be incidental to deeper mechanisms behind their function.
> Some of these networks organize themselves into states that can reliably identify macroscopic patterns in data regardless of microscopic differences between the states of individual neurons in the network. The decision of which pattern will be output by the network “works at a higher level,” said Rosas.
https://www.quantamagazine.org/the-new-math-of-how-large-sca...
Comment by Dlemlo 4 days ago
So what does this lead to? To a generic intelligence which is capable of responding/answering everything.
If overfitted, the model just remembers every possibility in the world but this is not possible anyway so it will start to identify patterns and rules and will use them instead.
Basically 'compressing' every possibility to every question someone could ask -> compression leads to intelligence.
Comment by xg15 4 days ago
Indeed it is, and so is even just the inference method. I think it's worth remembering that both involve running the input tokens through a gargantuan neural network with (often) billions of parameters that only gain semantic meaning during the training process itself.
> it is trained to predict next tokens as they occur in its training data.
What I found important to understand is that not even the pretrainig is a deterministic process that only depends on the training data - as you would expect if the model just captured statistical properties of the data.
Gradient descent starts by setting all the parameters of the neural network to some initial values - usually by setting them at random, according to some distribution. Then during training, it gradually nudges them towards values that somehow make them useful to calculate the desired outcome of the network.
This means that by taking the exact same trainset and the exact same model architecture, you can still get models with different internal structure. The result doesn't just depend on the training data, but also on the order of examples, learning rate, the parameter initialization, etc etc.
Comment by sreekanth850 3 days ago
Comment by NotHowItWorks 3 days ago
Yes there’s an app layer in the chat product for convenience and parsing but the model is exposing methods like ‘complete’ that predict out word sequences.
When model temperature settings are not added in, you get the same exact response every time, just like ngram.
What you’re seeing with Gemini and ChatGPT is context caching to prevent getting sidetracked and response boilerplates with multi-modality so they can call out to image generation, a code completion service, etc. to assemble a complete response.
That’s why the mainstream providers seem so much better (or at least consistent in replies) - each prompt is actually requesting multiple models and doing a lot of application level work to assemble the response you see. That also why they take sooo long to respond.
The language model itself is quite literally a text completion machine, with settings.
Comment by hippietrail 15 hours ago
Comment by binary132 2 days ago
Comment by TZubiri 3 days ago
>Strictly speaking, the statement “LLMs are next-token predictors” isn’t wrong,
If it isn't wrong, then I will continue thinking of them as such, thank you.
Here's a much more formal definition I can come up with (which is more complete but compatible with 'next-token predictor')
LLMs are a set of functions of the type:
>typedef int Token;
>char* token2utf8(Token token)
>Token next(Token* context)
>(Token,void*) next(void* hidden_state)
Where the second next token function's runtime is O(n), and the latter is O(1). All are constant memory.
Object paradigm is more appropriate than functional definition, as the "Hidden state" coincides with private object state rather than a function paramter and return value.
>LLM.next(system_prompt) # O(len(context))
>LLM.next(user_prompt) # O(len(user_prompt)) not of system_prompt+user_prompt
That's it, that's all LLMs are, that's the interface, the rest are implementation details.
Comment by huurtehoog 4 days ago
The greatest trick the rich ever pulled was making us think that the economy is about technology, and not politics.
Comment by highfrequency 4 days ago
None of this AI political economy stuff was relevant in 2015 because necessary technological breakthroughs had not yet been made.
Comment by huurtehoog 3 days ago
The idea that some new thing was born with LLMs and that this new thing fundamentally changes the calculus from the politics of labor and wealth into a technical discussion of possibilities and constraints determined by what the machine is and can do, and not what people should do, is yet another political play. It is always political, it is never moved beyond politics into technology, no matter how much technology changes.
Comment by simianwords 3 days ago
The type of politics possible under agriculture is different from one in industrial age.
Comment by huurtehoog 2 days ago
Comment by godshatter 4 days ago
With reinforcement learning and probably attention and other tricks that affect the weights based on things that aren't strictly in the training data, so the argument goes, you can end up with tokens following strings of tokens that would not be possible to be output with the training data and original weights alone. So describing it as solely a next-token predictor is incorrect based on this framing of it.
But that's just my take on this, I'm still trying to wrap my head around it all.
Comment by garrinm 4 days ago
There’s the mechanical, inference time, autoregressive, one-token-after-another side, which I’m not going to argue isn’t prediction. I just think that’s a relatively uninteresting use of the word “prediction,” because it’s effectively a system predicting its own output.
The more interesting question is what happens at training time. As you describe, reinforcement learning allows the model to learn to output things that it never could have learned simply by predicting what appears in the training corpus.
More concretely, in reinforcement learning there are no ground-truth next tokens to predict.
In supervised machine learning, “prediction” usually means there is some ground-truth label that will eventually be revealed. The model predicts what that label is, the difference between the prediction and the truth gives you a loss, and you learn from that.
But in reinforcement learning, there is no ground-truth action waiting to be revealed. The model chooses an action, observes the consequences, and learns from the reward. To me, that’s a meaningfully different thing from prediction.
Comment by emtel 4 days ago
I fail to see how any possible output could cause either of us to change our mind.
Comment by tetrisgm 4 days ago
Comment by randyrand 3 days ago
Does it complete the sentence?
If not then it’s not a next token predictor. Or at least not a good one.
Comment by danielmarkbruce 4 days ago
Comment by hippietrail 15 hours ago
Comment by arjie 4 days ago
Comment by scotty79 3 days ago
Calling LLMs next token predictors is like calling a brain wet calculator. Technically true, but misleading as it doesn't capture the scale, the depth nor the capability.
Comment by tantalor 3 days ago
That is EXACTLY what I would call it. I don't understand why not.
Comment by DonHopkins 4 days ago
Comment by andai 4 days ago
Sounds like the next 1000 years depend on how carefully we define "winning".
Comment by vivzkestrel 3 days ago
- deal with it and stop whitewashing, greywashing it
Comment by gblargg 4 days ago
Comment by hippietrail 15 hours ago
Comment by kingjimmy 4 days ago
Comment by js8 3 days ago
Comment by TychoCelchuuu 3 days ago
Comment by Sprotch 4 days ago
Comment by aeve890 4 days ago
It can't. The next token is just the most statistically probably given the context (at least in transformers). Try a very small/weak model in your own machine and more often than not it would get stuck repeating the same word or even just output garbage. Because after training and quantization (where some information is lost), that's the most probable next token. Large models can be tricked to fall in the same behavior with very very specific inputs. Still happen, even in frontier models. And they can't detect if the output is wrong.
That's why the premise in TFA is wrong, because a transformer is a next-token predictor. It literally is that. There's nothing secret or magical, it's just a very mechanical process, with a lot of matrix multiplication, normalization, a few random passes, mappings between embeddings and a dictionary of tokens, in a very very high scale.
If someone has found something that's not a mechanical, algorithmic computation and llms are doing something nobody can explain and can't even be modeled in math, I'm happy to be educated.
Comment by simianwords 3 days ago
Neither can you. This is the whole debate.
Comment by major__4 4 days ago
Comment by aeve890 4 days ago
Comment by epistasis 4 days ago
During training, real life text is fed through the LLM, and rhe "correct" token is the one actually observed in the training text. Here's a recent video walkthrough in some detail, mostly aimed at providing a deeper understanding than "next token predictor function":
https://youtu.be/GlYgs6v2YfU?is=IxVMhoCCE4N4WRVK
(Start at 15:30 for the LLM specific parts)
Comment by Sprotch 4 days ago
Comment by epistasis 3 days ago
LLMs are not simple things like a Markov model, there's a lot going on in there, it's not deterministic, and it's completely capable of creating entire new styles of play based on complex interactions of internal states.
Comment by chrisjj 3 days ago
"Large Language Models as Markov Chains" https://www.alphaxiv.org/pdf/2410.02724
Comment by epistasis 3 days ago
Anything that's sequential, like language is, will exhibit Markovian properties, and be somewhat a "Markov" model.
Markov chains are a different concept than a Markov model, but I do agree that, technically, an LLM is a Markov model, just with an internal state space that is nothing like what is usually meant when ML people refer to Markov models.
Comment by valleyer 4 days ago
Comment by mwkaufma 4 days ago
Comment by hippietrail 15 hours ago
Comment by mwkaufma 9 hours ago
Comment by DonHopkins 4 days ago
You -- along with everyone else who keeps parroting this thought-stopping phrase and other tired cliches like "stochastic parrot", simply because you heard other people say them, without understanding what they really mean, which published research papers they came from, or what those and other papers actually argued -- are desperately clinging to a reductive, short-sighted, shallow, simplistic model like a drowning person clutching a concrete life preserver.
Seriously, we are trying to throw you a lifeline, and you are refusing even to participate in your own rescue. So squawk for yourself.
https://news.ycombinator.com/item?id=48395727
> The term "stochastic parrot" is a slogan masquerading as an explanation, only a shallow surface description of the mechanism, that totally fails to explain the phenomenon, or account for all that LLMs and language itself can do.
Here is the original 2021 paper that coined the phrase. It was not primarily an argument about consciousness, nor did its title constitute experimental proof that everything an LLM does can be explained as parroting. It was principally a position paper about the risks of increasingly large language models: environmental and financial costs, biases and hegemonic viewpoints inherited from poorly documented training data, unequal access and power, and the danger of people attributing meaning and accountability to synthetic text.
The paper did, however, make a strong theoretical claim: because an LM is trained on linguistic form without direct access to communicative intent, it cannot possess meaning, understanding, or a model of the world. The authors described it as "haphazardly stitching together sequences of linguistic forms" according to statistical regularities -- hence "a stochastic parrot."
That distinction matters. The popular slogan discards the paper's detailed analysis of actual risks while treating its most controversial theoretical premise as an established scientific result. It has escaped into pop culture as a drive-by anti-LLM slogan -- something people repeat instead of investigating what these systems represent internally, how post-training changes their behavior, or what they can actually do.
Emily M. Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell, "On the Dangers of Stochastic Parrots: Can Language Models Be Too Big?"
https://s10251.pcdn.co/pdf/2021-bender-parrots.pdf
Ironically, the objection that rhetoric was replacing scientific analysis appeared almost as soon as the phrase itself -- indeed, before the paper's formal publication. In January 2021, Michael Lissack published a response characterizing the draft as an advocacy piece that enumerated harms while leaving its assumptions, potential benefits, and cost-benefit trade-offs largely unexamined.
"The Slodderwetenschap (Sloppy Science) of Stochastic Parrots -- A Plea for Science to NOT Take the Route Advocated by Gebru and Bender"
Comment by Tostino 2 days ago
It's not correct or not, it's a gradient based on the reward signal.
Comment by hirvi74 4 days ago
For example, say I ask an LLM, "What sentence in English contains every letter in the alphabet?"
It would respond with something like:
"The quick fox jumps over the lazy, brown [next word]"
(Assume all the words were previously guessed correctly at this point)
The LLM guesses the last word based on what it has been trained on. Let's pretend the matrix is small, and the options narrow down to something like:
1. Dog (99.9% confidence) 2. Cow (85% confidence) 3. Bag (75% confidence) 4. Crayon (25% confidence)
The machine can confidently determine the final word of the sentence, "The quick fox jumps over the lazy, brown dog" because that sentence is unique because it is often used for testing things like fonts, a fun piece of trivia, and so on.
Brown Cow is not a bad guess because it's a type of cow and a yogurt brand. Brown bags and brown crayons are also perfectly rational adjectives to describe those common items and are not a bad guess either.
However, in the context of that sentence, dog is the most correct answer because one is unlikely to have written "The quick fox jumps over the lazy, brown crayon," thus it is quite improbable to be the answer.
My understand is this is where hallucinations can often come from. If the trivia about the sentence happened to not be in common in the data set, then "brown cow" might not be a terrible guess. There is clearly something rational behind that answer, but it's not correct in the sense that it answers the question correctly nor followed the instruction properly.
I'm sure the LLMs we have are far more capable these days. In fact, it wouldn't surprise me if an LLM could check its answer by counting the distinct letters in each word to verify. Not sure though.
Again, this is just a poor example based on my understanding, but I hope it helps (and is more correct than not).
Edit: Pretend word = token. It's technically tokens and not entire words, but I didn't not want to get into tokenization of words.
Comment by chrisjj 4 days ago
Comment by yoggies_bro 3 days ago
Comment by simonw 4 days ago
Comment by garrinm 2 days ago
Comment by polotics 4 days ago
this sentence above would made a longer article if I bothered to so blog as is being blogged here
Comment by hippietrail 15 hours ago
Comment by hirvi74 4 days ago
Comment by infamia 4 days ago
People don't know exactly the words that they're going to say necessarily, but tend to start with a general concept of what they're trying to communicate and only then try to put together the words (sometimes out of order). LLMs do not begin with any sort of concept they're trying to express. LLMs are simulations that attempt to reproduce what an average person might say while wired up to a huge knowledgebase.
Comment by hirvi74 4 days ago
Why do the need to? Considering they are merely tools, I actually appreciate they do not do this. A calculator can compute far better than any human, but I appreciate that calculators are not capable of expressing anything about the computations I request. I want the answer, not a conversation.
> LLMs are simulations that attempt to reproduce what an average person might say while wired up to a huge knowledgebase.
If you will allow me to be simplistic, people -- the soul, the self -- are predominately the aggregated effects of memories and experiences and the ability to retain new memories based on new experiences, no? Consider medical conditions in the dementia family of diseases. As memories fade into the ether, what remains of the self?
Also, people simulate/emulate each other all the time based on what an average, reasonable person might say. People incapable or unwilling to perform such mimicry are often labeled with all kinds of pejorative terms.
Comment by chrisjj 4 days ago
I have never heard such an argument. Recognition that LLMs are nothing more than next-token predictors does not come from reductionism. It comes from simply knowing how they work e.g. from viewing the inference code.
Comment by hirvi74 4 days ago
> "There's nothing remarkable about it. All one has to do is hit the right keys at the right time and the instrument plays itself."
My issue is not with fact at face value. My issue is with how the fact is often contextually used in arguments to delegitimize and disparage LLM outputs and LLM users.
Yes, LLMs at a fundamental level are next-token predictors. But in my opinion, LLMs are very useful, imperfect next-token predictors.
There are a lot of wannabe John Henry [1] folks out there. Love LLMs or hate'em, most of those John Henry folks ain't beating these machines on a plethora of tasks.
[1] For those unaware, https://en.wikipedia.org/wiki/John_Henry_(folklore)
Comment by hellohello2 3 days ago
It is really not that complicated: words are chosen to lead somewhere.
Comment by chrisjj 4 days ago
Because no, post training doesn't change that.
Comment by HarHarVeryFunny 4 days ago
RL post-training changes the nature of what is being predicted, basically turning it from a copying machine into a goal-seeking machine.
A base model is predicting training sample continuations (copying).
A post-trained model is now steering/narrowing the base model's predictions in directions that were reinforced by RL goals.
The model is no longer predicting what the next token will be, but rather predicting what it should be in order to steer generation in the reinforced directions.
Comment by chrisjj 3 days ago
So still next-token prediction, then.
Comment by HarHarVeryFunny 3 days ago
So, I think "steering" is the best description of it - these aren't real training sample continuations being predicted, but rather RL tweaking a whole path of generation probabilities out into the future, with the hope being that if sampling follows this (stochastic) direction then it may eventually lead to a "correct" response.
Thinking of it as goal seeking also provides some insight into the resulting behavior of the model.
Comment by chrisjj 3 days ago
Who cares? Still it is next-token prediction.
Comment by HarHarVeryFunny 3 days ago
Calling the base model a next token predictor is accurate since it is literally making a prediction and being given error feedback when that prediction is wrong.
The output probabilities of an RL-trained model are no longer a prediction - they are something else; they don't come from next-token error feedback, but instead come from probability updates from the RL training process that is trying to steer the output towards that future reward.
Why should you care? Well, because an accurate understanding of what the model is helps explain why it behaves as it does. For example, the recent OpenAI hacks into HuggingFace etc wouldn't make much sense if this is was an auto-regressive next-token predictor with a system prompt telling it to be truthful etc, but it is exactly what you expect of a goal seeking system.
Comment by chrisjj 3 days ago
Regardless, the statement being challenged here is "still next-token prediction, then".
> and I think the answer is no - not only is it not technically correct
It is correct. RL simply adjusts weights - with no effect beyond an equivalent adjustment to the corpus itself. Hence "next-token predictor" remains accurate.
Comment by chrisjj 3 days ago
To me it is an accurate description of the algorithm. And a sufficient explanation for the behaviour. So I don't need it or anything else as a mental model.
I accept this does not suffice for people who cannot comprehend the huge amount of processing and data the empowers it. Lacking a factual understanding, they reach for any mental model as a kind of superstition.
It is sufficiently advanced technology which to many is indistinguishable from magic. This disguises its limitations and enables its limitless false promotion to the gullible, being the reason it is so dangerous to individuals and society.
Comment by HarHarVeryFunny 2 days ago
Comment by HarHarVeryFunny 3 days ago
And per the focus of this thread, regardless of how accurate it is, why do you find "next token predictor" to be the most useful mental model?
Comment by Geee 4 days ago
Comment by SquibblesRedux 3 days ago
Comment by jrm4 3 days ago
I suppose this one "fails" because of "granularity?"
I'm personally getting more comfortable with the "kabillion dimensional space" one. Even before the rise of this AI thing I'd gotten comfortable with (teaching in a very generalized way) the concept of matrix/vector math as doing this sort of thing.
Start with the math required to calculate "what the building on the screen looks like" when you're playing a video game.
Then I jump to...dating websites. You give it "dimensions" like height, weight, religion, sexual preference, music preference, whether you like long walks on the beach, whatever -- then you can calculate how "close" two people are to one another.
From there, tokens and a kabillion directions.
Comment by softwaredoug 3 days ago
Comment by miraculixx 4 days ago
Comment by olooney 3 days ago
https://www.oranlooney.com/post/rose-petals/#language-models
It’s popular to dismiss LLMs as “just next token predictors.” This is technically true, but also kind of misses the point. Markov chains, RNNs, and transformers are all language models that can be described as “next token predictors,” but they don’t all work equally well. A better question to ask is: “What is this model’s inductive bias?”
A Markov chain (an -gram model) assumes the next word depends on the previous words, and that each possible combination of words has a completely independent parameter. (Andrey Markov proposed using this language model over a century ago, making it the granddaddy of modern LLMs.) So, for a vocabulary of size , there are parameters to learn. For even a smallish like 5, that already explodes the hypothesis space beyond what can be learned from even a huge text corpus like the entire internet. And, simultaneously, having a context window of only the previous 5 words is grossly inadequate for modeling real-world language. Like our FCNN above, this model suffers from having an inductive bias which is too weak.
RNNs tried to fix this problem by compressing the entire history into a single fixed-size state vector, updated one token at a time. But that compression is itself a brutal assumption: everything worth remembering about the past must survive being squeezed through a tiny bottleneck at every step. In practice, RNN models quickly lose the plot after a handful of sentences. Locally, the text they generate looks grammatically correct and meaningful, but zoom out a little and they’re basically nonsense generators. Like our naïve linear model, this model suffers from having an inductive bias which is too strong.
Transformers manage to hit a sweet spot: by keeping the recent history around as a working memory, and attending to different parts of it at different times, the transformer’s bias matches real structure in language: the referent of a pronoun, the subject of a verb, the parenthesis waiting to be closed. Not only that, but the particular structure of the transformer, basically a weighted sum of semantic vectors from the context window, has empirically been shown to somehow be a “good enough” match for the structure of real-world language found in the wild.
Transformers aren’t “smarter” than other possible language models, they just happen to land in that Goldilocks zone where their inductive bias is just right.
Comment by gunalx 4 days ago
Comment by qudat 4 days ago
What’s not intuitive to me is that through pattern matching it’s able to express logic and reasoning.
Comment by ankithg 4 days ago