Instructions to use penkia/TernaryQuench-Qwen3.8-27B-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 penkia/TernaryQuench-Qwen3.8-27B-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 penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0 # Run inference directly in the terminal: llama cli -hf penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0 # Run inference directly in the terminal: llama cli -hf penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_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 penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0 # Run inference directly in the terminal: ./llama-cli -hf penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_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 penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0
Use Docker
docker model run hf.co/penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0
- LM Studio
- Jan
- vLLM
How to use penkia/TernaryQuench-Qwen3.8-27B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "penkia/TernaryQuench-Qwen3.8-27B-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": "penkia/TernaryQuench-Qwen3.8-27B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0
- Ollama
How to use penkia/TernaryQuench-Qwen3.8-27B-GGUF with Ollama:
ollama run hf.co/penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0
- Unsloth Desktop
- Pi
How to use penkia/TernaryQuench-Qwen3.8-27B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf penkia/TernaryQuench-Qwen3.8-27B-GGUF: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": "penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use penkia/TernaryQuench-Qwen3.8-27B-GGUF with Docker Model Runner:
docker model run hf.co/penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0
- Lemonade
How to use penkia/TernaryQuench-Qwen3.8-27B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0
Run and chat with the model
lemonade run user.TernaryQuench-Qwen3.8-27B-GGUF-Q2_0
List all available models
lemonade list
- Hermes Agent
How to use penkia/TernaryQuench-Qwen3.8-27B-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 penkia/TernaryQuench-Qwen3.8-27B-GGUF: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 penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use penkia/TernaryQuench-Qwen3.8-27B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf penkia/TernaryQuench-Qwen3.8-27B-GGUF: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 "penkia/TernaryQuench-Qwen3.8-27B-GGUF: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"
TernaryQuench Qwen3.8-27B — GGUF
TernaryQuench gives you the complete recipe for building your own ternary language models, from generating calibration data to exporting the file you run.
This release compresses Qwen3.8-27B for local inference. The calibration tools, resumable trainer, exporters, and evaluation code are open source, so you can inspect the model's recipe and build your own.
Get started
With Ollama:
ollama run hf.co/penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_K
Or with llama.cpp:
llama-cli -hf penkia/TernaryQuench-Qwen3.8-27B-GGUF:Q2_K -cnv -c 32768
The download is 10.86 GB. Allow additional memory for the context cache and runtime. Tested with Ollama 0.33.3.
For native MLX inference on Apple silicon, see the MLX release.
Evaluation
Language-model quality
WikiText-2 test-sample results:
| Model | Perplexity ↓ | Second-half perplexity ↓ |
|---|---|---|
| Qwen3.8-27B 4-bit | 7.7471 | 6.2370 |
| TernaryQuench 27B | 12.8569 | 10.0972 |
| Ternary-Bonsai-27B | 13.2475 | 10.1704 |
Protocol: the first 20,480 tokens of WikiText-2 test, split into 40 independent 512-token chunks. “Second half” scores the last 256 tokens of each chunk. TernaryQuench was measured directly from the Q2_K release file in llama.cpp; the reference rows used MLX. Raw Q2_K results include the file hash and per-chunk scores. Bonsai uses Qwen3.6 as its base.
Five-task zero-shot evaluation
Results measured directly from this Q2_K release file with the LM Evaluation Harness on the full task sets.
| Model | Mean accuracy ↑ | PIQA | ARC-Easy | ARC-Challenge | HellaSwag | WinoGrande |
|---|---|---|---|---|---|---|
| Qwen3.8-27B BF16 | 74.35 | 81.61 | 72.98 | 58.87 | 82.93 | 75.37 |
| TernaryQuench 27B | 72.28 | 78.78 | 78.96 | 55.29 | 73.96 | 74.43 |
| Ternary-Bonsai-27B | 71.91 | 79.27 | 76.22 | 55.63 | 75.98 | 72.45 |
Scores are percentages. The mean weights the five tasks equally, using length-normalized accuracy where available and standard accuracy for WinoGrande. Protocol: lm-eval 0.4.7, zero-shot, no chat template, full task sets. TernaryQuench uses llama.cpp CUDA with FP32 accumulation; reference rows use native PyTorch. Q2_K results and runtime provenance · Reference scores.
Runtime checks
The Q2_K file passed direct generation, JSON output without a grammar, and a complete tool-call round trip in Ollama 0.33.3 and llama.cpp. Its answers matched the original Q2_0 export on those short tests.
These checks verify installation and basic tool use. They do not establish reliability on complex, multi-turn agentic work.
Model
Ternary weights use three values per group: −scale, 0, +scale. This release retains higher precision in the final two decoder layers, embeddings, and output head:
| Component | Storage |
|---|---|
| Decoder layers 0–61 | 481 trained ternary matrices, packed as Q2_K |
| Decoder layers 62–63 | 15 BF16 matrices |
| Embeddings and output head | Q4_1 |
| Input | Text |
Q2_K stores the ternary weights in a format supported by standard Ollama and llama.cpp. Packing preserves every sign and zero but rounds group scales, introducing 1.55% relative RMS weight error across the converted matrices. All other tensors are unchanged. The conversion manifest records the error, tensor layout, file size, and SHA-256.
How it was trained
Starting from Qwen3.8-27B, we trained ternary weights with CAT-Q-style reconstruction and an AYOT-inspired calibration set: 512 sequences of 2,048 tokens, with 10% of rows drawn from agentic traces. The run took 55 hours 38 minutes on 1× NVIDIA H200 (141 GB).
The TernaryQuench build guide contains the recipe and commands for generating calibration traces, training, resuming a run, and exporting your own models.
License
Apache-2.0. This model is derived from Qwen3.8-27B, developed by Alibaba's Qwen team, under its Apache-2.0 license.
- Downloads last month
- 1,180
2-bit
Model tree for penkia/TernaryQuench-Qwen3.8-27B-GGUF
Base model
Qwen/Qwen3.8-27B