Anyone who has ever worked with AI on more complex tasks knows that moment of frustration. The model makes progress for a while, things look promising, and then it gets stuck. It simply stops improving the results and starts cycling through the same approaches. GLM-5.1, a new model from the Chinese laboratory ZAI, has come up with an answer to this problem. GLM-5.1 is designed to remain productive much longer than its predecessors. Instead of exhausting its ideas after the first fifty attempts, it can work for hundreds or thousands of rounds, finding new and better solutions with each additional attempt.
600 attempts and better results than the competition?
The team behind GLM-5.1 used the open VectorDBBench benchmark, a task focused on optimizing a database for similarity searches among vectors. The rules: the model receives a skeleton written in Rust and must optimize it for the highest possible performance, measured in queries per second. The best result anyone had ever achieved in this test within 50 tool calls was 3,547 queries per second by Claude Opus 4.6. GLM-5.1 was given free rein and allowed to work without a time limit.
What happened? After six hundred attempts and more than six thousand tool calls, the model reached 21,500 queries per second. That is roughly six times the best result achieved in a single session.
The progress was not linear, as the graph looks like a staircase. The model spent some time fine-tuning a single strategy, then analyzed its own results, identified problems, and switched to an entirely new approach. These structural transitions occurred six times during the entire run. For example, around the ninetieth attempt, the model switched from scanning the entire database to searching within clusters, and performance jumped to 6,400 queries per second. Around the two-hundred-and-fortieth attempt, it introduced a two-stage process involving a coarse search followed by precise retrieval, and performance jumped to 13,400.
Battle with Claude Opus 4.6
The second scenario was even more demanding. The KernelBench benchmark measures whether a model can take standard PyTorch code and rewrite it as a faster GPU kernel with the same outputs. The third level of the test includes entire architectures such as MobileNet, VGG, and Mamba, with fifty problems in total. For comparison: torch.compile with default settings achieves a 1.15x speedup. With maximum settings, it achieves 1.49x.
GLM-5.1 achieved a 3.6x speedup and continued finding room for improvement. Claude Opus 4.6 reached 4.2x and was the strongest model in this test. The older GLM-5 and Claude Opus 4.5 reached their limits more quickly and stopped improving their results. GLM-5.1 remained useful for substantially longer. It is fair to acknowledge that Claude Opus 4.6 won here. The authors themselves state this without making excuses. However, GLM-5.1 outperforms all the other models tested.
A Linux desktop application in 8 hours
The third assignment sounded simple: build a functional Linux desktop as a web application from scratch. No templates, no design materials, no ongoing instructions.
Most models given such an assignment produce a basic skeleton with a main panel and one window, then declare the task complete. GLM-5.1 was given a simple framework: after each round, examine what you have created, determine what is missing or wrong, and continue. The loop ran for eight hours. The result was a functional browser-based desktop environment with a file explorer, terminal, text editor, system monitor, calculator, and games. Everything was visually consistent and interconnected into a cohesive whole.
This is exactly the type of output that simply cannot be created in short sessions.
Benchmarks, open source, and where GLM-5.1 stands
On SWE-Bench Pro, which measures the ability to solve real-world problems from software projects, GLM-5.1 achieved a score of 58.4. GPT-5.4 scored 57.7, Claude Opus 4.6 scored 57.3, and Gemini 3.1 Pro scored 54.2. GLM-5.1 tops this ranking.
On the NL2Repo benchmark, which tests the generation of entire repositories from natural language, GLM-5.1 achieved 42.7 points, compared with 35.9 for the previous GLM-5 version. Claude Opus 4.6 leads here with 49.8, but the leap between the GLM versions is significant.
In the CyberGym cybersecurity test, GLM-5.1 achieved a score of 68.7, while GLM-5 scored 48.3. This is where the improvement is greatest.
The model has been released under the MIT license, so it can be freely used, modified, and deployed. The weights are available on HuggingFace and ModelScope, and the vLLM and SGLang frameworks are supported. Developers can access it through api.z.ai and BigModel.cn, and it is compatible with Claude Code and OpenClaw.
For GLM Coding Plan subscribers, the model is available immediately after renaming it to "GLM-5.1" in the settings. During peak hours, it consumes three times the quota, and twice the quota during off-peak hours, but a promotion is in effect until the end of April: during off-peak hours, it counts as one credit.
The authors themselves write that the greatest challenges are yet to come: how to escape local optima more quickly, how to maintain coherence across thousands of steps, and how to reliably evaluate results where no metric exists. According to them, GLM-5.1 is the first step in this direction.



