Instructions to use SimplySara/Nanbeige4.1-3B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SimplySara/Nanbeige4.1-3B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SimplySara/Nanbeige4.1-3B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SimplySara/Nanbeige4.1-3B-GGUF", dtype="auto") - llama-cpp-python
How to use SimplySara/Nanbeige4.1-3B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SimplySara/Nanbeige4.1-3B-GGUF", filename="Nanbeige4.1-3B-BF16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use SimplySara/Nanbeige4.1-3B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use SimplySara/Nanbeige4.1-3B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SimplySara/Nanbeige4.1-3B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SimplySara/Nanbeige4.1-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
- SGLang
How to use SimplySara/Nanbeige4.1-3B-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SimplySara/Nanbeige4.1-3B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SimplySara/Nanbeige4.1-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SimplySara/Nanbeige4.1-3B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SimplySara/Nanbeige4.1-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use SimplySara/Nanbeige4.1-3B-GGUF with Ollama:
ollama run hf.co/SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
- Unsloth Studio new
How to use SimplySara/Nanbeige4.1-3B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for SimplySara/Nanbeige4.1-3B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for SimplySara/Nanbeige4.1-3B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for SimplySara/Nanbeige4.1-3B-GGUF to start chatting
- Pi new
How to use SimplySara/Nanbeige4.1-3B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use SimplySara/Nanbeige4.1-3B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use SimplySara/Nanbeige4.1-3B-GGUF with Docker Model Runner:
docker model run hf.co/SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
- Lemonade
How to use SimplySara/Nanbeige4.1-3B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SimplySara/Nanbeige4.1-3B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Nanbeige4.1-3B-GGUF-Q4_K_M
List all available models
lemonade list
This is a standard quantization of Nanbeige/Nanbeige4.1-3B, made by SimplySara
| Model | Size_GB | BPW | PPL_Q | Top_P_Match |
|---|---|---|---|---|
Nanbeige4.1-3B-BF16.gguf |
7.33 | 16.01 | 35.5136 | 100.000% |
Nanbeige4.1-3B-MXFP4_MOE.gguf |
3.9 | 8.51 | 35.7776 | 94.681% |
Nanbeige4.1-3B-i1-MXFP4_MOE.gguf |
3.9 | 8.51 | 35.7776 | 94.681% |
Nanbeige4.1-3B-Q8_0.gguf |
3.9 | 8.51 | 35.7776 | 94.681% |
Nanbeige4.1-3B-i1-Q8_0.gguf |
3.9 | 8.51 | 35.7776 | 94.681% |
Nanbeige4.1-3B-Q6_K.gguf |
3.01 | 6.57 | 36.4314 | 90.241% |
Nanbeige4.1-3B-i1-Q6_K.gguf |
3.01 | 6.57 | 35.5096 | 90.793% |
Nanbeige4.1-3B-Q5_1.gguf |
2.78 | 6.07 | 35.8377 | 82.867% |
Nanbeige4.1-3B-i1-Q5_1.gguf |
2.78 | 6.07 | 36.5278 | 87.097% |
Nanbeige4.1-3B-Q5_K_M.gguf |
2.63 | 5.75 | 36.3385 | 85.444% |
Nanbeige4.1-3B-i1-Q5_K_M.gguf |
2.63 | 5.75 | 36.7817 | 87.277% |
Nanbeige4.1-3B-i1-Q5_0.gguf |
2.58 | 5.64 | 35.3274 | 84.947% |
Nanbeige4.1-3B-Q5_K_S.gguf |
2.58 | 5.62 | 36.9553 | 82.225% |
Nanbeige4.1-3B-i1-Q5_K_S.gguf |
2.58 | 5.62 | 36.0077 | 86.763% |
Nanbeige4.1-3B-Q5_0.gguf |
2.58 | 5.62 | 34.471 | 81.485% |
Nanbeige4.1-3B-i1-Q4_1.gguf |
2.37 | 5.18 | 34.9182 | 80.453% |
Nanbeige4.1-3B-Q4_1.gguf |
2.37 | 5.18 | 36.7138 | 72.166% |
Nanbeige4.1-3B-i1-Q4_K_M.gguf |
2.27 | 4.97 | 35.1169 | 80.951% |
Nanbeige4.1-3B-Q4_K_M.gguf |
2.27 | 4.97 | 35.551 | 76.667% |
Nanbeige4.1-3B-IQ4_NL.gguf |
2.18 | 4.77 | 35.462 | 75.484% |
Nanbeige4.1-3B-Q4_K_S.gguf |
2.18 | 4.76 | 36.9027 | 73.805% |
Nanbeige4.1-3B-i1-Q4_K_S.gguf |
2.18 | 4.76 | 35.2205 | 80.920% |
Nanbeige4.1-3B-i1-Q4_0.gguf |
2.17 | 4.75 | 32.071 | 75.748% |
Nanbeige4.1-3B-i1-IQ4_NL.gguf |
2.17 | 4.74 | 33.9382 | 80.165% |
Nanbeige4.1-3B-Q4_0.gguf |
2.17 | 4.73 | 31.1932 | 72.255% |
Nanbeige4.1-3B-IQ4_XS.gguf |
2.09 | 4.56 | 36.4346 | 76.044% |
Nanbeige4.1-3B-i1-IQ4_XS.gguf |
2.07 | 4.52 | 34.318 | 80.400% |
Nanbeige4.1-3B-Q3_K_L.gguf |
2 | 4.37 | 36.5177 | 70.362% |
Nanbeige4.1-3B-i1-Q3_K_L.gguf |
2 | 4.37 | 36.735 | 73.594% |
Nanbeige4.1-3B-Q3_K_M.gguf |
1.88 | 4.1 | 33.7037 | 67.260% |
Nanbeige4.1-3B-i1-Q3_K_M.gguf |
1.88 | 4.1 | 36.8062 | 72.679% |
Nanbeige4.1-3B-i1-IQ3_M.gguf |
1.78 | 3.88 | 35.4695 | 68.806% |
Nanbeige4.1-3B-IQ3_M.gguf |
1.78 | 3.88 | 38.1415 | 60.134% |
Nanbeige4.1-3B-IQ3_S.gguf |
1.74 | 3.8 | 909.214 | 22.657% |
Nanbeige4.1-3B-i1-IQ3_S.gguf |
1.74 | 3.8 | 35.6732 | 67.415% |
Nanbeige4.1-3B-i1-Q3_K_S.gguf |
1.73 | 3.78 | 34.9748 | 66.103% |
Nanbeige4.1-3B-Q3_K_S.gguf |
1.73 | 3.78 | 38.1397 | 61.667% |
Nanbeige4.1-3B-i1-IQ3_XS.gguf |
1.67 | 3.65 | 35.2176 | 66.490% |
Nanbeige4.1-3B-i1-IQ3_XXS.gguf |
1.55 | 3.38 | 33.543 | 61.474% |
Nanbeige4.1-3B-i1-Q2_K.gguf |
1.51 | 3.3 | 38.3969 | 59.878% |
Nanbeige4.1-3B-Q2_K.gguf |
1.51 | 3.3 | 57.987 | 47.507% |
Nanbeige4.1-3B-i1-Q2_K_S.gguf |
1.43 | 3.13 | 44.2038 | 57.847% |
Nanbeige4.1-3B-i1-IQ2_M.gguf |
1.41 | 3.08 | 38.2793 | 56.770% |
Nanbeige4.1-3B-i1-IQ2_S.gguf |
1.33 | 2.9 | 42.7728 | 52.282% |
Nanbeige4.1-3B-i1-IQ2_XS.gguf |
1.25 | 2.73 | 48.201 | 49.136% |
Nanbeige4.1-3B-i1-IQ2_XXS.gguf |
1.17 | 2.55 | 58.2207 | 44.731% |
Nanbeige4.1-3B-i1-IQ1_M.gguf |
1.07 | 2.33 | 110.923 | 36.721% |
Nanbeige4.1-3B-i1-IQ1_S.gguf |
1.01 | 2.2 | 234.974 | 29.321% |
Introduction
Nanbeige4.1-3B is built upon Nanbeige4-3B-Base and represents an enhanced iteration of our previous reasoning model, Nanbeige4-3B-Thinking-2511, achieved through further post-training optimization with supervised fine-tuning (SFT) and reinforcement learning (RL). As a highly competitive open-source model at a small parameter scale, Nanbeige4.1-3B illustrates that compact models can simultaneously achieve robust reasoning, preference alignment, and effective agentic behaviors.
Specifically, Nanbeige4.1-3B exhibits the following key strengths:
- Strong Reasoning: Nanbeige4.1-3B is capable of solving complex, multi-step problems through sustained and coherent reasoning within a single forward pass, and reliably produces correct final answers on challenging tasks such as LiveCodeBench-Pro, IMO-Answer-Bench, and AIME 2026 I.
- Robust Preference Alignment: Nanbeige4.1-3B achieves solid alignment performance, outperforming not only same-scale models such as Qwen3-4B-2507 and Nanbeige4-3B-2511, but also substantially larger models including Qwen3-30B-A3B and Qwen3-32B on Arena-Hard-v2 and Multi-Challenge.
- Agentic Capability: Nanbeige4.1-3B is the first general small model to natively support deep-search tasks and reliably sustain complex problem solving involving more than 500 rounds of tool invocations. It fills a long-standing gap in the small-model ecosystem where models are typically optimized for either general reasoning or agentic scenarios, but rarely excel at both.
Technical Report: Link
Performances
We evaluate Nanbeige4.1-3B across a broad and diverse set of benchmarks covering general reasoning, and deep-search capabilities.
General Reasoning Tasks
On general reasoning tasks including code, math, science, alignment, and tool-use benchmarks, Nanbeige4.1-3B not only significantly outperforms same-scale models such as Qwen3-4B, but also demonstrates overall superior performance compared to larger models including Qwen3-30B-A3B-2507 and Qwen3-32B.
| Benchmark | Qwen3-4B-2507 | Qwen3-8B | Qwen3-14B | Qwen3-32B | Qwen3-30B-A3B-2507 | Nanbeige4-3B-2511 | Nanbeige4.1-3B |
|---|---|---|---|---|---|---|---|
| Code | |||||||
| Live-Code-Bench-V6 | 57.4 | 49.4 | 55.9 | 55.7 | 66.0 | 46.0 | 76.9 |
| Live-Code-Bench-Pro-Easy | 40.2 | 41.2 | 33.0 | 42.3 | 60.8 | 40.2 | 81.4 |
| Live-Code-Bench-Pro-Medium | 5.3 | 3.5 | 1.8 | 3.5 | 3.5 | 5.3 | 28.1 |
| Math | |||||||
| AIME 2026 I | 81.46 | 70.42 | 76.46 | 75.83 | 87.30 | 84.1 | 87.40 |
| HMMT Nov | 68.33 | 48.33 | 56.67 | 57.08 | 71.25 | 66.67 | 77.92 |
| IMO-Answer-Bench | 48.00 | 36.56 | 41.81 | 43.94 | 54.34 | 38.25 | 53.38 |
| Science | |||||||
| GPQA | 65.8 | 62.0 | 63.38 | 68.4 | 73.4 | 82.2 | 83.8 |
| HLE (Text-only) | 6.72 | 5.28 | 7.00 | 9.31 | 11.77 | 10.98 | 12.60 |
| Alignment | |||||||
| Arena-Hard-v2 | 34.9 | 26.3 | 36.9 | 56.0 | 60.2 | 60.0 | 73.2 |
| Multi-Challenge | 41.14 | 36.30 | 36.97 | 38.72 | 49.40 | 41.20 | 52.21 |
| Tool Use | |||||||
| BFCL-V4 | 44.87 | 42.20 | 45.14 | 47.90 | 48.6 | 53.8 | 56.50 |
| Tau2-Bench | 45.9 | 42.06 | 44.96 | 45.26 | 47.70 | 41.77 | 48.57 |
Deep Search Tasks
As a general small model, Nanbeige4.1-3B achieves deep-search performance comparable to specialized agents under 10B parameters. In contrast to existing small general models, which typically exhibit little to no deep-search capability, Nanbeige4.1-3B represents a substantial qualitative improvement over prior small general models.
Deep Search and Agent Benchmarks
| Model | xBench-DeepSearch-2505 | xBench-DeepSearch-2510 | Browse-Comp | Browse-Comp-ZH | GAIA (Text-only) | HLE | SEAL-0 |
|---|---|---|---|---|---|---|---|
| Search-Specialized Small Agents | |||||||
| MiroThinker-v1.0-8B | 61 | – | 31.1 | 40.2 | 66.4 | 21.5 | 40.4 |
| AgentCPM-Explore-4B | 70 | – | 25.0 | 29.0 | 63.9 | 19.1 | 40.0 |
| Large Foundation Models (with Tools) | |||||||
| GLM-4.6-357B | 70 | – | 45.1 | 49.5 | 71.9 | 30.4 | – |
| Minimax-M2-230B | 72 | – | 44.0 | 48.5 | 75.7 | 31.8 | – |
| DeepSeek-V3.2-671B | 71 | – | 67.6 | 65.0 | 63.5 | 40.8 | 38.5 |
| Small Foundation Models (with Tools) | |||||||
| Qwen3-4B-2507 | 34 | 5 | 1.57 | 7.92 | 28.33 | 11.13 | 15.74 |
| Qwen3-8B | 31 | 2 | 0.79 | 5.15 | 19.53 | 10.24 | 6.34 |
| Qwen3-14B | 34 | 9 | 2.36 | 7.11 | 30.23 | 10.17 | 12.64 |
| Qwen3-32B | 39 | 8 | 3.15 | 7.34 | 30.17 | 9.26 | 8.15 |
| Qwen3-30B-A3B-2507 | 25 | 10 | 1.57 | 4.12 | 31.63 | 14.81 | 9.24 |
| Ours (with Tools) | |||||||
| Nanbeige4-3B-2511 | 33 | 11 | 0.79 | 3.09 | 19.42 | 13.89 | 12.61 |
| Nanbeige4.1-3B | 75 | 39 | 19.12 | 31.83 | 69.90 | 22.29 | 41.44 |
Quickstart
For inference hyperparameters, we recommend the following settings:
- Temperature: 0.6
- Top-p: 0.95
- Repeat penalty: 1.0
- Max New Tokens: 131072
For the chat scenario:
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(
'Nanbeige/Nanbeige4.1-3B',
use_fast=False,
trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
'Nanbeige/Nanbeige4.1-3B',
torch_dtype='auto',
device_map='auto',
trust_remote_code=True
)
messages = [
{'role': 'user', 'content': 'Which number is bigger, 9.11 or 9.8?'}
]
prompt = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=False
)
input_ids = tokenizer(prompt, add_special_tokens=False, return_tensors='pt').input_ids
output_ids = model.generate(input_ids.to('cuda'), eos_token_id=166101)
resp = tokenizer.decode(output_ids[0][len(input_ids[0]):], skip_special_tokens=True)
print(resp)
For the tool use scenario:
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(
'Nanbeige/Nanbeige4.1-3B',
use_fast=False,
trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
'Nanbeige/Nanbeige4.1-3B',
torch_dtype='auto',
device_map='auto',
trust_remote_code=True
)
messages = [
{'role': 'user', 'content': 'Help me check the weather in Beijing now'}
]
tools = [{'type': 'function',
'function': {'name': 'SearchWeather',
'description': 'Find out the current weather in a place on a certain day.',
'parameters': {'type': 'dict',
'properties': {'location': {'type': 'string',
'description': 'A city in China.'},
'required': ['location']}}}}]
prompt = tokenizer.apply_chat_template(
messages,
tools,
add_generation_prompt=True,
tokenize=False
)
input_ids = tokenizer(prompt, add_special_tokens=False, return_tensors='pt').input_ids
output_ids = model.generate(input_ids.to('cuda'), eos_token_id=166101)
resp = tokenizer.decode(output_ids[0][len(input_ids[0]):], skip_special_tokens=True)
print(resp)
For the deep-search scenario:
- Inference Framework: miroflow-framework!
- Switch tokenizer configuration to tokenizer_config_search.json
- Tools Configuration:
| Server | Description | Tools Provided |
|---|---|---|
| tool-python | Execution environment and file management (E2B sandbox) | create_sandbox, run_command, run_python_code, upload_file_from_local_to_sandbox, download_file_from_sandbox_to_local, download_file_from_internet_to_sandbox |
| search_and_scrape_webpage | Google search via Serper API | google_search |
| jina_scrape_llm_summary | Web scraping with LLM-based information extraction with Jina | scrape_and_extract_info |
- Summary model: Qwen3-14B-thinking
- Temperature: 1.0
- Note, access to HuggingFace has been explicitly disabled in these tools.
Limitations
While we place great emphasis on the safety of the model during the training process, striving to ensure that its outputs align with ethical and legal requirements, it may not completely avoid generating unexpected outputs due to the model's size and probabilistic nature. These outputs may include harmful content such as bias or discrimination. Please don't propagate such content. We do not assume any responsibility for the consequences resulting from the dissemination of inappropriate information.
Citation
If you find our model useful or want to use it in your projects, please cite as follows:
@misc{yang2026nanbeige413bsmallgeneralmodel,
title={Nanbeige4.1-3B: A Small General Model that Reasons, Aligns, and Acts},
author={Chen Yang and Guangyue Peng and Jiaying Zhu and Ran Le and Ruixiang Feng and Tao Zhang and Xiyun Xu and Yang Song and Yiming Jia and Yuntao Wen and Yunzhi Xu and Zekai Wang and Zhenwei An and Zhicong Sun and Zongchao Chen},
year={2026},
eprint={2602.13367},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2602.13367},
}
Contact
If you have any questions, please raise an issue or contact us at nanbeige@kanzhun.com.
- Downloads last month
- 154
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit