Chapter 9. This machine reads up to twelve words of the pioneer facts and sends them through one or more transformer blocks. In each block, attention adds its result to the list of eight numbers at every position, and then the feedforward network adds its result too. Choose how many blocks and heads to build, trace one prediction through the machine, then train it.
The token embeddings are the saved ones from the facts folder. Every other number is drawn at random when you build a machine.
Changing blocks or heads builds a fresh machine and saves its starting weights, so Reset can restore the same start for a fair comparison with normalization on and off.
The forward pass runs every training stretch and calculates the loss. The backward pass follows the slopes from the head back through every block to the embeddings, with the parameters fixed. The update is a separate action.