Skip to main content
Zhipu AI's GLM-5.1 code optimization, hundreds of rounds, thousands of tool calls, advanced AI development.

Editorial illustration for Zhipu AI's GLM-5.1 optimizes code over hundreds of rounds, thousands of tool calls

GLM-5.1: AI That Rewrites Its Own Code Autonomously

Zhipu AI's GLM-5.1 optimizes code over hundreds of rounds, thousands of tool calls

Updated: 2 min read

Sure, your AI can write code. But can it genuinely edit that work? Not just patch a bug, but systematically tear down and rebuild its own logic to chase performance?

That’s a far tougher benchmark. Zhipu AI built its new model, GLM-5.1, to pass it. The method is brute force: relentless, automated iteration.

GLM-5.1 achieved a 3.6x speedup over the baseline implementation and continued making progress even in later phases, according to Zhipu AI.

Zhipu claims GLM-5.1 beat Claude Opus’s 3,547 QPS score. The specifics, however, are murky; all tests were internal. The real story is the methodology.

This isn’t about generating one script. The model runs it, analyzes output, and rewrites from a fresh perspective—a new data structure, a different indexing approach. That loop spins across hundreds of rounds.

The promise? You just set the goal. The model burns the compute to find the path, obsessively.

But that ambition lacks the third-party verification needed to cement it.

Common Questions Answered

How does GLM-5.1 differ from other language models in code optimization?

GLM-5.1 can continuously iterate and rewrite its own code across hundreds of rounds and thousands of tool calls, unlike most language models that generate a single solution. The model dynamically switches strategies mid-task and keeps testing and refining until it finds the most efficient answer.

What specific benchmark performance does GLM-5.1 demonstrate?

On the SWE-Bench Pro benchmark, GLM-5.1 narrowly outperforms GPT-5.4 and Claude Opus 4.6, indicating competitive AI programming capabilities. The model is particularly notable for its ability to avoid dead ends by repeatedly reviewing and fundamentally changing its approach when needed.

What was the vector database optimization scenario demonstrated by Zhipu AI?

In the first internal scenario, GLM-5.1 was tasked with optimizing a vector database pipeline to maximize search queries per second while maintaining accuracy. The model showcased its ability to dynamically adjust strategies and improve performance through multiple iterations.

LIVE03:21OpenAI's Miles Wang in Talks for USD 2B AI Drug Discovery Startup