Instructions to use zenlm/zen6-nano-2b 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 zenlm/zen6-nano-2b 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 zenlm/zen6-nano-2b:Q2_0 # Run inference directly in the terminal: llama cli -hf zenlm/zen6-nano-2b:Q2_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf zenlm/zen6-nano-2b:Q2_0 # Run inference directly in the terminal: llama cli -hf zenlm/zen6-nano-2b:Q2_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf zenlm/zen6-nano-2b:Q2_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf zenlm/zen6-nano-2b:Q2_0
Use Docker
docker model run hf.co/zenlm/zen6-nano-2b:Q2_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use zenlm/zen6-nano-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zenlm/zen6-nano-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zenlm/zen6-nano-2b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/zenlm/zen6-nano-2b:Q2_0
- Ollama
How to use zenlm/zen6-nano-2b with Ollama:
ollama run hf.co/zenlm/zen6-nano-2b:Q2_0
- Unsloth Desktop
- Pi
How to use zenlm/zen6-nano-2b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zenlm/zen6-nano-2b:Q2_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "zenlm/zen6-nano-2b:Q2_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use zenlm/zen6-nano-2b with Docker Model Runner:
docker model run hf.co/zenlm/zen6-nano-2b:Q2_0
- Lemonade
How to use zenlm/zen6-nano-2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull zenlm/zen6-nano-2b:Q2_0
Run and chat with the model
lemonade run user.zen6-nano-2b-Q2_0
List all available models
lemonade list
- Hermes Agent
How to use zenlm/zen6-nano-2b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zenlm/zen6-nano-2b:Q2_0
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 zenlm/zen6-nano-2b:Q2_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use zenlm/zen6-nano-2b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zenlm/zen6-nano-2b:Q2_0
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 "zenlm/zen6-nano-2b:Q2_0" \ --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"
Zen 6 Nano (2B) (zenlm/zen6-nano-2b)
Zen 6 Nano (2B) is an open-weight Apache-2.0 1.58-bit ternary multimodal & agentic language model (2B ternary tier) developed by Hanzo AI and Zen LM in collaboration with Zoo Labs Foundation.
Post-trained directly in the Sylvester-Walsh-Hadamard ternary weight space via Straight-Through Estimator (STE) Quantization-Aware Training (QAT) with Hybrid Muon + AdamW, zen6-nano combines:
- Authentic Weight-Space Identity: Native
zen6-nanoprovenance with zero system-prompt wrapper overhead, while strictly respecting custom developer personas (e.g., Godot game NPCs, JSON extractors). - Agentic Tool Calling & Hanzo MCP: Multi-step
<tool_call>execution,<tool_response>synthesis, error recovery, and calibrated tool abstention acrossfs,exec,code,git,test,hanzo, and game-engine director tools. - Runtimes:
PQ2_0/PTQ1_0/Q2_0run today on the PrismML llama.cpp fork (branchprism: CUDA, Metal, CPU);Q2_0also runs on upstream llama.cpp b11556+. MLX 2-bit packs run withmlx-lmon Apple Silicon. Nativehanzo-engineternary kernels (CUDA / ROCm / Metal / SIMD CPU) are in progress. - Zero-Token-Burn Cloud CI/CD: Load
zen6-nano-2b-PTQ1_0.gguf(~429 MB) on CPU runners for end-to-end LLM and tool-calling integration tests with no API keys or per-token cost.
Weight Artifacts
| File | Format | Description |
|---|---|---|
zen6-nano-2b-PQ2_0.gguf |
PQ2_0 | Fast GPU/CPU ternary pack |
zen6-nano-2b-PTQ1_0.gguf |
PTQ1_0 | Smallest dense-trit pack (CPU / CI) |
zen6-nano-2b-Q2_0.gguf |
Q2_0 | Upstream llama.cpp compatible |
zen6-nano-2b-mmproj-Q8_0.gguf |
Q8_0 | Vision projector |
zen6-nano-2b-mmproj-BF16.gguf |
BF16 | Vision projector (reference) |
Quickstart โ Local Stack & Game Backend (hanzo up)
# Pull & serve zenlm/zen6-nano-2b locally on http://127.0.0.1:36900/v1
hanzo pull zenlm/zen6-nano-2b
hanzo engine serve zenlm/zen6-nano-2b
# Or bring up the full local Hanzo stack + open-weight AI
hanzo up
OpenAI-Compatible /v1/chat/completions + MCP Tools
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:36900/v1", api_key="hanzo-local")
resp = client.chat.completions.create(
model="zen6-nano",
messages=[{"role": "user", "content": "Check Cargo.toml and run the workspace unit tests."}],
tools=[{
"type": "function",
"function": {
"name": "fs",
"description": "Read or list workspace files",
"parameters": {
"type": "object",
"properties": {"action": {"type": "string"}, "path": {"type": "string"}},
"required": ["action", "path"],
},
},
}],
)
print(resp.choices[0].message)
Zero-Token-Burn GitHub Actions CPU CI
- name: Serve open-weight Zen 6 Nano on CPU
run: |
hf download hanzoai/zen6-nano zen6-nano-2b-PTQ1_0.gguf --local-dir ./models
llama-server -m ./models/zen6-nano-2b-PTQ1_0.gguf -ngl 0 --port 36900 --alias zen6-nano &
Architecture & Hadamard Ternary Specification
- Hybrid Backbone: Interleaved Gated-DeltaNet (GDN) linear-attention blocks (3x) and Grouped-Query Full Attention blocks (1x) with SwiGLU MLPs and multimodal vision projector (
mmproj). - Hadamard Outlier Rotation: Linear weights and token embeddings are stored in an orthonormal block Sylvester-Walsh-Hadamard basis ($H_B[r,c] = (-1)^{\text{popcount}(r & c)}/\sqrt{B}$ with explicit per-channel $\pm 1$ sign vectors embedded in GGUF KV metadata
prism.hadamard.*), eliminating activation outliers so group-128 ternary{-d, 0, +d}weights retain full dense precision. - Production Formats:
PQ2_0(GGML type142, 34 B / 128 weights = 2.125 bpw): Fastest SIMD / CUDAdp4a/ ROCm / Metal execution (zen6-nano-9b-PQ2_0.gguf).PTQ1_0(GGML type143, 28 B / 128 weights = 1.750 bpw): Smallest disk & RAM footprint (5trits/byte base-3 packing).Q2_0(GGML type42, 18 B / 64 weights = 2.250 bpw): Group-64 compatibility band.
License & Attribution
Released under the Apache License 2.0 (LICENSE). Preserves full upstream attribution to Qwen (Alibaba Cloud), Bonsai-2 (Prism ML, Inc.), and DFlash / ProCreations (NOTICE).
- Downloads last month
- 191