CoolFace
Modelpublic

tinyopsec/Nanbeige4.2-3B-GGUF

sourceHugging Faceapache-2.0updated 14d agoView on Hugging Face
1likes632downloads
Model Card

Nanbeige4.2-3B — GGUF Quantizations

Community-provided GGUF quantizations of Nanbeige/Nanbeige4.2-3B, a compact agentic LLM developed by Nanbeige LLM Lab.

All weight files were converted from the original BF16 SafeTensors checkpoint using the Nanbeige fork of llama.cpp (-b nanbeige42). No fine-tuning or architectural changes were applied.


Model Overview

PropertyValue
Base modelNanbeige/Nanbeige4.2-3B
ArchitectureLooped Transformer (nanbeige)
Total parameters4B
Non-embedding parameters3B
Context length262,144 tokens (256K)
LanguagesEnglish, Chinese
FormatGGUF
Original licenseApache 2.0
Technical reportarXiv:2607.22083

Nanbeige4.2-3B is a supervised fine-tuned + RL-trained agentic model built on Nanbeige4.2-3B-Base. Its Looped Transformer architecture reuses transformer layers to increase effective model capacity without increasing parameter count. At 3B non-embedding parameters it outperforms models such as Qwen3.5-9B and Gemma4-12B on several agentic and reasoning benchmarks.


Available Quantizations

QuantizationFile sizeNotes
Q2_K1.76 GBMinimum footprint; noticeable quality loss
Q3_K_S2.00 GBSmall 3-bit; good for very constrained memory
Q3_K_M2.17 GBMedium 3-bit; better quality than S
Q4_02.48 GBLegacy 4-bit; lower quality than K-quants
Q4_K_S2.50 GBSmall 4-bit K-quant
Q4_K_M2.57 GBRecommended default — best quality/size ratio
Q5_K_S2.94 GBSmall 5-bit K-quant
Q5_K_M2.99 GBMedium 5-bit; high quality with modest size
Q6_K3.42 GBNear-lossless; use when RAM allows
Q8_04.43 GBMinimal precision loss; reference quality
F168.34 GBFull half-precision; for benchmarking only
Recommendation: Q4_K_M is the best starting point for most deployments. Use Q6_K or Q8_0 if you have sufficient RAM and need maximum fidelity.

Quickstart

llama.cpp

Install (macOS / Linux)

bash
curl -LsSf https://llama.app/install.sh | sh

Install (Windows via WinGet)

powershell
winget install llama.cpp

Run a local OpenAI-compatible server

bash
llama serve -hf tinyopsec/Nanbeige4.2-3B-GGUF:Q4_K_M

Run inference in the terminal

bash
llama cli -hf tinyopsec/Nanbeige4.2-3B-GGUF:Q4_K_M

Ollama

bash
ollama run hf.co/tinyopsec/Nanbeige4.2-3B-GGUF:Q4_K_M

Docker

bash
docker model run hf.co/tinyopsec/Nanbeige4.2-3B-GGUF:Q4_K_M

LM Studio

Download any GGUF file from the Files tab and open it directly in LM Studio.

Note: The bundled llama.cpp inside LM Studio does not yet support the nanbeige architecture. You must replace the LM Studio backend binaries with the Nanbeige fork: 1. Build llama.cpp from the `nanbeige42` branch 2. Copy build/bin/* into your LM Studio backend directory (e.g. ~/.lmstudio/extensions/backends/llama.cpp-<version>)

Inference Parameters

The following settings are recommended by the original authors:

ScenarioTemperatureMax new tokens
Agentic / tool-use tasks1.065,536
Reasoning / chat tasks0.6131,072

The chat template exposes two configuration flags:

  • enable_thinking — enables chain-of-thought reasoning (on by default; set to false for non-thinking mode)
  • preserve_thinking — controls whether reasoning tokens from previous turns are retained in multi-turn conversations (recommended true for tool-use and code-agent workflows; false for general chat)

For tool-calling, tool_call_format="xml" yields the best performance; json is supported for compatibility.


Benchmark Summary

Results reported by the original authors (thinking mode, preserve_thinking=true):

BenchmarkNanbeige4.2-3BQwen3.5-9BQwen3.5-4BGemma4-12B
SWE-Bench Verified63.653.138.844.2
SWE-Bench Pro46.933.829.421.9
GPQA-Diamond87.481.778.278.8
HMMT-Feb-202682.869.660.651.5
LiveCodeBench-V672.565.655.872.0
HLE (w/o Search)17.812.56.814.8
Claw-Evalpass52.247.136.925.5
GDPval rubrics74.361.946.768.5

Full benchmark tables and methodology are available in the original model card and technical report.


Conversion Notes

GGUF files were produced using the Nanbeige fork of llama.cpp. The standard upstream llama.cpp (ggerganov/llama.cpp) does not support the nanbeige architecture at the time of publication; use the forked build for any operations that require re-quantizing or converting these files.

bash
# Clone the Nanbeige fork
git clone -b nanbeige42 https://github.com/Nanbeige/llama.cpp.git
cd llama.cpp
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j

# BF16 → GGUF (reference step)
python3 convert_hf_to_gguf.py /path/to/Nanbeige4.2-3B \
  --outfile Nanbeige4.2-3B-BF16.gguf \
  --outtype bf16

# Re-quantize to Q4_K_M
./build/bin/llama-quantize \
  Nanbeige4.2-3B-BF16.gguf \
  Nanbeige4.2-3B-Q4_K_M.gguf \
  Q4_K_M

Limitations

As noted by the original authors: the model may produce inaccurate, biased, or otherwise inappropriate outputs due to its probabilistic nature. These GGUF files are unmodified quantizations of the original checkpoint and inherit all limitations documented in the original model card.


License

The original model weights are released under the Apache 2.0 license by Nanbeige LLM Lab. This repository provides only format-converted quantizations. The Apache 2.0 license terms apply; see LICENSE in the original repository.


Citation

If you use this model, please cite the original work:

bibtex
@article{lab2026nanbeige4,
  title={Nanbeige4.2-3B: Unlocking Agentic Capabilities in a Compact Model},
  author={Lab, Nanbeige and Yang, Chen and Huang, Chengrui and Lan, Fufeng and others},
  journal={arXiv preprint arXiv:2607.22083},
  year={2026}
}

Links