SFT
×Supervised fine-tuning on general chat, reasoning, and coding and agent data, at a context of 202,752, with interleaved, preserved and turn-level thinking.
Supervised fine-tuning
In words
The model is trained on examples of the answers wanted, prompts with their responses, by the cross-entropy of next-token prediction on the responses.
: the prompt; : the response; the prompt’s tokens are left out of the loss.
Supervised fine-tuning as drawn for Llama 3.1 →That plate also draws Llama 3’s rejection sampling.
- Number format
- INT4 QAT
Not disclosed Tokens · Learning rate · Epochs · Trainable
Why
Erroneous segments are kept but masked out of the loss, so the model learns to correct errors without being trained toward the wrong actions. GLM-5 report §3.1, p. 11
Architecture at this stageThe model as drawn; its weights trained aware of INT4 quantization.
What the terms meanQuantization-aware training
- Quantization-aware training
- Training with the numbers the model will store or compute in low precision, its weights, activations or attention cache, rounded to that format in the forward pass, so that the model learns to work despite the rounding.
All settings5
- Data
- General chat (question answering, writing, role-play, translation, dialogue); reasoning (mathematics, programming, science); coding and agents (front- and back-end code, tool calls, coding and search agents), from many execution environments and improved with expert RL and rejection sampling
- Context
- Up to 202,752 tokens
- Loss mask
- Erroneous segments of agent trajectories are kept and masked out of the loss
- Thinking
- Interleaved thinking before every response and tool call; preserved thinking across turns of coding agents; thinking switched on or off per turn
- Number format
- INT4 quantization-aware training, with a kernel bitwise identical in training and inference
Sources2
- GLM5-2602.15763v2.pdf, p. 10Data, Number format
- GLM5-2602.15763v2.pdf, p. 11Data, Context, Loss mask, Thinking