Nanbeige4.2-3B - A general-purpose agent mini-model released by Nanbeige Labs
Nanbeige4.2-3B is a general-purpose agent model launched by BOSS Zhipin's Nanbeige Lab. Despite having only 3B parameters, it surpasses Qwen3.5-9B and Gemma4-12B in agent tasks such as code intelligence, office workflows, and complex tool calls...
What is Nanbeige4.2-3B?
Nanbeige4.2-3B is a general-purpose agent model launched by BOSS Zhipin's Nanbeige Lab. Despite having only 3B parameters, it surpasses larger models like Qwen3.5-9B and Gemma4-12B in agent tasks such as code intelligence, office workflows, and complex tool calls. The model employs a Looped Transformer architecture to improve effective capacity, constructing a closed-loop synthesis pipeline for three types of agent data: code, tools, and office data. Through three-stage SFT training and multi-stage RL training, it maintains strong agent capabilities while reducing inference costs. It is open-source and compatible with various inference engines.
Main functions of Nanbeige4.2-3B
-
Code-based intelligent agentsIt supports browsing, locating issues, making modifications, and running verifications in real code repositories, covering the entire software engineering process.
-
Office Intelligent AgentThe model can handle cross-format files such as documents, tables, slides, and PDFs, and supports multiple file dependencies and long-flow office workflows.
-
Complex tool callsSupports chained calls and parameter inference for MCP online services, local Python tools, and virtual tools.
-
general reasoningCovering mathematics, coding, and scientific reasoning, it achieves best-in-class results in benchmarks such as GPQA Diamond and HMMT.
-
Local Personal AssistantIt has multi-round planning, document processing and error recovery capabilities, and can be deployed as a local agent assistant with low threshold.
Technical Principles of Nanbeige4.2-3B
-
Looped Transformer architectureThe model's hidden state is fed back into the same group of layers for a second round of computation after passing through all Transformer layers. This increases the effective computation depth without increasing the number of parameters. It has been verified that looping twice is the optimal balance between performance and stability, and the KV cache is not shared, prioritizing performance.
-
Upsampling of pre-training dataThe corpus was expanded from 23T to 28T tokens, and aggressive upsampling was applied to mathematical, code, and synthetic QA data, enabling the small model to comprehensively outperform similarly sized bases in reasoning and knowledge evaluation.
-
Agent data closed-loop synthesisFor code-based intelligent agents, a flywheel of "training-failure analysis-data supplementation" is constructed. For tool calls, three types of environments are designed: real MCP, local Python, and virtual tools, with the difficulty evolving with the model's capabilities. For office-based intelligent agents, a closed-loop feedback system of material clustering, task generation, and output recycling is established.
-
Three-stage course SFTThe proportion of Agent data is gradually increased from 64K to 128K to 256K. A Loss Mask is set for error rounds to retain the error context but not to learn the error actions, so that the model can learn to correct the task based on the real error history.
-
Multi-stage RL recipeFirst, a two-stage Think/Non-Think RLHF process is used to stabilize the quality of the generated data. Then, Reasoning RL with length control is performed to reduce invalid tokens in simple problems. Finally, Agentic RL is performed by combining Outcome Reward and Action-Centric Rubric. Tasks with shorter trajectories and existing success rates are selected for training to improve stability.
Follow us on WeChat and reply with "open source",join inAI open source project discussion group
How to use Nanbeige 4.2-3B
- Obtain model weightsDownload the weight file for the Agent model (Nanbeige4.2-3B) or Base model (Nanbeige4.2-3B-Base) from Hugging Face.
- Select Inference EngineIt loads models using adapted engines such as Transformers, SGLang, vLLM, llama.cpp, or Ollam. The 3B parameters have low hardware requirements and are suitable for deployment on local PCs or edge devices.
- Switch inference modeThe system allows users to choose between a thinking mode (Think) for deep reasoning or a non-thinking mode (Non-Think) for rapid response, depending on the complexity of the task. The two modes can be switched flexibly.
- Access Agent FrameworkBy connecting the model to Agent frameworks such as OpenClaw and configuring external tools and Scaffold, it can perform multi-step code, office, or research tasks.
The core advantages of Nanbeige4.2-3B
-
Small parameters, big capabilitiesThe 3B parameter consistently outperforms the 9B/12B level model on Agent tasks, significantly reducing the inference cost in high-frequency calling scenarios.
-
Architectural InnovationUsing Looped Transformer to squeeze out effective capacity under fixed parameters, it achieves approximately 75% token efficiency gains compared to the standard Transformer.
-
Data FlywheelAll three types of agent data construct closed-loop feedback and difficulty evolution mechanisms, and the training data improves in sync with the model's capabilities rather than stagnates.
-
Training precisionSFT error mask preserves the error context but does not learn the error actions, while RL multi-stage recipe balances accuracy improvement with reduced output length.
-
Low-barrier deploymentIt is compatible with mainstream inference engines and supports Think/Non-Think dual modes, making it suitable for local deployment and cost-sensitive scenarios.
Project address of Nanbeige4.2-3B
- HuggingFace model library:
- https://huggingface.co/Nanbeige/Nanbeige4.2-3B
- https://huggingface.co/Nanbeige/Nanbeige4.2-3B-Base
- Technical Papers:https://huggingface.co/Nanbeige/Nanbeige4.2-3B/blob/main/Nanbeige42_report.pdf
Comparison of Nanbeige4.2-3B with similar competing products
| Comparison Dimensions | Nanbeige4.2-3B | Qwen3.5-4B |
|---|---|---|
| Non-Embedding parameter count | 3B | 4B |
| General Agent(PinchBench-V2) | 74.7 | 63.9 |
| Code Agent(SWE-Bench Verified) | 63.6 | 38.8 |
| Office tasks (GDPval) | 68.8 | 37.0 |
| Reasoning Ability (GPQA) | 53.3 | 43.1 |
| Architectural Features | Looped Transformer | Standard Transformer |
| Deployment threshold | Lower price, compatible with multiple engines | Standard deployment |
Application scenarios of Nanbeige4.2-3B
-
Local code development: Perform software engineering tasks such as browsing code repositories, fixing bugs, and verifying patches in the developer's local environment.
-
Office workflow automationAutomatically processes cross-format documents, tables, and slides, completing data organization, report generation, and format conversion.
-
Intelligent tool orchestration serviceIt uses the MCP protocol to call online services and local tools to achieve information retrieval, data analysis, and multi-step task orchestration.
-
Edge device personal assistantDeployed on local devices such as PCs or NAS, it serves as a low-latency, privacy-controlled universal agent assistant.
-
High-frequency agent system core engineIt can replace large models in complex agent systems that require dozens to hundreds of model calls, significantly reducing operating costs.