Hidden State
What is Hidden State?
In one sentence: A hidden state is the list of numbers representing a token at some point inside the model.
As a token travels up through the layers, its hidden state keeps changing, collecting more context and meaning. The final hidden state is used to predict the next token. "Hidden" just means it is internal, not shown to users.
What does Hidden State look like?
The hidden state for "bank" changes in later layers depending on whether nearby words are about rivers or money.
Why does Hidden State matter?
Hidden states are where a model's understanding actually lives during processing.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/hidden-state/">Hidden State, explained simply</a> (The AI Math Dictionary)