Instructions to use gkraker04/Nanbeige4.2-3B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use gkraker04/Nanbeige4.2-3B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf gkraker04/Nanbeige4.2-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 gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf gkraker04/Nanbeige4.2-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 gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use gkraker04/Nanbeige4.2-3B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gkraker04/Nanbeige4.2-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": "gkraker04/Nanbeige4.2-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
- Ollama
How to use gkraker04/Nanbeige4.2-3B-GGUF with Ollama:
ollama run hf.co/gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
- Unsloth Studio
How to use gkraker04/Nanbeige4.2-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 gkraker04/Nanbeige4.2-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 gkraker04/Nanbeige4.2-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 gkraker04/Nanbeige4.2-3B-GGUF to start chatting
- Pi
How to use gkraker04/Nanbeige4.2-3B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gkraker04/Nanbeige4.2-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": "gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use gkraker04/Nanbeige4.2-3B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gkraker04/Nanbeige4.2-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 gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use gkraker04/Nanbeige4.2-3B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use gkraker04/Nanbeige4.2-3B-GGUF with Docker Model Runner:
docker model run hf.co/gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
- Lemonade
How to use gkraker04/Nanbeige4.2-3B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull gkraker04/Nanbeige4.2-3B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Nanbeige4.2-3B-GGUF-Q4_K_M
List all available models
lemonade list
Nanbeige4.2-3B GGUF
GGUF quantizations of Nanbeige4.2-3B, a compact 3B agentic model built on a Looped Transformer architecture.
These quants are built for buun-llama-cpp, the fork that added Nanbeige architecture support. They'll work with any GGUF-compatible runtime that supports Nanbeige models.
Produced with importance-matrix-guided quantization (llama-quantize --imatrix) from the bf16 source, ordered highest to lowest bits-per-weight.
Which Quant Should I Use?
| Use Case | Recommended Quant | Size | Why |
|---|---|---|---|
| Maximum quality | Q8_0 or Q6_K | 3.2–4.1 GB | Virtually lossless |
| Best tradeoff | Q4_K_M | 2.4 GB | Sweet spot: near-lossless quality, tiny footprint |
| Memory constrained | Q3_K_M or IQ3_M | 1.9–2.0 GB | Still very capable |
| Edge/mobile | IQ2_M or Q2_K | 1.5–1.6 GB | Noticeable but functional |
| Maximum compression | Q1_0 | 0.87 GB | Fits anywhere, quality degrades significantly |
Quantization Ladder
| Quant | Size | bpw |
|---|---|---|
| bf16 | 7.77 GB | 16.00 |
| Q8_0 | 4.13 GB | 8.00 |
| Q6_K | 3.19 GB | 6.00 |
| Q5_1 | 2.95 GB | 5.65 |
| Q5_K_M | 2.78 GB | 5.50 |
| Q5_K_S | 2.74 GB | 5.21 |
| Q5_0 | 2.75 GB | 5.21 |
| Q4_1 | 2.52 GB | 4.78 |
| Q4_K_M | 2.40 GB | 4.58 |
| Q4_K_S | 2.33 GB | 4.37 |
| IQ4_NL | 2.32 GB | 4.50 |
| Q4_0 | 2.32 GB | 4.34 |
| IQ4_XS | 2.21 GB | 4.25 |
| Q3_K_L | 2.15 GB | 4.03 |
| Q3_K_M | 2.02 GB | 3.74 |
| IQ3_M | 1.94 GB | 3.66 |
| Q3_K_S | 1.86 GB | 3.41 |
| IQ3_S | 1.87 GB | 3.44 |
| IQ3_XS | 1.80 GB | 3.30 |
| IQ3_XXS | 1.66 GB | 3.06 |
| Q2_K | 1.64 GB | 2.96 |
| Q2_K_S | 1.56 GB | 2.96 |
| IQ2_M | 1.55 GB | 2.70 |
| IQ2_S | 1.48 GB | 2.50 |
| TQ2_0 | 1.42 GB | 2.06 |
| IQ2_XS | 1.36 GB | 2.31 |
| IQ2_XXS | 1.27 GB | 2.06 |
| TQ1_0 | 1.28 GB | 1.69 |
| IQ1_M | 1.18 GB | 1.75 |
| IQ1_S | 1.13 GB | 1.56 |
| Q1_0 | 0.87 GB | 1.125 |
Quality Benchmarks
Quality measured with MMLU-Pro (128 random questions across 14 categories, 5-shot CoT) and MuSR (128 multi-step reasoning questions). CoT reasoning enabled server-side via --reasoning on. Recovery = accuracy relative to bf16 baseline.
Results filling in as evaluation progresses.
| Quant | Size | MMLU-Pro | MuSR |
|---|---|---|---|
| bf16 | 7.77 GB | 81.2% | pending |
| Q8_0 | 4.13 GB | 81.2% | 40.6% |
| Q6_K | 3.19 GB | pending | pending |
| Q5_1 | 2.95 GB | pending | pending |
| Q5_K_M | 2.78 GB | pending | pending |
| Q5_K_S | 2.74 GB | pending | pending |
| Q5_0 | 2.75 GB | pending | pending |
| Q4_1 | 2.52 GB | pending | pending |
| Q4_K_M | 2.40 GB | pending | pending |
| Q4_K_S | 2.33 GB | pending | pending |
| IQ4_NL | 2.32 GB | pending | pending |
| Q4_0 | 2.32 GB | pending | pending |
| IQ4_XS | 2.21 GB | pending | pending |
| Q3_K_L | 2.15 GB | pending | pending |
| Q3_K_M | 2.02 GB | pending | pending |
| IQ3_M | 1.94 GB | pending | pending |
| Q3_K_S | 1.86 GB | pending | pending |
| IQ3_S | 1.87 GB | pending | pending |
| IQ3_XS | 1.80 GB | pending | pending |
| IQ3_XXS | 1.66 GB | pending | pending |
| Q2_K | 1.64 GB | pending | pending |
| Q2_K_S | 1.56 GB | pending | pending |
| IQ2_M | 1.55 GB | pending | pending |
| IQ2_S | 1.48 GB | pending | pending |
| TQ2_0 | 1.42 GB | pending | pending |
| IQ2_XS | 1.36 GB | pending | pending |
| IQ2_XXS | 1.27 GB | pending | pending |
| TQ1_0 | 1.28 GB | pending | pending |
| IQ1_M | 1.18 GB | pending | pending |
| IQ1_S | 1.13 GB | pending | pending |
| Q1_0 | 0.87 GB | pending | 40.6% |
| Q2_0 | 1.60 GB | pending | pending |
Perplexity Reference
On the calibration set (107 chunks, 4K context):
| Quant | PPL | Δ vs bf16 |
|---|---|---|
| bf16 | 11.64 | — |
| Q8_0 | 11.71 | +0.07 |
| Q4_K_M | 11.68 | +0.04 |
| Q3_K_M | 12.57 | +0.93 |
| Q2_K | 13.89 | +2.24 |
| IQ1_S | 44.83 | +33.19 |
Note: perplexity measures next-token prediction loss, not task accuracy. Q4_K_M is functionally near-lossless for this model.
Usage
llama.cpp Server
llama-server -m Nanbeige4.2-3B-Q4_K_M.gguf \
--flash-attn on \
--cache-type-k vbr \
--batch-size 64 --ubatch-size 64 \
--parallel 1 --port 8081
CLI
llama-cli -m Nanbeige4.2-3B-Q4_K_M.gguf \
-p "Write a Python function that..." -n 512
Recommended Settings
| Parameter | Value | Reason |
|---|---|---|
--flash-attn |
on |
Force flash attention on for GPU memory efficiency (default: auto-detect) |
--cache-type-k |
vbr |
Variable bit-rate KV cache — maps physical GPU pages on demand, enabling long context in limited VRAM |
--batch-size |
64 |
Lower batch size reduces peak VRAM with minimal throughput impact at this model scale (default: 2048) |
--parallel |
1 |
Single slot avoids cross-slot overhead at 3B scale (parallel >1 is exponentially slower) |
--reasoning |
on |
Enable reasoning/thinking mode for multi-step reasoning |
Hardware Requirements
| Quant | Min RAM | Min VRAM (24K ctx) |
|---|---|---|
| Q6_K | 5 GB | 3.2 GB |
| Q4_K_M | 4 GB | 2.4 GB |
| Q3_K_M | 4 GB | 2.0 GB |
| Q2_K | 3 GB | 1.6 GB |
| Q1_0 | 2 GB | 0.87 GB |
References
License
Apache 2.0
- Downloads last month
- 3,277
