Nanbeige4.2-3B – A General-Purpose Agent Small Model from Nanbeige Lab
Executive Summary:
Nanbeige4.2-3B is a general-purpose agent small model from BOSS Zhipin’s Nanbeige Lab. With only 3B parameters, it surpasses larger models such as Qwen3.5-9B and Gemma4-12B on code agents, office workflows, and complex tool use. It uses a Looped Transformer architecture to increase effective capacity, builds closed-loop synthetic data pipelines for code, tools, and office agents, and is trained with three-stage curriculum SFT plus multi-stage RL—delivering strong agent ability at lower inference cost. The model is open-sourced and adapted to multiple inference engines.
1. What is Nanbeige4.2-3B
Nanbeige4.2-3B is a general-purpose agent small model from BOSS Zhipin’s Nanbeige Lab. With only 3B parameters, it surpasses larger models such as Qwen3.5-9B and Gemma4-12B on code agents, office workflows, and complex tool use. It uses a Looped Transformer architecture to increase effective capacity, builds closed-loop synthetic data pipelines for code, tools, and office agents, and is trained with three-stage curriculum SFT plus multi-stage RL—delivering strong agent ability at lower inference cost. The model is open-sourced and adapted to multiple inference engines.
Technical positioning: It sits at the intersection of NLP and autonomous agents, focused on general agent tasks—code agents, office workflow automation, and complex tool calling. The goal is to beat larger models on agent benchmarks at a 3B scale, enabling low-cost local deployment and high-frequency calling.
R&D background: Developed by Nanbeige Lab at BOSS Zhipin, the team has deep experience in agent data synthesis and training methods. The motivation is clear: frontier models are expensive and hard to deploy for agent workloads, while small models usually lack agent competence—so the lab pushed the frontier of agent performance at tiny parameter counts.
Core value: It closes the gap between “small and cheap” and “strong at agents,” so developers can get high agent performance at very low cost. Lower inference spend, local deployability, and retained agent strength make it practical for high-frequency agent systems and privacy-sensitive settings.
Technical highlights: Looped Transformer deepens effective compute without adding parameters, claiming about 75% token-efficiency gains; closed-loop synthetic pipelines for three agent data types evolve with model ability; training combines curriculum SFT (64K→128K→256K) and multi-stage RL (Think/Non-Think RLHF, Reasoning RL, Agentic RL) with error masking and action-level rewards for more stable agent behavior.
2. Key Features
Code agent: With repo-level context and tool-calling chains, the model can browse real repositories, locate bugs, produce patches, and run tests—covering the full software-engineering loop. Closed-loop agent data synthesis plus action-level RL teach a read–edit–verify policy. Teams can plug it into IDEs or CI; it reaches 63.6% on SWE-Bench Verified, cutting manual triage cost.
Office agent: Built for cross-format office workflows spanning docs, spreadsheets, slides, and PDFs with multi-file dependencies—data cleanup, report generation, and format conversion. Office agent trajectories and curriculum context expansion improve multi-step file stability. On GDPval it scores 68.8, helping enterprises automate repetitive office work and shorten delivery cycles.
Complex tool use: Supports MCP online services, local Python tools, and virtual tools with chained calls and parameter inference, including planning call order and multi-step dependencies. Tool-call trajectory synthesis and Agentic RL strengthen parameter correctness and recovery. Useful for retrieval, analytics, and service orchestration; it scores 74.7 on PinchBench-V2 for extensible tool orchestration.
General reasoning: Covers math, coding, and scientific reasoning, with strong same-scale results on GPQA Diamond and HMMT. Think/Non-Think modes plus Reasoning RL let users trade depth for latency. Practical for Q&A, research assist, and algorithm analysis; GPQA at 53.3 beats many same-size models.
Local personal assistant: Multi-turn planning, file handling, and error-history correction make it a low-friction local agent on PCs or NAS boxes. The small footprint plus mainstream engine support runs at about 6GB VRAM in FP16 for private/offline use—calendar help, local search, and private knowledge Q&A without cloud dependence.
Dual inference modes: One set of weights supports Think (deep reasoning) and Non-Think (fast reply), switched by task complexity. Dual-mode RLHF with shared weights avoids maintaining two models—ideal for latency-sensitive high-frequency calls and harder tasks on the same deployment.
3. How to Use
Environment: 3B parameters need roughly 6GB VRAM in FP16; NVIDIA RTX 3060+ or Apple Silicon Macs are recommended. Use Linux or Windows with Python 3.8+ and PyTorch. CPU inference works but is slower.
Download weights: Get Nanbeige4.2-3B (Agent) or Nanbeige4.2-3B-Base from Hugging Face via
git clone https://huggingface.co/Nanbeige/Nanbeige4.2-3Bor the Hub API.Pick an engine: Adapted for Transformers, SGLang, vLLM, llama.cpp, and Ollama. Example:
from transformers import AutoModelForCausalLM, AutoTokenizer; model = AutoModelForCausalLM.from_pretrained("Nanbeige/Nanbeige4.2-3B"). Ollama users can tryollama pull nanbeige4.2-3b.Switch modes: Use generation settings or special tokens—e.g. a
<think>prefix for deep reasoning; omit it for fast Non-Think replies. See official examples; modes can be switched dynamically.Hook into an agent framework: Connect via OpenClaw (or similar), configure MCP services / Python executors and scaffolding, then scale from single-tool calls to multi-step code, office, or research workflows.
4. Pros and Cons
| Pros |
|---|
| Small size, strong agents: At 3B it beats 9B/12B models on agent tasks, cutting inference cost for high-frequency and edge deployments so smaller teams can afford repo-level coding and office automation. |
| Architecture innovation: Looped Transformer deepens effective compute without more parameters (~75% token-efficiency claim), helping consumer GPUs and on-device runs. |
| Data flywheel: Closed-loop feedback and difficulty evolution across three agent data types keep training data aligned with model ability, reinforcing code, tools, and office skills. |
| Careful training recipe: SFT error masking keeps error context without learning bad actions; multi-stage RL balances accuracy and length for fewer wasted agent loops. |
| Low deploy barrier: Works with major engines, Think/Non-Think in one weight, runnable on consumer GPUs for private rollouts. |
5. Comparison with Similar Tools
| Dimension | Nanbeige4.2-3B | Qwen3.5-4B | Qwen3.5-9B |
|---|---|---|---|
| Non-embedding params | 3B, edge-friendly, ~6GB FP16 | 4B, still small-model class | 9B, needs more VRAM/bandwidth |
| General Agent (PinchBench-V2) | 74.7, leads this set | 63.9, weaker general agent | Not officially published; Nanbeige reports lower than 74.7 |
| Code Agent (SWE-Bench Verified) | 63.6%, strong repo bugfix | 38.8%, clear gap | Not published; Nanbeige claims it wins |
| Office (GDPval) | 68.8, strong cross-format workflows | 37.0, weaker office automation | Not published; self-eval needed |
| Reasoning (GPQA) | 53.3, strong for size | 43.1, weaker science reasoning | Not published; 9B peers often higher |
| Architecture | Looped Transformer, deeper effective compute | Standard Transformer, mature ecosystem | Standard Transformer, broader general ability |
| Deploy barrier | Lower; Transformers/SGLang/vLLM/Ollama | Standard deploy, rich docs | Standard deploy, higher VRAM/ops cost |
Selection tip: For cost-sensitive, high-frequency agents (coding assist, office automation), Nanbeige4.2-3B is a strong first pick—especially for local/edge. If you already depend on the Qwen stack or need stronger general reasoning, Qwen3.5-9B or Gemma4-12B remain options at higher cost. For quick prototypes with modest agent needs, Qwen3.5-4B is stable but clearly weaker on agents.
6. Editor's Take
Nanbeige4.2-3B shows a clean technical path: Looped Transformer raises effective depth without growing parameters, and closed-loop data plus curriculum SFT / multi-stage RL let a 3B model challenge larger peers on agent work. The practical upside is real—high-frequency coding and office automation can move off expensive frontier models onto something that runs locally with privacy and offline benefits. It fits cost-conscious builders, teams needing private deploy, and researchers studying small agent models. If multilingual quality and ecosystem polish improve, it could become a reference point for agent-scale small models.
Recommendation: ★★★★☆ (4/5)
Why: Strong agent numbers, low deploy cost, open and reproducible. Deductions for unproven Chinese performance, thinner ecosystem, and a reasoning ceiling set by parameter scale.
7. Use Cases
Local software development: Browse repos, fix bugs, and verify patches on a developer machine; embed in IDE plugins or CI for review and auto-fix loops.
Office workflow automation: Process multi-format docs, sheets, and decks for cleanup, reporting, and conversion—cutting repetitive office labor.
Tool orchestration services: Call MCP online services and local tools for retrieval, analytics, and multi-step pipelines (e.g., DB extract → API transform → report).
Edge personal assistant: Run on PC/NAS as a low-latency, privacy-first agent for calendars, local search, and private Q&A without sending sensitive data to the cloud.
High-frequency agent core: Replace larger models inside systems that call the LLM tens or hundreds of times—customer bots, test automation, workflow engines—to cut operating cost.
8. FAQ
Q: Is Nanbeige4.2-3B fully open source?
A: Weights are open on Hugging Face for both the Agent build (Nanbeige4.2-3B) and Base build (Nanbeige4.2-3B-Base). You can download and integrate for research or products, but always read the official license for commercial terms, attribution, and derivative-model rules before shipping.
Q: What hardware do I need?
A: Expect about 6GB VRAM in FP16; RTX 3060-class GPUs or Apple Silicon Macs (M1/M2+) are comfortable. CPU works with lower throughput—plan for 16GB+ system RAM. INT4/INT8 quantization can cut VRAM further for laptops and edge boxes.
Q: How do I switch Think vs Non-Think?
A: Usually via a special token: prefix the prompt with <think> for deep Think mode; omit it for fast Non-Think. Exact knobs vary by engine—check official examples and your runtime docs, then A/B latency vs accuracy to pick a default.
Q: Does it support Chinese?
A: Training prioritizes English agent scenarios; Chinese code, office, and tool-use quality is not presented as a primary, fully validated target. For Chinese-first products, run a small eval on real tickets, docs, and repos—and consider RAG or fine-tuning—before production.
Q: How do I connect MCP tools?
A: Use an agent framework such as OpenClaw to register MCP endpoints so the model can call tools during inference. Start with single-tool correctness, then expand to multi-tool graphs, with timeouts, retries, and permission boundaries for production safety.
Q: What is the context length?
A: Up to 256K is claimed, grown via curriculum SFT (64K→128K→256K) for long documents and multi-turn agents. In practice, measure VRAM, KV cache, and engine throughput; for ultra-long inputs, summarize or retrieve first to balance quality and cost.
9. Project Links
- Hugging Face (Agent): https://huggingface.co/Nanbeige/Nanbeige4.2-3B
- Hugging Face (Base): https://huggingface.co/Nanbeige/Nanbeige4.2-3B-Base
- Technical report (PDF): https://huggingface.co/Nanbeige/Nanbeige4.2-3B/blob/main/Nanbeige42_report.pdf
Related AI Model Articles

OpenMuse – CopilotKit Open-Source Personal AI Assistant
OpenMuse is an open-source personal AI assistant project developed by the CopilotKit team. Its core design philosophy is "giving an Agent a computer" — by combining a persistent browser, optional Linu...

In-Depth Review of Longcat-2.5-preview: Meituan's Next-Generation Multimodal Long-Range Agent Model
LongCat-2.5-preview is Meituan's latest next-generation large model. Building upon the 1.6T total parameters, approximately 48B active parameters, and native 1M token context of LongCat-2.0, it marks ...

Review of DeepSeek Harness Desktop: How the Official GUI Client Lowers the Bar for Agent Usage
DeepSeek Harness Desktop is the official graphical client launched by DeepSeek, designed to provide a visual interface for the originally command-line-based DeepSeek Harness framework. After users log...

Step Code – In-Depth Review of StepFun's Open-Source Terminal Programming Agent
Step Code is an open-source terminal programming agent launched by StepFun, licensed under the MIT License, which allows developers to complete the full workflow of code writing, debugging, execution,...
© All Rights Reserved. Some content on this site is partially generated by AI with human review.
