Instructions to use Tdamre/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 Tdamre/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 Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Tdamre/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 Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Tdamre/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 Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Tdamre/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 Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Tdamre/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 "Tdamre/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": "Tdamre/Nanbeige4.2-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M
- Ollama
How to use Tdamre/Nanbeige4.2-3B-GGUF with Ollama:
ollama run hf.co/Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M
- Unsloth Studio
How to use Tdamre/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 Tdamre/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 Tdamre/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 Tdamre/Nanbeige4.2-3B-GGUF to start chatting
- Pi
How to use Tdamre/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 Tdamre/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": "Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Tdamre/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 Tdamre/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 Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Tdamre/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 Tdamre/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 "Tdamre/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 Tdamre/Nanbeige4.2-3B-GGUF with Docker Model Runner:
docker model run hf.co/Tdamre/Nanbeige4.2-3B-GGUF:Q4_K_M
- Lemonade
How to use Tdamre/Nanbeige4.2-3B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Tdamre/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
Unofficial GGUF conversions of
Nanbeige/Nanbeige4.2-3B,
pinned to source revision
451ed48c3273ecef7ea8faaa43c31ce529763bb1.
Nanbeige4.2-3B is not an ordinary Llama stack. It reuses 22 physical decoder
layers for two loops, applies the shared final RMSNorm at the loop boundary,
and needs 44 logical KV-cache slots. These files therefore use the custom GGUF
architecture name nanbeige and require the included llama.cpp patch.
Files
| File | Size | SHA-256 |
|---|---|---|
Nanbeige4.2-3B-Q4_K_M.gguf |
2,574,807,840 bytes | 99c7bfb88907f7eee0a04c4314f1c46bca391819478d8cb90b3e164f09576489 |
Nanbeige4.2-3B-Q8_0.gguf |
4,434,787,104 bytes | 32b60cd0fb3da4d8a3c01d0ca7d0461818c29c81ffb42f8fc71a94141bd803c6 |
llama.cpp-nanbeige.patch |
10,137 bytes | 1177badb8f8f6228052d2f67a9eabe81f2ce69f3ea0b92cf7b1ea2352204284a |
The source checkpoint contains 4,169,800,704 physical parameters. The Q4_K_M file is about 4.93 bits per weight; Q8_0 is about 8.51 bits per weight.
Runtime
Apply the patch to the exact tested llama.cpp revision:
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
git checkout cf512566dc89d7a2bdefd43f6d4b85a1c18e93a7
git apply /path/to/llama.cpp-nanbeige.patch
cmake -B build
cmake --build build --config Release
Then run either quant:
./build/bin/llama-cli \
-m Nanbeige4.2-3B-Q4_K_M.gguf \
-c 4096 -n 256 \
-p "Hello"
Stock llama.cpp builds that do not include Nanbeige support will reject the
nanbeige architecture. The patch adds conversion metadata, tensor loading,
loop-boundary normalization, and 44-layer cache handling; it does not replace
model weights.
Validation
Built and tested on Windows with llama.cpp
cf512566dc89d7a2bdefd43f6d4b85a1c18e93a7 and an AMD Ryzen 9 7950X3D.
- Both files loaded as architecture
nanbeige, block count 44, loop count 2. - Q4_K_M: prompt benchmark 92.77 tok/s; generation benchmark 15.67 tok/s.
- Q8_0: prompt benchmark 53.95 tok/s; generation benchmark 9.37 tok/s.
- Deterministic eight-token generation completed for both files.
- Interactive Q8_0 sample measured 68.6 tok/s prompt and 10.2 tok/s generation.
These are CPU smoke/throughput tests, not quality benchmarks. The original model advertises a 262,144-token context, but local validation used a short 512-token context.
License
The base model is Apache-2.0 licensed. Review the upstream model card for its full terms and intended-use information.
- Downloads last month
- 818
4-bit
8-bit