Text Generation
GGUF
llama.cpp
qwen35
ternary
tq2_0
mtp
nextn
speculative-decoding
local-llm
self-contained
q2_k
imatrix
conversational
Instructions to use vinpix/Ternary-Bonsai-27B-Stock-MTP-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 vinpix/Ternary-Bonsai-27B-Stock-MTP-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 vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
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 vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
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 vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
Use Docker
docker model run hf.co/vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vinpix/Ternary-Bonsai-27B-Stock-MTP-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": "vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
- Ollama
How to use vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF with Ollama:
ollama run hf.co/vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
- Unsloth Desktop
- Pi
How to use vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
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": "vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF with Docker Model Runner:
docker model run hf.co/vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
- Lemonade
How to use vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
Run and chat with the model
lemonade run user.Ternary-Bonsai-27B-Stock-MTP-GGUF-Q2_K
List all available models
lemonade list
- Hermes Agent
How to use vinpix/Ternary-Bonsai-27B-Stock-MTP-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 vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
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 vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K
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 "vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF:Q2_K" \ --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"
Publish expert model card and update SHA256SUMS
Browse files- README.md +343 -120
- SHA256SUMS +1 -0
README.md
CHANGED
|
@@ -17,226 +17,449 @@ tags:
|
|
| 17 |
- local-llm
|
| 18 |
- self-contained
|
| 19 |
---
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
|
|
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
```text
|
| 41 |
-
|
| 42 |
│
|
| 43 |
├── qwen35 target
|
| 44 |
-
│
|
|
|
|
|
|
|
|
|
|
| 45 |
│
|
| 46 |
-
└── embedded
|
| 47 |
├── dedicated MTP token embedding
|
| 48 |
├── 1 Qwen-style NextN predictor block
|
|
|
|
| 49 |
└── MTP output path
|
| 50 |
```
|
| 51 |
|
| 52 |
-
The ordinary and speculative
|
|
|
|
| 53 |
|
| 54 |
-
| Deployment property | External
|
| 55 |
|---|---:|---:|
|
| 56 |
-
| Target
|
| 57 |
-
|
|
| 58 |
| Runtime model identities | 2 | 1 |
|
| 59 |
-
|
|
| 60 |
-
|
|
| 61 |
-
|
|
|
|
|
| 62 |
|
| 63 |
-
|
| 64 |
|
| 65 |
-
|
|
|
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|---|---|
|
| 69 |
-
| File | `Ternary-Bonsai-27B-MTP-TQ2_0.gguf` |
|
| 70 |
-
| Size | 8,785,215,776 bytes / 8.18 GiB |
|
| 71 |
-
| SHA-256 | `480c695b0de5b78b720d7f500eb3e1650359d0ac8e18c29b231a14b2d9c9bf20` |
|
| 72 |
-
| GGUF | V3 |
|
| 73 |
-
| Architecture | `qwen35` |
|
| 74 |
-
| Tensor count | 866 |
|
| 75 |
-
| Target depth | 64 blocks |
|
| 76 |
-
| Embedded NextN depth | 1 block |
|
| 77 |
-
| Dominant weight type | `TQ2_0` |
|
| 78 |
-
| Runtime contract | stock `llama.cpp` with `qwen35` and `draft-mtp` support |
|
| 79 |
-
| License | Apache-2.0 |
|
| 80 |
|
| 81 |
```text
|
| 82 |
TQ2_0 480
|
| 83 |
-
F32 359
|
| 84 |
Q2_K 17
|
|
|
|
|
|
|
| 85 |
Q5_K 6
|
| 86 |
Q6_K 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
Q4_K 1
|
|
|
|
|
|
|
| 88 |
-------------
|
| 89 |
total 866
|
| 90 |
```
|
| 91 |
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
##
|
| 95 |
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
```bash
|
| 99 |
llama-cli \
|
| 100 |
-
-m
|
| 101 |
-
-p "Derive
|
| 102 |
-n 256
|
| 103 |
```
|
| 104 |
|
| 105 |
-
Embedded MTP
|
| 106 |
|
| 107 |
```bash
|
| 108 |
llama-cli \
|
| 109 |
-
-m
|
| 110 |
--spec-type draft-mtp \
|
| 111 |
--spec-draft-n-max 2 \
|
| 112 |
-
-p "Derive
|
| 113 |
-n 256
|
| 114 |
```
|
| 115 |
|
| 116 |
There is deliberately no `-md` / `--model-draft` argument.
|
| 117 |
|
| 118 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
-
MTP is
|
|
|
|
| 121 |
|
| 122 |
```text
|
| 123 |
-
(
|
| 124 |
```
|
| 125 |
|
| 126 |
-
Acceptance rate is an intermediate statistic, not the objective.
|
|
|
|
|
|
|
| 127 |
|
| 128 |
-
A
|
| 129 |
|
| 130 |
```text
|
| 131 |
-
|
| 132 |
-
draft-mtp
|
| 133 |
-
draft-mtp
|
| 134 |
```
|
| 135 |
|
| 136 |
-
|
| 137 |
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
-
|
| 141 |
|
| 142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
- a dedicated MTP embedding and output path;
|
| 147 |
-
- a stock-compatible `qwen35` GGUF layout;
|
| 148 |
-
- a mixed-precision tensor policy centered on `TQ2_0`;
|
| 149 |
-
- candidate selection gated by structural integrity, language-model quality and stock-runtime behavior.
|
| 150 |
|
| 151 |
-
|
| 152 |
|
| 153 |
-
##
|
| 154 |
|
| 155 |
-
The
|
|
|
|
| 156 |
|
| 157 |
-
| Check |
|
| 158 |
-
|---|---:|
|
| 159 |
-
| Exact
|
| 160 |
-
|
|
| 161 |
-
|
|
| 162 |
-
|
|
| 163 |
-
|
|
| 164 |
-
|
|
| 165 |
-
|
|
| 166 |
-
|
|
| 167 |
-
|
|
| 168 |
-
|
|
| 169 |
-
|
|
| 170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
|
| 172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
-
|
| 175 |
-
- `ae735b13148db250911ce9d07663d1b95474e7b0`
|
| 176 |
|
| 177 |
-
|
|
|
|
| 178 |
|
| 179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
|
| 181 |
| Role | Immutable source | Revision | Source SHA-256 |
|
| 182 |
|---|---|---|---|
|
| 183 |
-
| Ternary target trunk | [`prism-ml/Ternary-Bonsai-27B-gguf`](https://huggingface.co/prism-ml/Ternary-Bonsai-27B-gguf
|
| 184 |
-
| MTP donor package | [`lym00/Qwen3.6-27B-MTP-ONLY-GGUF`](https://huggingface.co/lym00/Qwen3.6-27B-MTP-ONLY-GGUF
|
| 185 |
-
|
| 186 |
-
The donor package identifies Qwen3.6-derived MTP material but does not pin a separate underlying Qwen source revision. This card does not invent one.
|
| 187 |
|
| 188 |
-
|
|
|
|
| 189 |
|
| 190 |
-
|
|
|
|
| 191 |
|
| 192 |
-
|
| 193 |
|
| 194 |
-
|
| 195 |
-
- `quantize.imatrix.dataset`
|
| 196 |
|
| 197 |
-
|
| 198 |
|
| 199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
|
| 201 |
-
|
| 202 |
|
| 203 |
-
-
|
| 204 |
-
-
|
| 205 |
-
-
|
| 206 |
-
-
|
| 207 |
-
|
| 208 |
-
-
|
|
|
|
|
|
|
|
|
|
| 209 |
|
| 210 |
-
##
|
| 211 |
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
|
| 218 |
-
|
| 219 |
-
```
|
| 220 |
|
| 221 |
-
|
|
|
|
| 222 |
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
```
|
| 226 |
|
| 227 |
## Citation
|
| 228 |
|
| 229 |
```bibtex
|
| 230 |
-
@misc{
|
| 231 |
-
title = {Ternary Bonsai 27B with Embedded MTP:
|
| 232 |
author = {vinpix},
|
| 233 |
year = {2026},
|
| 234 |
url = {https://huggingface.co/vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF}
|
| 235 |
}
|
| 236 |
```
|
| 237 |
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
**Ternary target · Embedded predictor · One artifact boundary**
|
| 241 |
|
| 242 |
-
|
|
|
|
|
|
|
|
|
| 17 |
- local-llm
|
| 18 |
- self-contained
|
| 19 |
---
|
| 20 |
+
- q2_k
|
| 21 |
|
| 22 |
+
# Ternary Bonsai 27B with Embedded MTP — GGUF
|
| 23 |
|
| 24 |
+
> **One target, one embedded NextN predictor, one deployment artifact per representation.**
|
| 25 |
|
| 26 |
+
`qwen35` · 64 target blocks · 1 embedded NextN block · 866 tensors · Apache-2.0
|
| 27 |
|
| 28 |
+
---
|
| 29 |
|
| 30 |
+
## Release summary
|
| 31 |
|
| 32 |
+
This repository publishes two self-contained GGUF representations of the same
|
| 33 |
+
logical model graph:
|
| 34 |
|
| 35 |
+
1. **`TQ2_0` — primary, native ternary representation**
|
| 36 |
+
2. **`Q2_K` — compatibility-oriented standard representation**
|
| 37 |
+
|
| 38 |
+
Each file contains both the 27B-class target and its embedded Qwen-style
|
| 39 |
+
NextN/MTP predictor. There is no sidecar drafter, no second model identity and
|
| 40 |
+
no `--model-draft` lifecycle.
|
| 41 |
+
|
| 42 |
+
The two files preserve the same logical tensor set, names, shapes and ordering.
|
| 43 |
+
They do **not** claim bit-identical dequantized values, logits or generated text:
|
| 44 |
+
the storage and dequantization contracts are different.
|
| 45 |
+
|
| 46 |
+
## Artifacts
|
| 47 |
+
|
| 48 |
+
| Priority | Representation | File | Exact size | SHA-256 |
|
| 49 |
+
|---:|---|---|---:|---|
|
| 50 |
+
| 1 | Native `TQ2_0` | `Ternary-Bonsai-27B-MTP-TQ2_0.gguf` | 8,785,215,776 bytes / 8.18 GiB | `480c695b0de5b78b720d7f500eb3e1650359d0ac8e18c29b231a14b2d9c9bf20` |
|
| 51 |
+
| 2 | Standard `Q2_K` | `Ternary-Bonsai-27B-MTP-Q2_K.gguf` | 10,491,466,016 bytes / 9.77 GiB | `850b4f4041c7d73e4442f23b1c70464f68fb76bf8717bc13ada1562680684410` |
|
| 52 |
+
|
| 53 |
+
### 1. Native `TQ2_0` — primary artifact
|
| 54 |
|
| 55 |
+
Choose this file when the target runtime supports the native `TQ2_0` tensor
|
| 56 |
+
type.
|
| 57 |
|
| 58 |
+
- smallest artifact in this repository;
|
| 59 |
+
- 480 tensors stored natively as `TQ2_0`;
|
| 60 |
+
- embedded target and MTP paths in one GGUF;
|
| 61 |
+
- preserves the native ternary storage contract;
|
| 62 |
+
- requires runtime support for `qwen35`, `draft-mtp` and `TQ2_0`.
|
| 63 |
+
|
| 64 |
+
### 2. Standard `Q2_K` — compatibility artifact
|
| 65 |
+
|
| 66 |
+
Choose this file when standard `Q2_K` tensor support is preferable to native
|
| 67 |
+
`TQ2_0` support.
|
| 68 |
+
|
| 69 |
+
- all 480 native ternary tensors are represented as ordinary `Q2_K`;
|
| 70 |
+
- the 17 tensors that were already `Q2_K` remain `Q2_K`;
|
| 71 |
+
- final inventory: 497 `Q2_K` tensors;
|
| 72 |
+
- no private GGUF tensor type and no custom tensor-type patch;
|
| 73 |
+
- larger than the native artifact because standard `Q2_K` carries its own
|
| 74 |
+
block metadata;
|
| 75 |
+
- still requires runtime support for the `qwen35` architecture and embedded
|
| 76 |
+
`draft-mtp` execution.
|
| 77 |
+
|
| 78 |
+
The `Q2_K` file is a deterministic representation transform, not a generic
|
| 79 |
+
calibration-based post-training quantization pass.
|
| 80 |
+
|
| 81 |
+
## Which file should I use?
|
| 82 |
+
|
| 83 |
+
| Requirement | Recommended file |
|
| 84 |
+
|---|---|
|
| 85 |
+
| Minimum repository artifact size | `Ternary-Bonsai-27B-MTP-TQ2_0.gguf` |
|
| 86 |
+
| Native ternary execution | `Ternary-Bonsai-27B-MTP-TQ2_0.gguf` |
|
| 87 |
+
| Runtime already supports `TQ2_0` | `Ternary-Bonsai-27B-MTP-TQ2_0.gguf` |
|
| 88 |
+
| Prefer standard `Q2_K` tensor storage | `Ternary-Bonsai-27B-MTP-Q2_K.gguf` |
|
| 89 |
+
| Runtime lacks `TQ2_0` but supports `Q2_K` | `Ternary-Bonsai-27B-MTP-Q2_K.gguf` |
|
| 90 |
+
| Need embedded MTP without a sidecar drafter | either file |
|
| 91 |
+
| Need architecture-independent output equivalence between representations | neither; no such claim is made |
|
| 92 |
+
|
| 93 |
+
## Model graph
|
| 94 |
|
| 95 |
```text
|
| 96 |
+
self-contained GGUF
|
| 97 |
│
|
| 98 |
├── qwen35 target
|
| 99 |
+
│ ├── target token embedding
|
| 100 |
+
│ ├── 64 transformer blocks
|
| 101 |
+
│ ├── final normalization
|
| 102 |
+
│ └── target output path
|
| 103 |
│
|
| 104 |
+
└── embedded MTP / NextN path
|
| 105 |
├── dedicated MTP token embedding
|
| 106 |
├── 1 Qwen-style NextN predictor block
|
| 107 |
+
├── MTP normalization
|
| 108 |
└── MTP output path
|
| 109 |
```
|
| 110 |
|
| 111 |
+
The ordinary target path and the speculative path resolve from the same file
|
| 112 |
+
and the same target identity.
|
| 113 |
|
| 114 |
+
| Deployment property | External drafter | This repository |
|
| 115 |
|---|---:|---:|
|
| 116 |
+
| Target files | 1 | 1 |
|
| 117 |
+
| Drafter files | 1 | 0 |
|
| 118 |
| Runtime model identities | 2 | 1 |
|
| 119 |
+
| Independent target/drafter version skew | possible | structurally removed |
|
| 120 |
+
| Separate drafter checksum | required | not applicable |
|
| 121 |
+
| `--model-draft` / `-md` | required | not used |
|
| 122 |
+
| Embedded `draft-mtp` path | not intrinsic | yes |
|
| 123 |
|
| 124 |
+
## Tensor inventories
|
| 125 |
|
| 126 |
+
The files contain the same 866 logical tensors. The difference is the storage
|
| 127 |
+
type of the 480 ternary tensors.
|
| 128 |
|
| 129 |
+
### Native `TQ2_0`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
```text
|
| 132 |
TQ2_0 480
|
|
|
|
| 133 |
Q2_K 17
|
| 134 |
+
F32 359
|
| 135 |
+
Q4_K 1
|
| 136 |
Q5_K 6
|
| 137 |
Q6_K 3
|
| 138 |
+
-------------
|
| 139 |
+
total 866
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
### Standard `Q2_K`
|
| 143 |
+
|
| 144 |
+
```text
|
| 145 |
+
Q2_K 497
|
| 146 |
+
F32 359
|
| 147 |
Q4_K 1
|
| 148 |
+
Q5_K 6
|
| 149 |
+
Q6_K 3
|
| 150 |
-------------
|
| 151 |
total 866
|
| 152 |
```
|
| 153 |
|
| 154 |
+
## Q2_K representation contract
|
| 155 |
+
|
| 156 |
+
The compatibility artifact converts each native ternary block into an ordinary
|
| 157 |
+
84-byte `Q2_K` block:
|
| 158 |
+
|
| 159 |
+
```text
|
| 160 |
+
16 bytes scale/min metadata
|
| 161 |
+
64 bytes packed 2-bit symbols
|
| 162 |
+
2 bytes fp16 d
|
| 163 |
+
2 bytes fp16 dmin
|
| 164 |
+
---------
|
| 165 |
+
84 bytes total
|
| 166 |
+
```
|
| 167 |
+
|
| 168 |
+
For the 480 converted tensors, the transform follows this contract:
|
| 169 |
+
|
| 170 |
+
```text
|
| 171 |
+
packed Q2_K symbols = packed native ternary symbols
|
| 172 |
+
|
| 173 |
+
group metadata =
|
| 174 |
+
0x00 when all 16 symbols in the logical group are the center symbol
|
| 175 |
+
0xFF otherwise
|
| 176 |
+
|
| 177 |
+
Q2_K d = fp16(fp32(native_scale) / 15)
|
| 178 |
+
Q2_K dmin = fp16(fp32(native_scale) / 15)
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
Consequences:
|
| 182 |
+
|
| 183 |
+
- the packed discrete symbol identities are preserved by construction;
|
| 184 |
+
- the output uses the standard `Q2_K` block layout;
|
| 185 |
+
- the conversion is deterministic for a fixed source artifact;
|
| 186 |
+
- the conversion does not claim floating-point equivalence with native
|
| 187 |
+
`TQ2_0` dequantization;
|
| 188 |
+
- downstream logits and generated text may differ between representations.
|
| 189 |
+
|
| 190 |
+
This distinction is intentional: the `Q2_K` variant is a compatibility
|
| 191 |
+
representation of the ternary code field, not an assertion that the two
|
| 192 |
+
dequantizers are interchangeable.
|
| 193 |
+
|
| 194 |
+
## Runtime contract
|
| 195 |
+
|
| 196 |
+
Use a `llama.cpp` revision that supports:
|
| 197 |
+
|
| 198 |
+
- the `qwen35` architecture;
|
| 199 |
+
- the embedded `draft-mtp` path;
|
| 200 |
+
- `TQ2_0` for the primary artifact, or standard `Q2_K` for the compatibility
|
| 201 |
+
artifact.
|
| 202 |
+
|
| 203 |
+
The `Q2_K` variant removes the native tensor-type requirement. It does not
|
| 204 |
+
remove the architecture or MTP-runtime requirements.
|
| 205 |
+
|
| 206 |
+
Runtime option names can change across `llama.cpp` revisions. Confirm the
|
| 207 |
+
available flags with:
|
| 208 |
+
|
| 209 |
+
```bash
|
| 210 |
+
llama-cli --help | grep -E 'draft-mtp|spec-draft|model-draft'
|
| 211 |
+
```
|
| 212 |
+
|
| 213 |
+
## Download
|
| 214 |
|
| 215 |
+
### Primary `TQ2_0`
|
| 216 |
|
| 217 |
+
```bash
|
| 218 |
+
hf download vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF \
|
| 219 |
+
Ternary-Bonsai-27B-MTP-TQ2_0.gguf \
|
| 220 |
+
SHA256SUMS \
|
| 221 |
+
--local-dir .
|
| 222 |
+
```
|
| 223 |
+
|
| 224 |
+
### Compatibility `Q2_K`
|
| 225 |
+
|
| 226 |
+
```bash
|
| 227 |
+
hf download vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF \
|
| 228 |
+
Ternary-Bonsai-27B-MTP-Q2_K.gguf \
|
| 229 |
+
SHA256SUMS \
|
| 230 |
+
--local-dir .
|
| 231 |
+
```
|
| 232 |
+
|
| 233 |
+
Verify either or both downloaded artifacts:
|
| 234 |
+
|
| 235 |
+
```bash
|
| 236 |
+
sha256sum -c SHA256SUMS --ignore-missing
|
| 237 |
+
```
|
| 238 |
+
|
| 239 |
+
## Inference
|
| 240 |
+
|
| 241 |
+
Select one artifact:
|
| 242 |
+
|
| 243 |
+
```bash
|
| 244 |
+
MODEL="Ternary-Bonsai-27B-MTP-TQ2_0.gguf"
|
| 245 |
+
# or:
|
| 246 |
+
# MODEL="Ternary-Bonsai-27B-MTP-Q2_K.gguf"
|
| 247 |
+
```
|
| 248 |
+
|
| 249 |
+
### Ordinary target decode
|
| 250 |
|
| 251 |
```bash
|
| 252 |
llama-cli \
|
| 253 |
+
-m "$MODEL" \
|
| 254 |
+
-p "Derive a cost model for speculative decoding." \
|
| 255 |
-n 256
|
| 256 |
```
|
| 257 |
|
| 258 |
+
### Embedded MTP
|
| 259 |
|
| 260 |
```bash
|
| 261 |
llama-cli \
|
| 262 |
+
-m "$MODEL" \
|
| 263 |
--spec-type draft-mtp \
|
| 264 |
--spec-draft-n-max 2 \
|
| 265 |
+
-p "Derive a cost model for speculative decoding." \
|
| 266 |
-n 256
|
| 267 |
```
|
| 268 |
|
| 269 |
There is deliberately no `-md` / `--model-draft` argument.
|
| 270 |
|
| 271 |
+
### OpenAI-compatible server
|
| 272 |
+
|
| 273 |
+
```bash
|
| 274 |
+
llama-server \
|
| 275 |
+
-m "$MODEL" \
|
| 276 |
+
--spec-type draft-mtp \
|
| 277 |
+
--spec-draft-n-max 2 \
|
| 278 |
+
--host 127.0.0.1 \
|
| 279 |
+
--port 8080
|
| 280 |
+
```
|
| 281 |
+
|
| 282 |
+
## Speculative-decoding economics
|
| 283 |
|
| 284 |
+
Embedded MTP is beneficial only when the accepted speculative work amortizes
|
| 285 |
+
predictor and verification cost:
|
| 286 |
|
| 287 |
```text
|
| 288 |
+
(C_draft + C_verify) / E[committed draft tokens] < C_target-step
|
| 289 |
```
|
| 290 |
|
| 291 |
+
Acceptance rate is an intermediate statistic, not the optimization objective.
|
| 292 |
+
The relevant endpoint is end-to-end committed-token throughput under a fixed
|
| 293 |
+
workload and configuration.
|
| 294 |
|
| 295 |
+
A minimal controlled comparison is:
|
| 296 |
|
| 297 |
```text
|
| 298 |
+
A. ordinary target decode
|
| 299 |
+
B. draft-mtp with n_max = 1
|
| 300 |
+
C. draft-mtp with n_max = 2
|
| 301 |
```
|
| 302 |
|
| 303 |
+
Hold constant:
|
| 304 |
|
| 305 |
+
- exact model file and checksum;
|
| 306 |
+
- prompt corpus and prompt order;
|
| 307 |
+
- context length;
|
| 308 |
+
- sampler chain and sampler parameters;
|
| 309 |
+
- random seed where supported;
|
| 310 |
+
- batch and micro-batch sizes;
|
| 311 |
+
- thread count and affinity;
|
| 312 |
+
- GPU-layer split and device placement;
|
| 313 |
+
- KV-cache types;
|
| 314 |
+
- warm-up policy;
|
| 315 |
+
- output token budget.
|
| 316 |
|
| 317 |
+
Report separately:
|
| 318 |
|
| 319 |
+
- prompt-evaluation throughput;
|
| 320 |
+
- committed generation throughput;
|
| 321 |
+
- attempted and accepted draft tokens;
|
| 322 |
+
- acceptance ratio;
|
| 323 |
+
- time to first token;
|
| 324 |
+
- peak host memory and device memory;
|
| 325 |
+
- full command line and runtime revision.
|
| 326 |
|
| 327 |
+
Do not compare the native and compatibility representations while attributing
|
| 328 |
+
the entire difference to MTP: that changes two independent variables at once.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
|
| 330 |
+
No hardware-independent speedup claim is made by this repository.
|
| 331 |
|
| 332 |
+
## Portable artifact validation
|
| 333 |
|
| 334 |
+
The public claims below are properties of the files and metadata, not of a
|
| 335 |
+
specific workstation.
|
| 336 |
|
| 337 |
+
| Check | Native `TQ2_0` | Standard `Q2_K` |
|
| 338 |
+
|---|---:|---:|
|
| 339 |
+
| Exact byte length recorded | pass | pass |
|
| 340 |
+
| SHA-256 recorded | pass | pass |
|
| 341 |
+
| GGUF V3 parse | pass | pass |
|
| 342 |
+
| Architecture metadata: `qwen35` | pass | pass |
|
| 343 |
+
| Logical tensor count: 866 | pass | pass |
|
| 344 |
+
| Target depth: 64 blocks | pass | pass |
|
| 345 |
+
| Embedded NextN depth: 1 block | pass | pass |
|
| 346 |
+
| Tensor-name, shape and order inventory | pass | pass |
|
| 347 |
+
| Expected type histogram | pass | pass |
|
| 348 |
+
| Converted native tensors | not applicable | 480 / 480 |
|
| 349 |
+
| Public metadata privacy scan | pass | pass |
|
| 350 |
+
| Hub object size and content hash verification | pass | verified at publication |
|
| 351 |
+
|
| 352 |
+
The model card intentionally publishes no workstation-specific throughput,
|
| 353 |
+
device name, driver name, local path, hostname or private build log.
|
| 354 |
+
|
| 355 |
+
## Integrity
|
| 356 |
+
|
| 357 |
+
The checksum is the authoritative artifact identity; the filename is a
|
| 358 |
+
human-readable label.
|
| 359 |
+
|
| 360 |
+
| File | SHA-256 |
|
| 361 |
+
|---|---|
|
| 362 |
+
| `Ternary-Bonsai-27B-MTP-TQ2_0.gguf` | `480c695b0de5b78b720d7f500eb3e1650359d0ac8e18c29b231a14b2d9c9bf20` |
|
| 363 |
+
| `Ternary-Bonsai-27B-MTP-Q2_K.gguf` | `850b4f4041c7d73e4442f23b1c70464f68fb76bf8717bc13ada1562680684410` |
|
| 364 |
+
|
| 365 |
+
Verify explicitly:
|
| 366 |
|
| 367 |
+
```bash
|
| 368 |
+
printf '%s %s\n' \
|
| 369 |
+
'480c695b0de5b78b720d7f500eb3e1650359d0ac8e18c29b231a14b2d9c9bf20' \
|
| 370 |
+
'Ternary-Bonsai-27B-MTP-TQ2_0.gguf' \
|
| 371 |
+
| sha256sum -c -
|
| 372 |
+
|
| 373 |
+
printf '%s %s\n' \
|
| 374 |
+
'850b4f4041c7d73e4442f23b1c70464f68fb76bf8717bc13ada1562680684410' \
|
| 375 |
+
'Ternary-Bonsai-27B-MTP-Q2_K.gguf' \
|
| 376 |
+
| sha256sum -c -
|
| 377 |
+
```
|
| 378 |
|
| 379 |
+
## Construction and provenance
|
|
|
|
| 380 |
|
| 381 |
+
This is a model-engineering artifact. It is not a new pretraining run and not
|
| 382 |
+
an instruction fine-tune.
|
| 383 |
|
| 384 |
+
The final graph combines:
|
| 385 |
+
|
| 386 |
+
- a pinned Ternary Bonsai 27B target trunk;
|
| 387 |
+
- a Qwen3.6-derived NextN/MTP donor package;
|
| 388 |
+
- a dedicated MTP embedding and output path;
|
| 389 |
+
- a stock-compatible `qwen35` GGUF graph;
|
| 390 |
+
- two published storage representations of the same logical tensor graph.
|
| 391 |
|
| 392 |
| Role | Immutable source | Revision | Source SHA-256 |
|
| 393 |
|---|---|---|---|
|
| 394 |
+
| Ternary target trunk | [`prism-ml/Ternary-Bonsai-27B-gguf`](https://huggingface.co/prism-ml/Ternary-Bonsai-27B-gguf) | `3f8cc399dde45ac0475d023634974407af34907c` | `f659ca3dd7e28ada5d8b5f3637862d0d51ef433bde032ec4c8990ed27c91a385` |
|
| 395 |
+
| MTP donor package | [`lym00/Qwen3.6-27B-MTP-ONLY-GGUF`](https://huggingface.co/lym00/Qwen3.6-27B-MTP-ONLY-GGUF) | `03b35db648da71e23ecfb239f70661e069b16054` | `97697fc5278d4bfd0afaa733ba28c4338cb0396b98d5f5acb781e515f72b52c0` |
|
|
|
|
|
|
|
| 396 |
|
| 397 |
+
The donor package identifies Qwen3.6-derived MTP material but does not pin a
|
| 398 |
+
separate underlying Qwen source revision. This card does not invent one.
|
| 399 |
|
| 400 |
+
The predictor was grafted from a compatible donor. It was not jointly trained
|
| 401 |
+
with the final ternary target.
|
| 402 |
|
| 403 |
+
See `NOTICE` for attribution and `LICENSE` for terms.
|
| 404 |
|
| 405 |
+
## Scope of claims
|
|
|
|
| 406 |
|
| 407 |
+
This repository claims:
|
| 408 |
|
| 409 |
+
- a self-contained GGUF graph with target and embedded MTP paths;
|
| 410 |
+
- exact artifact sizes and cryptographic identities;
|
| 411 |
+
- the documented tensor inventories and graph structure;
|
| 412 |
+
- complete conversion coverage for the 480 native ternary tensors in the
|
| 413 |
+
`Q2_K` artifact;
|
| 414 |
+
- standard `Q2_K` storage for the compatibility representation.
|
| 415 |
|
| 416 |
+
This repository does **not** claim:
|
| 417 |
|
| 418 |
+
- a new pretrained or fine-tuned model;
|
| 419 |
+
- joint training of the final target and predictor;
|
| 420 |
+
- output equivalence between `TQ2_0` and `Q2_K`;
|
| 421 |
+
- preservation of upstream benchmark scores after graph construction or
|
| 422 |
+
quantization;
|
| 423 |
+
- a universal MTP speedup;
|
| 424 |
+
- compatibility with every historical or future runtime revision;
|
| 425 |
+
- multimodal capability or inclusion of a vision projector;
|
| 426 |
+
- endorsement by Prism ML, Qwen, Alibaba Cloud, `lym00` or `llama.cpp`.
|
| 427 |
|
| 428 |
+
## Known limitations
|
| 429 |
|
| 430 |
+
- Aggressive low-bit representations can affect accuracy, calibration and
|
| 431 |
+
long-context behavior.
|
| 432 |
+
- The grafted predictor may be suboptimal relative to a predictor jointly
|
| 433 |
+
trained against the final target.
|
| 434 |
+
- Speculative decoding can improve, match or reduce throughput depending on
|
| 435 |
+
acceptance, backend, context, sampler and device placement.
|
| 436 |
+
- The `Q2_K` compatibility representation is larger than native `TQ2_0`.
|
| 437 |
+
- A successful parse and exact tensor inventory do not substitute for
|
| 438 |
+
task-specific evaluation.
|
| 439 |
+
- Reproducible performance evaluation requires publishing the complete runtime
|
| 440 |
+
and workload configuration.
|
| 441 |
|
| 442 |
+
## License and attribution
|
|
|
|
| 443 |
|
| 444 |
+
Repository artifacts are distributed under Apache-2.0, subject to the included
|
| 445 |
+
`LICENSE` and `NOTICE` files and the terms of the source artifacts.
|
| 446 |
|
| 447 |
+
This independent release is not endorsed by Prism ML, Qwen, Alibaba Cloud,
|
| 448 |
+
`lym00` or the `llama.cpp` project.
|
|
|
|
| 449 |
|
| 450 |
## Citation
|
| 451 |
|
| 452 |
```bibtex
|
| 453 |
+
@misc{vinpix2026ternarybonsai27bembeddedmtp,
|
| 454 |
+
title = {Ternary Bonsai 27B with Embedded MTP: Native TQ2_0 and Standard Q2_K GGUF},
|
| 455 |
author = {vinpix},
|
| 456 |
year = {2026},
|
| 457 |
url = {https://huggingface.co/vinpix/Ternary-Bonsai-27B-Stock-MTP-GGUF}
|
| 458 |
}
|
| 459 |
```
|
| 460 |
|
| 461 |
+
---
|
|
|
|
|
|
|
| 462 |
|
| 463 |
+
**Primary representation:** native `TQ2_0`
|
| 464 |
+
**Compatibility representation:** standard `Q2_K`
|
| 465 |
+
**Deployment boundary:** one GGUF, one checksum, no sidecar drafter
|
SHA256SUMS
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
480c695b0de5b78b720d7f500eb3e1650359d0ac8e18c29b231a14b2d9c9bf20 Ternary-Bonsai-27B-MTP-TQ2_0.gguf
|
|
|
|
|
|
| 1 |
480c695b0de5b78b720d7f500eb3e1650359d0ac8e18c29b231a14b2d9c9bf20 Ternary-Bonsai-27B-MTP-TQ2_0.gguf
|
| 2 |
+
850b4f4041c7d73e4442f23b1c70464f68fb76bf8717bc13ada1562680684410 Ternary-Bonsai-27B-MTP-Q2_K.gguf
|