A neural-network state is an internal representation that carries information from earlier sequence elements to later processing steps. Unlike feedforward networks, recurrent neural networks update this state as they iterate through a sequence, then reset it between independent sequences. section 13.3.1
For a toy RNN, the state starts at zero. At each timestep, the network combines the current input with the previous state, applies an activation, and stores the result as the next state. The sequence of outputs preserves the state at every timestep.
Generating text one token at a time
During autoregressive generation, a GRU receives one character and an explicitly passed state. A prompt primes the state with information about the entire preceding text; each predicted character is then fed back with the updated state to produce the next character. section 15.1.2






































