Open-weight LLMsGLM-4.5

GLM-4.5

How a curriculum keeps reinforcement learning informative

Reinforcement learning on checked answers improves a model only when its attempts differ, with some succeeding and some failing. A problem the model always solves teaches nothing, and neither does one it never solves. GLM-4.5, released by the Chinese company Zhipu AI (now Z.ai) in July 2025, built its training around that fact, adjusting the difficulty of its practice problems as the model improved. The release combined reasoning, coding and tool use in one mixture-of-experts model with 355 billion parameters, 32 billion of them active per token, under the MIT license. [2]

4 sections · about 7 minutes · Training

Release: . Z.ai released the weights on July 28, 2025. The report was posted on August 8.Model: 355B total · 32B active; Air 106B · 12BWeight license: MIT model weights

Training on whole repositories

Software engineering involves more than completing a function. A test imports a module, the module depends on a configuration file, and changing one interface can break several callers. Training on isolated code snippets never shows the model those connections.

The GLM-4.5 report describes a mid-training stage, between general pretraining and the final behavior training, that concentrates on particular domains. For code, it trains on related files from the same repository together with the linked issues, pull requests and commits. The training context grows from stage to stage as these examples get longer. [1]

Imagine a function, the code that calls it and a failing test, side by side. The test expects sorted output, but the function keeps the input order. With all three in view, the fix is clear. With only the function in view, the model might be rewarded for code that is valid but still fails the test.

Show the connections before teaching actions

Simplified outline of GLM-4.5’s training stages. Each stage includes more data types and settings than shown. Longer training examples show dependencies that snippets leave out.

A group needs differences to learn from

In group-relative reinforcement learning, the model makes several attempts at the same problem, and each attempt is scored and compared with the others. In the version shown here, the group mean is subtracted from each reward and the result is divided by the standard deviation. Positive results mark better-than-average attempts and negative results worse-than-average ones. This is a simplified calculation, not GLM-4.5’s full training objective.

For rewards of 0, 0, 1 and 1, the mean is 0.5 and the standard deviation is 0.5, giving −1, −1, +1 and +1. If every reward is 1, all attempts did equally well and the differences vanish. If every reward is 0, the group again gives no ranking.

The GLM-4.5 report identifies this problem and responds with a difficulty curriculum: as the model improves, its practice problems are replaced with harder ones that it can still sometimes solve. The experiments supporting this design used a smaller model, not the 355-billion-parameter flagship. In the second stage, the curriculum selects problems that have verified answers and that the model solves only rarely. [1]

When the relative signal disappears

Simplified GRPO-style signal. It omits probability ratios, clipping and per-token weighting. The GLM-4.5 report’s reasoning recipe also drops the drift penalty used in some GRPO versions. Complete success and complete failure both erase the comparison within a group.

Difficulty depends on the learner

A problem is not permanently easy or hard; that depends on who is solving it. Suppose the model succeeds on one of four attempts. A successful attempt exists, so the group comparison can push the model toward it. Later, the same model succeeds four times out of four. The problem still works as a test, but it no longer gives this kind of training signal.

The opposite failure is also real. A problem nobody can solve is not a good lesson. Raising difficulty beyond the model’s reach spends a lot of sampling without ever finding a successful attempt to learn from. A curriculum has to tell a rare but possible success apart from a problem that is impossible or has a wrong reference answer.

The figure’s presets show these cases. For “All equal”, the figure sets the advantages to zero rather than dividing by a zero standard deviation. Real training includes other loss terms too, so a zero signal from this one part does not mean the whole update stops.

One model for reasoning, code and tools

GLM-4.5 and the smaller GLM-4.5-Air are hybrid reasoning models: each can either think step by step before answering or answer directly. The flagship has about 355 billion parameters with 32 billion active per token; Air has 106 billion with 12 billion active. Base and post-trained versions are available under the MIT license. [2]

Each ingredient had appeared before: sparse experts, grouped-query attention, reinforcement learning. The release’s contribution is a training recipe that combines them, together with working open checkpoints. The interesting question is how well the combination handles a complete task from start to finish.

The later GLM-4.7 added the ability to keep reasoning across the turns of a conversation and to control thinking turn by turn. Those are later features and do not describe every GLM-4.5 deployment. [3]

To evaluate a coding agent, check the whole task. Was the right file changed? Did the tests run? Does the result support the final claim? A fluent explanation of a fix is weaker evidence than a fix that passes the intended tests.

Simplifications and limits

Sources and further reading

Primary papers, model cards, and release posts. Facts describe the versions named here; the interactive calculations are teaching models. Research cutoff: October 3, 2026.

  1. GLM-4.5 technical reportSections 2.3 and 3.2; repository-scale mid-training, a two-stage difficulty curriculum tested on a smaller model, and reasoning RL without a KL penalty.
  2. GLM-4.5 official model cardRelease sizes, hybrid reasoning and MIT weights.
  3. GLM family official repositoryVersion-separated GLM-4.5 and GLM-4.7 capabilities, including preserved thinking.