Abstract
We present Qwen3-Coder-Next, an open-weight language model specialized for coding agents. Qwen3-Coder-Next is an 80-billion-parameter model that activates only 3 billion parameters during inference, enabling strong coding capability with efficient inference. In this work, we explore how far strong training recipes can push the capability limits of models with small parameter footprints. To achieve this, we perform agentic training through large-scale synthesis of verifiable coding tasks paired with executable environments, allowing learning directly from environment feedback via mid-training and reinforcement learning. Across agent-centric benchmarks including SWE-Bench and Terminal-Bench, Qwen3-Coder-Next achieves competitive performance relative to its active parameter count. We release both base and instruction-tuned open-weight versions to support research and real-world coding agent development.
Introduction
Large Language Models (LLMs) have demonstrated remarkable proficiency in generating isolated code snippets. However, transitioning from code completion to autonomous coding agents—systems capable of navigating complex repositories, utilizing terminal tools, and iteratively debugging—remains a significant challenge. Qwen3-Coder-Next addresses this by shifting the training paradigm from static code prediction to "agentic training," where the model learns from real-world environment feedback.
By utilizing a Mixture-of-Experts (MoE) architecture with 80 billion total parameters and only 3 billion active parameters, Qwen3-Coder-Next delivers state-of-the-art performance with the efficiency of a much smaller model. This report details the methodologies used to bridge the gap between efficiency and power in autonomous software engineering tasks.
Problem Statement
The development of effective coding agents is currently hindered by two primary bottlenecks:
- Static Training Data: Traditional pretraining on GitHub repositories focuses on predicting the next token in a static file. This does not equip models with the ability to interact with compilers, interpret execution errors, or recover from failed test cases.
- Efficiency vs. Power Trade-off: Solving real-world software engineering (SE) issues typically requires massive models. However, for practical deployment in IDEs and CLI tools, developers require models that offer low latency and low operational costs without sacrificing reasoning depth.
Methods: The Agentic Training Pipeline
To overcome these limitations, we developed a staged pipeline designed to instill agentic capabilities while maintaining general intelligence.
Agentic Training Stack and MegaFlow
The core of our approach is the synthesis of verifiable tasks. We built MegaFlow, a system designed to orchestrate thousands of parallel execution environments using Docker. This allows the model to receive direct feedback from compilers and test suites during the training process.
As illustrated in Figure 3, the process involves:
- Repository Collection: Mining diverse codebases and using AST parsers to identify functional units.
- Bug Sampling: Injecting controlled bugs into existing codebases to create "bug patches."
- Bug Validation: Running the code in isolated containers to ensure the bug is reproducible through automated checks.
- Issue Generation: Converting the validated bug and its execution logs into a natural language problem statement, creating a complete "Task Instance."
Tool-Use and Specialization
To ensure robustness across different development environments, we trained the model on 21 distinct tool-calling templates (e.g., JSON, XML, Pythonic). This prevents "template lock-in" and ensures the model can adapt to various IDE/CLI scaffolds. Furthermore, we utilized expert specialization, training dedicated versions for WebDev and UX, and distilling their knowledge into the final unified MoE model.
Key Results and Insights
Qwen3-Coder-Next demonstrates that a 3B-active-parameter model can compete with much larger "frontier" models when trained with rich interaction and execution feedback.
As shown in Figure 1, Qwen3-Coder-Next achieves a success rate of 70.6% on SWE-Bench Verified, placing it in the same performance tier as DeepSeek-V3.2 (671B total parameters) and GLM-4.7. Notably, it maintains high performance on SWE-Bench Pro (42.7%) and Aider (66.2%), despite its significantly smaller active parameter footprint. In a custom benchmark of 5 different IDE/CLI scaffolds, the model maintained a 92.7% average accuracy in following specific formatting instructions.
Emergent Long-Horizon Reasoning
A key insight from our Reinforcement Learning (RL) phase was the spontaneous emergence of long-horizon capabilities. As training progressed, the average number of agent turns increased from 50 to 130, indicating that the model learned to explore more complex, multi-step solutions rather than giving up on difficult tasks.
Cross-Domain Transfer
We observed a substantial boost in competitive mathematics performance (AIME). Improving code reasoning through agentic training directly translated to better logical deduction in math, suggesting a high degree of transferability between debugging logic and mathematical problem-solving. Qwen3-Coder-Next outperformed the baseline on AIME24 (89.01 vs 82.92) and AIME25 (83.07 vs 69.64).
Limitations and Future Work
While Qwen3-Coder-Next represents a significant step forward for efficient coding agents, a performance gap remains compared to the largest proprietary models on extremely complex, large-scale software tasks. Future work will focus on integrating visual capabilities to allow agents to evaluate UI/UX outcomes directly and exploring agentic applications in cybersecurity scenarios.
Summary updated