Text generation normally proceeds one token at a time. A token is a small unit of text, such as a word fragment, a short word, or punctuation. The model chooses one token, adds it to the context, then chooses the next. A forward pass is one run through all 45 layers of the network that produces the next-token distribution. Because each choice changes the context for the following choice, a 1,000-token answer usually requires 1,000 sequential forward passes. A graphics processor can perform much of the arithmetic inside one pass in parallel, but it cannot decide the second output token until the first token has joined the context. That sequential dependency is why generation can feel slow even when the model has substantial raw compute capacity. In the model name, GLM stands for General Language Model.
At the end of each pass, Flash assigns a probability to every item in its 154,880-token vocabulary. A vocabulary is the fixed set of token pieces the model can emit. Those probabilities answer one question only: which token should come next? They do not also settle the token after that, because the second choice depends on the first one. Normal decoding therefore runs the network again after every emitted token, even when the continuation is predictable. A sampling rule may choose the highest-probability item or draw from several plausible items, but either way the model must first evaluate the context that includes its previous choice. The ordinary next-token distribution is useful evidence about the immediate future, not a free prediction of an entire continuation.
Multi-token prediction (MTP) trains a small extra draft head to propose several future tokens at once. The draft head is a lightweight layer stored in the checkpoint, the saved model weights and configuration. The full network then verifies the proposed run in a single forward pass. If several proposed tokens pass verification, one expensive pass delivers several output tokens. If a proposal fails, the full model supplies the next token instead. With a correct speculative-decoding procedure, no unverified token reaches the output and the final distribution matches ordinary decoding. The main model evaluates the proposal at each proposed position, but acceptance proceeds from left to right. Once a draft token fails, later guesses were conditioned on the wrong continuation and cannot be kept. The useful quantity is therefore the accepted prefix, the consecutive run from the beginning that the main model approves. The diagram shows one verification round:
What does GLM train jointly?
GLM-5 trains its parameter-shared MTP component alongside the model, rather than attaching a completely separate draft model after training. The report measures an average accepted length of 2.76 tokens for GLM-5 against 2.55 for DeepSeek-V3.2 at the same four speculative steps, about an 8% difference. That is a result from the report's evaluation setup, not a promise for every prompt or server. Flash ships one draft layer in its configuration, num_nextn_predict_layers: 1, and the published serving recipe runs it with five speculative tokens. Choose one to four extra draft tokens below, press generate the sentence, then reroll to see how the accepted prefix changes. The game shows why an average is more useful than a single perfect run: some proposals stop early, while others move several tokens forward. It illustrates the control flow, not the report's benchmark result.
Compare speculative decoding
Choose a draft length, then click Generate to see accepted and rejected guesses.
Speculative decoding still verifies every output token with the larger model. Rejected guesses require only a cheaper draft pass. The GLM-5 report measures acceptance lengths of2.76 versus 2.55 for DeepSeek-V3.2 with the same 4 speculative steps (Table 2). Flash includes one in-weights draft layer, and vLLM's recipe uses 5 speculative tokens. The goal is fewer costly forward passes without sending unverified text.