Pipeline
From raw text to a trained model
A structured training loop connects data loading, the forward pass, loss computation, and optimization into a repeatable process.
Stage 01
Raw text
The starting corpus used to train and evaluate the model.
Stage 02
Tokenizer
Converts text into vocabulary IDs the model can consume.
Stage 03
Batching
Groups sequences into batches for efficient training steps.
Stage 04
Forward pass
Runs a batch through the Transformer to produce next-token predictions.
Stage 05
Loss computation
Compares predictions against the real next tokens.
Stage 06
Backpropagation & optimizer step
Updates model weights to reduce the loss.
Stage 07
Checkpointing
Saves model state so training can resume or be evaluated later.