Embedding Layer
Token → vector representation
Positional encoding applied
↓ forward pass
Transformer Blocks
Multi-head self-attention
Feed-forward network
Layer normalisation ×N
↓ decode
Output Projection
Linear layer → logits
Softmax probability dist.
↓ sample
Token Sampling
Temperature / top-p
Next token selected