# Nanbeige 4.2 (3B)

> Compact agentic model that runs the same 22-layer dense transformer stack twice, resulting in 44 transformer blocks (layers) without duplicating the layer weights.

| Property | Value |
| --- | --- |
| Lab | BOSS Zhipin (China) |
| Released | 2026-07-21 |
| Decoder type | Dense |
| Family | Dense |
| Scale | 4B total, 3B non-embedding |
| Context window | 262,144 tokens |
| Attention | GQA with RoPE |
| Layer mix | 22 shared GQA layers × 2 passes |
| KV cache / token (bf16) | 176 KiB (High) |
| License | Apache License 2.0 |

**Key detail:** Reuses the same 22-layer stack for a second pass, giving 44 block applications with 3B non-embedding parameters.

## Architecture concepts

- [Looped Transformer (Looped depth)](https://llm-atlas-7or.pages.dev/concepts/looped-depth-sharing.md): The same blocks are applied several times, reusing weights across depth.
- [Grouped-Query Attention (GQA)](https://llm-atlas-7or.pages.dev/concepts/gqa.md): Several query heads share one key/value head, shrinking the KV cache with little quality loss.

## Links

- Architecture diagram: https://sebastianraschka.com/llm-architecture-gallery/images/architectures/nanbeige-4-2-3b.webp
- config.json: https://huggingface.co/Nanbeige/Nanbeige4.2-3B/blob/main/config.json
- Tech report: https://huggingface.co/Nanbeige/Nanbeige4.2-3B/blob/main/Nanbeige42_report.pdf
- Source card (source of truth): https://sebastianraschka.com/llm-architecture-gallery/#card-nanbeige-4-2-3b
- Web page: https://llm-atlas-7or.pages.dev/models/nanbeige-4-2-3b/
- JSON: https://llm-atlas-7or.pages.dev/api/models/nanbeige-4-2-3b.json

_Data from Sebastian Raschka's LLM Architecture Gallery (https://sebastianraschka.com/llm-architecture-gallery/). Synced 2026-11-04._
