Nanbeige4.2-3B

A 4.2B looped-transformer agent model that runs its 22 layers twice. Apache 2.0 tag, 256K context, but it needs Nanbeige's own forks.

In short. Nanbeige4.2-3B is a small text model for tool use, coding and office tasks that can run on a laptop. It repeats its own layers to think deeper without getting bigger. It comes from the language-model team at BOSS Zhipin, but popular local tools cannot load it yet, so you need the lab's own versions.

Summary

Nanbeige4.2-3B is a compact agent model from Nanbeige LLM Lab, the language-model team at BOSS Zhipin. It appeared on Hugging Face on 21 July 2026 with an Apache 2.0 license tag. With about 104,000 downloads in the 30 days to 11 November 2026, it is the most downloaded of the lab's models.

Its main idea is a looped transformer: the 22 layers are run twice for every token, which adds depth and capacity without adding parameters. The model has 4.2 billion parameters, 3 billion of them outside the embeddings, a hidden size of 3,072, 48 attention heads sharing 8 key-value heads, and a context window of 262,144 tokens. The technical report says it was pretrained from scratch on 28 trillion tokens. In the lab's experiments two passes were the best trade-off, keeping about 75% of the token efficiency of a standard transformer, and sharing the key-value cache between the two passes halved the cache but lost quality, so the full cache is kept. After supervised fine-tuning on trajectories from real and synthetic environments, the model was trained with two-stage reinforcement learning from human feedback for both thinking and non-thinking answers, reinforcement learning that controls answer length, and agentic reinforcement learning with outcome and process rewards.

In the lab's own table, run in thinking mode, it beats Qwen3.5-9B and Gemma 4 12B on most agent and coding tests, for example 63.6 on SWE-Bench Verified against 53.1 and 44.2, and 44.1 on Terminal-Bench 2.0 against 29.2 and 21.1. It trails Gemma 4 12B on IFBench (54.6 against 73.5) and SciCode (35.6 against 38.2). These are the developer's numbers, and some of the office-task tests use the lab's own scaffold. The architecture is not in stock tools: the card tells you to use Nanbeige's forks of vLLM, SGLang, llama.cpp and Ollama, or Transformers with remote code, and says the llama-server bundled with LM Studio does not support it yet. FP8 and GPTQ-Int8 builds of 5.2 GB, a pretrain-only base model and a DSpark draft model for faster decoding are published too. Nanbeige says its successor, Nanbeige4.5, is in training for release later in 2026.

Good for

  • A local personal assistant or small agent on a laptop, since the BF16 weights are 8.3 GB and the FP8 build is 5.2 GB
  • Tool use, coding and office-style tasks where a 30B-class model is too heavy
  • Research on looped transformers, since the code, a base model and a technical report are all public
  • Long inputs of up to 256K tokens on modest hardware, within the limits of the key-value cache

Watch out for

  • Stock llama.cpp, Ollama and LM Studio cannot load it; you need Nanbeige's forks or Transformers with remote code
  • The looped design runs every layer twice and keeps a cache for both passes, so it needs more compute and cache memory than a standard model with the same parameters
  • The repositories carry an Apache 2.0 tag but no LICENSE file
  • The benchmark numbers are the developer's own, and some use an in-house scaffold
  • It scores far below Gemma 4 12B on instruction following in the lab's own table

Performance claims come from the developer and have not been independently verified.

How much memory does it need?

Estimates for the Nanbeige4.2-3B variant. A mixture-of-experts model must hold all of its experts in memory even though only some are used for each token, so total parameters decide the memory and active parameters decide the speed.

Variants Parameters BF16 FP8 / INT8 4-bit (Q4) Fits on
Nanbeige4.2-3B BF16 4.17B 9.59 GB 4.8 GB 2.88 GB Laptop or phone
Nanbeige4.2-3B-FP8 FP8 4.17B 9.59 GB 4.8 GB 2.88 GB Laptop or phone
Nanbeige4.2-3B-GPTQ-Int8 INT8 4.17B 9.59 GB 4.8 GB 2.88 GB Laptop or phone
Nanbeige4.2-3B-Base BF16 4.17B 9.59 GB 4.8 GB 2.88 GB Laptop or phone

Estimates: weights plus about 15% overhead. Real usage grows with context length and depends on the software.

VRAM calculator

The license in plain words

One of the most widely used permissive licenses. You may use, change and sell products built on the model with only light conditions.

More about Apache 2.0

See also

Frequently asked questions

What is Nanbeige4.2-3B?
Nanbeige4.2-3B is a small text model for tool use, coding and office tasks that can run on a laptop. It repeats its own layers to think deeper without getting bigger. It comes from the language-model team at BOSS Zhipin, but popular local tools cannot load it yet, so you need the lab's own versions.
Can I use Nanbeige4.2-3B commercially?
Yes. Nanbeige4.2-3B is released under Apache 2.0, a permissive license. You can use it commercially if you follow the standard conditions, such as keeping the license notice.
Is Nanbeige4.2-3B open source?
Nanbeige4.2-3B is released under Apache 2.0, a license approved by the Open Source Initiative. Training data and training code may not be public, so it is best described as open weights under an open-source license.
Can I run Nanbeige4.2-3B on my own computer?
Yes. The smallest variant, Nanbeige4.2-3B, needs about 2.88 GB of memory at 4-bit precision, which fits a modern laptop or a mid-range graphics card.
When was Nanbeige4.2-3B released?
Nanbeige4.2-3B was released by Nanbeige LLM Lab on July 21, 2026.
How long a context window does Nanbeige4.2-3B have?
Nanbeige4.2-3B supports a context window of up to 256K tokens.

Official links

Sources

Specifications come from these primary sources. Benchmark claims, where mentioned, are reported by the developer.

Release date and facts last verified November 11, 2026.

Related models

Model Released Parameters Context License Smallest variant needs
Qwen3.5 Alibaba Qwen 873M – 403B 17B active 256K Apache 2.0 (Permissive) 0.602 GB Laptop or phone
Gemma 4 Google DeepMind 5.1B – 30.7B 256K Apache 2.0 (Permissive) 3.52 GB Laptop or phone
MiniCPM5-2B OpenBMB 1.08B – 2.52B 128K Apache 2.0 (Permissive) 0.745 GB Laptop or phone
SenseNova-Loop-9B-Preview SenseTime 9.66B 256K Apache 2.0 (Permissive) 22 GB Gaming GPU