# GLM-5.1: Open-Source Model for Long-Running Agentic Tasks in Engineering
Z.ai has released GLM-5.1 — an open-source model under the MIT license, optimized for multi-stage engineering tasks. On SWE-Bench Pro, it achieved 58.4%, surpassing Claude Opus 4.6 (57.3%) and GPT-5.4 (57.7%). In NL2Repo, the model improved the score from 35.9% to 42.7% compared to GLM-5. This makes it suitable for scenarios requiring sequential task solving without quickly exhausting strategies.
A key feature of GLM-5.1 is its behavior in long sessions: the model adapts approaches by analyzing intermediate results, instead of stopping after initial progress.
Performance on Long-Running Tasks
Most LLMs quickly solve simple subtasks but then stagnate. GLM-5.1 is designed for sustained improvement. Three key experiments demonstrate this:
- Optimizing a Vector DB in Rust. The model received code with stubs and a task to speed up search on SIFT-1M. Over 600 iterations, QPS grew from 3500 to 21,500 (x6). Strategies evolved: from full scans to clustered search, vector compression (f32 → f16), and a two-stage pipeline.
- KernelBench: Speeding Up GPU Kernels. On 50 tasks rewriting PyTorch operations in CUDA, GLM-5.1 delivered an average speedup of x3.6. Claude Opus 4.6 achieved x4.2. Both models continued progressing up to the limit.
- Building a Linux Desktop in the Browser. Over 8 hours, the model created a full desktop: file manager, terminal, editor, and monitor. After each stage, it analyzed the output and adjusted the plan.
Availability and Integration
Model weights are available on HuggingFace and ModelScope. Support for vLLM and SGLang enables efficient inference. For mid- to senior-level developers, this means local deployment without proprietary dependencies.
Performance Comparison on Benchmarks:
| Benchmark | GLM-5.1 | Claude Opus 4.6 | GPT-5.4 | GLM-5 |
|--------------|---------|-----------------|---------|-------|
| SWE-Bench Pro| 58.4% | 57.3% | 57.7% | - |
| NL2Repo | 42.7% | - | - | 35.9% |
| KernelBench (speedup) | x3.6 | x4.2 | - | - |
These results highlight its edge in agentic scenarios with many iterations.
Key Takeaways
- GLM-5.1 shows sustained progress on tasks with 600+ steps, switching strategies based on logs.
- MIT license and vLLM/SGLang support simplify integration into production pipelines.
- Results on SWE-Bench Pro and NL2Repo place it at the top of open-source models for coding.
- Experiments confirm effectiveness in optimization (Rust DB, CUDA kernels) and autonomous system assembly.
- Ideal for agent frameworks requiring self-reflection.
Applications in Development
For teams working with AI agents, GLM-5.1 provides a tool for automating engineering workflows. In database optimization, the model independently shifts from basic methods to advanced ones like quantization and multi-stage indexing. Similarly in KernelBench: focus on profiling bottlenecks before refactoring.
In the desktop assembly scenario, it demonstrates capability for stateful reasoning — tracking context over hours of work, avoiding duplication.
Developers can use the model for:
- Real-time code generation and optimization.
- Automated hypothesis testing in performance-critical tasks.
- Self-improving loops in CI/CD with metrics analysis.
Overall improvements in experiments: from x3.6 in kernels to x6 in QPS, making GLM-5.1 relevant for high-load systems.
— Editorial Team
No comments yet.