Image-Text-to-Text
GGUF
English
Chinese
zen6
zen6-flash
ternary
1.58-bit
bonsai
dflash2
speculative-decoding
metal
apple-silicon
llama-cpp
conversational
Instructions to use zenlm/zen6-flash 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-flash 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-flash:Q8_0 # Run inference directly in the terminal: llama cli -hf zenlm/zen6-flash:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf zenlm/zen6-flash:Q8_0 # Run inference directly in the terminal: llama cli -hf zenlm/zen6-flash:Q8_0
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 zenlm/zen6-flash:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf zenlm/zen6-flash:Q8_0
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 zenlm/zen6-flash:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf zenlm/zen6-flash:Q8_0
Use Docker
docker model run hf.co/zenlm/zen6-flash:Q8_0
- LM Studio
- Jan
- vLLM
How to use zenlm/zen6-flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zenlm/zen6-flash" # 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-flash", "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-flash:Q8_0
- Ollama
How to use zenlm/zen6-flash with Ollama:
ollama run hf.co/zenlm/zen6-flash:Q8_0
- Unsloth Desktop
- Pi
How to use zenlm/zen6-flash 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-flash:Q8_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-flash:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use zenlm/zen6-flash with Docker Model Runner:
docker model run hf.co/zenlm/zen6-flash:Q8_0
- Lemonade
How to use zenlm/zen6-flash with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull zenlm/zen6-flash:Q8_0
Run and chat with the model
lemonade run user.zen6-flash-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use zenlm/zen6-flash 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-flash:Q8_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-flash:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use zenlm/zen6-flash 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-flash:Q8_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-flash:Q8_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"
Zen6 Flash: 27B Ultra-Compact Ternary VLM
1.72 Bits/Weight Ternary Transformer | 98.2% FP16 Intelligence | Vision Projector | DFlash 2 Speculative Drafter
Architectural Highlights
Zen6 Flash is the ultra-efficient multimodal member of the Zen6 family, powered by Ternary Bonsai 2 27B:
- True 1.72 Bits/Weight Ternary Weights: End-to-end ternary representation across embeddings, linear attention projections, self-attention projections, MLP projections, and the LM head. No high-precision escape hatches behind a low-bit label.
- Extreme Memory Efficiency:
- PQ2_0 Packing: 7.21 GB (stores each trit in a 2-bit slot, consumed directly by GPU/Metal kernels without expansion to FP16).
- PTQ1_0 Packing: 5.95 GB (dense bit-packed representation).
- ~9.3x smaller than standard FP16 weights (~54 GB), fitting easily within unified memory on Apple Silicon M4/M5 Max laptops, edge devices, and single GPUs.
- Multimodal Vision Tower:
Ternary-Bonsai-2-27B-mmproj-Q8_0.gguf(629 MB) providing native high-resolution image and document understanding.
- Speculative Acceleration via DFlash 2:
- Bundles the verified Bonsai 2 27B DFlash 2 drafter (
Bonsai-2-27B-DFlash2-Q8_0.gguf, 2.05 GB). - Delivers 170.04 decode tokens/sec with 54.2% draft acceptance.
- Bundles the verified Bonsai 2 27B DFlash 2 drafter (
- Context Capacity: 262,144 tokens native context window maintained efficiently by ~75% linear attention.
Benchmark Accuracy & Intelligence Retention
Zen6 Flash breaks the conventional sub-4-bit degradation barrier, retaining 98.2% of full FP16 intelligence:
| Benchmark Suite | FP16 Baseline | Conventional IQ2_XXS | Zen6 Flash (PQ2_0) | Retention vs FP16 |
|---|---|---|---|---|
| Average Across 14 Reasoning Tests | 86.33 | 72.59 | 84.78 | 98.2% |
| Mathematical Reasoning (MathVision / GSM8K) | 97.10 | 79.40 | 96.57 | 99.5% |
| Code Generation (HumanEval / LiveCode) | 90.20 | 74.80 | 89.42 | 99.1% |
| Agentic Tool Calling & Schema Adherence | 76.80 | 58.10 | 74.92 | 97.6% |
| Model Footprint | ~54.0 GB | 8.8 GB | 7.21 GB | 86.6% smaller |
Model Artifacts in this Repository
| File Name | Size | Format / Description |
|---|---|---|
Ternary-Bonsai-2-27B-PQ2_0.gguf |
7.21 GB | Primary ternary 2-bit slot model weights |
Ternary-Bonsai-2-27B-PTQ1_0.gguf |
5.95 GB | Densely packed 1.75-bit model weights |
Ternary-Bonsai-2-27B-mmproj-Q8_0.gguf |
629 MB | Quantized vision multimodal projector |
Ternary-Bonsai-2-27B-mmproj-BF16.gguf |
1.2 GB | Full precision vision multimodal projector |
Bonsai-2-27B-DFlash2-Q8_0.gguf |
2.05 GB | DFlash 2 speculative block-diffusion drafter |
SHA256SUMS |
66 KB | Checksum verification file |
Hardware Benchmarks
1. Apple Silicon M4 / M5 Max (Metal)
- Decode Speed (Standalone): 47.2 tok/s
- Decode Speed (with DFlash 2): 92.4 tok/s
- Memory Footprint: 7.84 GB VRAM (including vision projector & 32k KV cache)
2. NVIDIA Blackwell DGX Spark (CUDA 13.3)
- Decode Speed (with DFlash 2): 170.04 tok/s
- Draft Acceptance Rate: 54.20%
- Context Allocation: 32,768 tokens across 4 parallel slots in under 12 GB total VRAM.
Serving Instructions
Option A: Llama.cpp with Multimodal & DFlash 2 Speculative Decoding
llama-server \
-m Ternary-Bonsai-2-27B-PQ2_0.gguf \
--mmproj Ternary-Bonsai-2-27B-mmproj-Q8_0.gguf \
--draft-model Bonsai-2-27B-DFlash2-Q8_0.gguf \
--draft-max 3 \
-c 32768 \
--port 8080
Option B: Apple Silicon Metal Native
llama-cli \
-m Ternary-Bonsai-2-27B-PQ2_0.gguf \
--mmproj Ternary-Bonsai-2-27B-mmproj-Q8_0.gguf \
-p "<image>\nDescribe the system architecture shown in this diagram in detail."
Citation
@article{zenlm2026zen6flash,
title={Zen6 Flash: Sub-2-Bit Ternary Vision-Language Model with Block-Diffusion Speculative Decoding},
author={Hanzo AI and Zen LM Team},
year={2026},
publisher={Zen LM / Hanzo AI}
}
- Downloads last month
- 29
Hardware compatibility
Log In to add your hardware
1-bit
2-bit
8-bit
Model tree for zenlm/zen6-flash
Base model
Qwen/Qwen3.8-27B Quantized
prism-ml/Ternary-Bonsai-2-27B-gguf