ALL INTELLIGENCE
智谱 AI 研究T1·Models

Zhipu AI Open-Sources GLM-5.1 with 8-Hour Autonomous Coding

By 智谱 AIOriginal title: GLM-5.1开源:一个独立工作8小时的模型
85AI Score

Zhipu AI has released and open-sourced its flagship model, GLM-5.1, marking a breakthrough in long-horizon tasks by enabling over 8 hours of autonomous coding to deliver complete engineering solutions. The model sets new global records on key benchmarks like SWE-Bench Pro, ranking third overall and first among open-source models.

Full Report

Contents6 sections

From 3 minutes of Vibe Coding to 30 minutes of Agentic Engineering, and now the 8-hour Long Horizon Task model we are introducing today, GLM-5.1 has achieved another breakthrough. GLM-5.1 is our most intelligent flagship model to date and currently the strongest open-source model in the world. GLM-5.1 significantly enhances coding capabilities, with particularly notable improvements in completing long-horizon tasks. Unlike previous models limited to minute-level interactions, GLM-5.1 can work independently and continuously for over 8 hours within a single task, autonomously planning, executing, and self-evolving throughout the process to ultimately deliver complete engineering-grade results. Coding capability is key to further elevating model intelligence. The chart below shows the average results across three of the industry's most representative coding benchmarks: SWE-Bench Pro (measuring professional software development), Terminal-Bench 2.0 (solving problems via command-line operations like an engineer), and NL2Repo (building complete code repositories from scratch). On the combined average score of these three benchmarks, GLM-5.1 ranks third globally among all models, first among Chinese models, and first among open-source models.

In the SWE-bench Pro benchmark, which most closely mirrors real-world software development, GLM-5.1 sets a new global best score, surpassing GPT-5.4 and Claude Opus 4.6. SWE-Bench Pro requires models to locate and fix high-difficulty engineering bugs in real GitHub repositories, serving as the toughest metric for assessing whether a model is capable of professional software development.

Your 8 Hours of Sleep Are the Model’s 8 Hours at Work

Over the past two years, the industry has used Benchmarks to measure how intelligent a model is. We believe the next stage of measurement should be "how long it can work," i.e., performance on Long-Horizon Tasks—specifically, how much human-equivalent work a model can complete independently. This poses deeper challenges for models. To maintain stable output during long-horizon tasks, models face not just larger volumes of code, but a series of complex engineering decision points: proactively running benchmarks, identifying bottlenecks, modifying solutions, and re-running tests. The model needs to form a complete "Experiment → Analyze → Optimize" loop like a true engineer, rather than stopping after writing one version of the code and waiting for human scoring. Under METR leaderboard evaluation standards, GLM-5.1 is the only open-source model achieving 8-hour continuous operation, and one of the few models globally (alongside Claude Opus 4.6) with this capability. Our ultimate goal is the Autonomous Agent: a model that works 24/7 without interruption, decomposing goals, executing deliveries, self-evaluating and correcting, and self-evolving, thereby eliminating the need for human intervention. Let’s see what the model can accomplish during its 8-hour work shift.

Scenario 1: Building a Linux Desktop from Scratch in 8 Hours

Sketch out the architecture during the day, hand it off to GLM-5.1 before bed, and wake up to find a complete system produced. Over exactly 8 hours, it executed more than 1,200 steps. It generated its first meaningful result in 20 minutes, and after 8 hours, delivered a fully functional Linux desktop system, including a complete desktop environment, window manager, status bar, applications, VPN manager, Chinese font support, game library, etc., along with 4.8MB of supporting files. This equates to the workload of a four-person team for one week. The video below shows GLM-5.1’s code commits over the 8-hour period: These were not minor patches of four or five lines; every commit represented substantive system-level evolution, and no humans participated in testing or code review throughout the process. The model even wrote regression tests for its own code—and they passed.

Scenario 2: Breaking Vector Database Optimization Bottlenecks with 655 Iterations

Vector databases are the core engine behind AI search and recommendation systems, while Approximate Nearest Neighbor (ANN) retrieval is a critical component that heavily tests algorithmic and engineering capabilities. This process requires the model to master underlying algorithms such as IVF, HNSW, and vector quantization, as well as possess genuine engineering judgment—the ability to proactively identify bottlenecks and switch strategies when an optimization path hits a wall, rather than blindly repeating the same direction. GLM-5.1 didn’t just tweak parameters; it independently completed the entire optimization chain, moving from full database scans to IVF bucketed recall, introducing half-precision compression, adding quantized coarse ranking, implementing two-stage routing, and finally applying early pruning. Over 655 iterations, it continuously ran benchmarks autonomously, identified bottlenecks, and adjusted plans, ultimately pushing vector database query throughput from an initial delivery of 3,108 QPS to 21,472 QPS—a 6.9x improvement over the initial official version.

Scenario 3: Optimizing Real Machine Learning Model Loads with 1,000 Tool Calls

GLM-5.1’s demonstrated capacity for long-duration work and self-evolution transforms it from a simple "code generator" into a "proactive system optimizer." On the KernelBench Level 3 optimization benchmark, covering 50 real machine learning computational loads, we tasked GLM-5.1 with independently optimizing each load. During over 24 hours of uninterrupted iteration, GLM-5.1 autonomously completed multiple cycles of compile-test-analyze-rewrite, achieving a geometric mean speedup of 3.6x, significantly higher than the 1.49x achieved by torch.compile’s max-autotune mode. The depth of optimization and creativity displayed by the model is particularly noteworthy. GLM-5.1 was able to autonomously write custom Triton Kernels and CUDA Kernels, utilize cuBLASLt epilogue fusion, and implement shared memory tiling and CUDA Graph optimizations. These optimization strategies cover the full technology stack from high-level operator fusion to micro-architecture-level tuning, with each step being an autonomous decision by the model. This result indicates that in GPU kernel optimization—a field traditionally highly dependent on expert experience—AI models have demonstrated end-to-end autonomous working capability, from problem analysis and solution design to iterative tuning. In GPUs and broader high-performance computing domains, the optimization bottlenecks that have long constrained engineering efficiency are being gradually broken down by AI.

Behind the 8h

Getting a model to run for 8 hours isn't difficult; the real challenge is ensuring that its work remains effective during the eighth hour. Previously, models including GLM-5 often hit a bottleneck in complex optimization tasks after achieving rapid initial gains. They would repeatedly attempt known optimization techniques but failed to proactively switch strategies when one path proved unproductive. The training objective for GLM-5.1 was to break through this bottleneck. In vector database optimization tasks, we observed a typical "staircase" optimization trajectory: the model performs incremental tuning within a fixed strategy, and when gains plateau, it actively analyzes benchmark logs, identifies current bottlenecks, and then jumps to structurally different solutions—moving from full-database scans to IVF bucketing, from single precision to quantized coarse ranking, and from single-layer routing to two-level pruning. Each jump is accompanied by a temporary drop in Recall, as the model briefly violates constraints while exploring new directions before readjusting. This "break-and-fix" cycle itself is a hallmark of effective optimization. On KernelBench, comparing the optimization curves of multiple models revealed this difference more directly. GLM-5 rose quickly in the early stages but flattened out very soon; GLM-5.1 continued rising for longer within the same time window, ultimately reaching 1.4 times the performance of GLM-5. The key lies in how far the model can extend the window of "effective optimization." In Linux desktop build tasks, the challenge differs again. The first two scenarios had clear numerical metrics (QPS, speedup ratios) to measure whether each step was effective, but building a complete desktop system lacks a single metric; what constitutes "good" depends on a comprehensive judgment of functional completeness, visual consistency, and interaction quality. This requires the model to possess preliminary self-assessment capabilities: reviewing its output after each execution round to determine where improvements are needed and continuing to optimize. This is the scenario with the weakest feedback signal among the three, and also the direction most urgently needing breakthroughs. We believe that extending the model's "effective working duration" is a fundamental dimension for enhancing agent capabilities. Significant technical challenges remain on this path: overcoming context anxiety when facing complex tasks, maintaining execution consistency after thousands of tool calls, escaping local optima earlier, and, more importantly, establishing reliable self-assessment mechanisms for tasks without definitive numerical metrics. GLM-5.1 is our first step in this direction, and we will continue to push forward. GLM-5.1 is not just a stronger model; it marks the beginning of a new technological paradigm. Right now, try giving it an instruction, then leave it alone for 8 hours.

Open Source and Usage

  1. Official API Access
  1. Product Experience
  • GLM-5.1 is coming soon to Z.ai: https://chat.z.ai
  • GLM-5.1 is included in the GLM Coding Plan (Max/Pro/Lite), supporting mainstream development tools such as Claude Code and OpenCode.
  1. Open Source Links