Papers
Topics
Authors
Recent
Search
2000 character limit reached

GLM-5: Autonomous Agentic Model

Updated 23 June 2026
  • GLM-5 is an advanced multimodal foundation model that uses a MoE Transformer with dynamic sparse activation to efficiently process long-context inputs for autonomous engineering tasks.
  • It integrates asynchronous reinforcement learning and specialized agent-RL algorithms to enhance code synthesis, reasoning, and multi-task execution across text, code, and vision modalities.
  • Empirical benchmarks show significant gains in frontend build success, Pass@1 rates, and multimodal task performance, setting GLM-5 as a state-of-the-art model.

GLM-5 is an advanced large-scale foundation model extending the GLM (Generative LLM) series, designed to enable fully autonomous agentic engineering across text, code, and multimodal environments. Marking a shift from prompt-driven “vibe coding” to agentic engineering, GLM-5 employs an optimized mixture-of-experts (MoE) Transformer architecture with dynamic sparse attention mechanisms and a fully decoupled asynchronous reinforcement learning (RL) infrastructure. GLM-5 achieves state-of-the-art performance on open engineering benchmarks and, via its multimodal variant GLM-5V-Turbo, natively integrates vision, language, and action, resulting in robust perceptual grounding and agentic execution capabilities (Team et al., 17 Feb 2026, Team et al., 29 Apr 2026).

1. Evolution from Vibe Coding to Agentic Engineering

Earlier GLM models, typical of the “vibe coding” paradigm, required users to tailor prompts to extract desired model outputs. As LLMs were increasingly applied in complex reasoning, code synthesis, and multi-step workflows, prompt engineering became impractical and brittle. GLM-4.x’s Model-of-Experts design improved performance on agentic, reasoning, and coding (ARC) tasks but retained limitations in context window length, training/inference efficiency, and post-training RL throughput.

GLM-5 introduces a comprehensive modernization to overcome these constraints:

  • Adoption of dynamic sparse activation (DSA) to enable efficient long-context processing.
  • Decoupled, high-throughput RL for scalable agentic learning.
  • Algorithms supporting complex, long-horizon code and workflow synthesis.
  • Complete optimization stack for heterogeneous hardware including quantized INT4 kernels (Team et al., 17 Feb 2026).

This transition allows GLM-5 to autonomously plan, implement, debug, and iterate over complex software and multimodal agentic tasks, aligning model outputs with real-world engineering requirements.

2. Core Architecture and Dynamic Sparse Activation

GLM-5 employs a MoE Transformer backbone with the following principal characteristics (Team et al., 17 Feb 2026):

  • Scale:
    • 744 billion parameters.
    • 80 Transformer layers: 3 fully dense, 75 MoE, 1 Multi-Token Prediction (MTP).
    • 256 MoE experts per layer (8 routed per token).
    • Hidden size: 6144; 64 attention heads.
  • Dynamic Sparse Activation (DSA):
    • Each query attends only to the top-kk most relevant keys; k2048k\approx2048 in practice.
    • For input sequence length LL, DSA reduces attention complexity from O(L2)O(L^2) to O(Lk)O(Lk).
    • An indexer network fidx(Q,K)f_{\text{idx}}(Q, K) computes token-wise relevance; top-kk selection yields a binary mask Mi,jM_{i,j} for each head.
    • Training includes a dense warm-up followed by sparse adaptation (>20>20B tokens).
    • Results in a 1.5–2× reduction in training/inference cost for contexts up to 128K tokens, with no significant performance degradation.
  • Mixture-of-Experts Routing:
    • Each MoE layer routes tokens via top-8 indexer heads, distributing computation and reducing per-token cost.

Table: Key GLM-5 Architectural Parameters

Component Value/Type Purpose
Layers 80 (3 dense, 75 MoE, 1 MTP) Deep feature extraction
MoE experts/layer 256 (8 routed per token) Computation specialization
Attention heads 64 ($192$-d Q/K, k2048k\approx20480-d V) Representation diversity
Hidden size k2048k\approx20481 Model capacity
DSA top-k2048k\approx20482 k2048k\approx20483 Efficient long-context attention

These advances enable scalable long-context inference, allowing GLM-5 to operate efficiently in demanding agentic scenarios.

3. Asynchronous Reinforcement Learning Infrastructure

GLM-5 implements a fully asynchronous, decoupled RL pipeline (“slime” framework), which maximizes hardware resource utilization and agentic learning efficiency (Team et al., 17 Feb 2026):

  • Inference and Training Decoupling: Separate GPU groups for rollout and optimization. Rollouts are queued and consumed in training batches, eliminating synchrony-induced idle time.
  • Token-In-Token-Out (TITO) Gateway: Guarantees correct token mapping during RL rollouts, preserving training signal fidelity.
  • Importance Sampling and Off-Policy Correction: For each token, the log probability ratio k2048k\approx20484 is clipped to k2048k\approx20485 for bias control.
  • Data-Parallel Routing and Caching: Assigns each agent rollout to a fixed data-parallel rank, optimizing KV-cache reuse and reducing end-to-end latency.
  • Fault-Tolerance and Straggler Mitigation: Heartbeat-driven mechanisms ensure robust progress through multi-turn episodes.

Asynchronous group-wise policy gradient (PPO/GRPO variants) and cross-stage knowledge distillation guard against instability and catastrophic forgetting, supporting multi-task, multi-environment learning at scale.

4. Agent-RL Algorithms and Multi-Task Training

GLM-5 extends reinforcement learning with asynchronous, multi-task, and domain-adaptive objectives:

  • Domain-Mixed RL: Simultaneous sampling of multiple trajectory candidates for each task input k2048k\approx20486; rewards k2048k\approx20487 normalized within problem group.
  • Advantage Calculation: k2048k\approx20488 for group-wise stability.
  • Calibration via Reward Clipping: Only tokens with k2048k\approx20489 within LL0 contribute to policy updates.
  • On-Policy Distillation: Trains with log-prob gaps to a teacher model, maintaining alignment and coverage across sequences.

For agentic tasks such as code synthesis, tool use, and multi-turn search, a Multi-Task Rollout Orchestrator (Editor’s term) provides task-specific environments and evaluation programs, supporting large-scale curriculum and hierarchical training (Team et al., 17 Feb 2026).

5. GLM-5V-Turbo and Native Multimodal Integration

GLM-5V-Turbo generalizes GLM-5 to multimodal and agentic domains, integrating language, vision, and action (Team et al., 29 Apr 2026):

  • Vision Encoder (CogViT): Dual-stage pretrained ViT (distilled from SigLIP2/DINOv3) and image–text contrastive learning on >8B samples.
  • Multimodal Multi-Token Prediction (MMTP): Image regions are replaced by a single <|image|> embedding before the generation head, reducing communication overhead.
  • Joint Embedding: Vision features LL1 are projected and concatenated with text tokens LL2, entering the Transformer stack for cross-modal attention.
  • Hierarchical Curriculum: Pretraining and fine-tuning progress from perception (masked modeling, SVG-UI) through GUI grounding, single-step, and long-horizon action prediction.

Downstream, GLM-5V-Turbo is trained with:

  • Multi-modal cross-entropy and contrastive objectives
  • Performance-specific RL with rule/model-based verification

Empirical results show consistent improvements over predecessor models and strong performance in multimodal coding, tool use, GUI manipulation, and language tasks, matching or surpassing text-only baselines (Team et al., 29 Apr 2026).

6. Benchmarks and Empirical Results

GLM-5 and GLM-5V-Turbo demonstrate state-of-the-art results across major open benchmarks (Team et al., 17 Feb 2026, Team et al., 29 Apr 2026):

Coding and Software Engineering:

  • Frontend Build Success Rate (BSR): 98–100% (vs 65–70% previous gen)
  • Backend Pass@1: 25.8% (vs 19.6% GLM-4.7, 26.9% Claude Opus)
  • Long-horizon repo chain: 52.3% (vs 43.0% GLM-4.7)

Agentic and Multimodal Tasks:

  • Design2Code: 94.8
  • MMSearch-Plus: 30.0 (8× improvement over predecessor)
  • AndroidWorld: 75.7
  • OSWorld: 62.3

RL Gains (selected):

  • Perception: +4.8% RefCOCO-avg, +7.7% 3D (SUNRGBD)
  • Reasoning: +1.8% on MathVista/LogicVista
  • Agentic: +4.9% OSWorld

These results indicate robust gains from DSA, asynchronous RL, and multimodal design, with no loss in text-only reasoning or long-context capability.

7. Design Principles and Development Methodology

Key design “lenses” derived from GLM-5 and GLM-5V-Turbo development (Team et al., 29 Apr 2026):

  • Perception is Foundational: Fine-grained perception and frontend coding pretraining enhance not only perceptual accuracy but also agentic reasoning.
  • Hierarchical Optimization: Structured progression from low-level perception to high-level planning tasks stabilizes RL and data efficiency.
  • Reliable Specification and Verification: End-to-end evaluation with structured benchmarks (e.g., Vision2Web) and workflow-based verifiers provides reproducibility and actionable diagnostics.

These principles underscore the importance of deep architectural integration between modalities and the specification-verification interface in autonomous agentic systems.


GLM-5 establishes a new reference point for scalable, efficient, and agentically capable foundation models, with its asynchronous RL, DSA, and joint multimodal learning enabling robust autonomous behavior in complex engineering and agentic environments (Team et al., 17 Feb 2026, Team et al., 29 Apr 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to GLM-5.