Text Generation
GGUF
English
bonsai
qwen3_5
antidoom
ftpo
anti-repetition
1-bit
q1_0
speculative-decoding
dspark
llama.cpp
blackwell
conversational
Instructions to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark 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 Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark 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 Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0 # Run inference directly in the terminal: llama cli -hf Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0 # Run inference directly in the terminal: llama cli -hf Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_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 Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0 # Run inference directly in the terminal: ./llama-cli -hf Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_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 Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0
Use Docker
docker model run hf.co/Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0
- LM Studio
- Jan
- vLLM
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0
- Ollama
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with Ollama:
ollama run hf.co/Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0
- Unsloth Desktop
- Pi
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_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": "Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with Docker Model Runner:
docker model run hf.co/Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0
- Lemonade
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0
Run and chat with the model
lemonade run user.Bonsai-27B-antidoom-1bit-DSpark-Q1_0
List all available models
lemonade list
- Hermes Agent
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_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 Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_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 "Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark:Q1_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"
Upload folder using huggingface_hub
Browse files- .gitattributes +3 -0
- Bonsai-27B-antidoom-1bit-Q1_0.gguf +3 -0
- Bonsai-27B-dspark-Q4_1.gguf +3 -0
- Bonsai-27B-mmproj-Q8_0.gguf +3 -0
- README.md +77 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Bonsai-27B-antidoom-1bit-Q1_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
Bonsai-27B-dspark-Q4_1.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
Bonsai-27B-mmproj-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
Bonsai-27B-antidoom-1bit-Q1_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d555fb399a1ac537c8f44b69544576bc13755c9451875c798128037d274dfb7
|
| 3 |
+
size 4667606144
|
Bonsai-27B-dspark-Q4_1.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:25e73f9f7ab5d1f7f1336711496dbc12da674e639ec88d579dc8683045befb1b
|
| 3 |
+
size 1787468768
|
Bonsai-27B-mmproj-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb561d41a7bbeb0fcf04883c8af11078ef6cae0a66862a0b68443cfca495269d
|
| 3 |
+
size 629246880
|
README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: prism-ml/Bonsai-27B-gguf
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- bonsai
|
| 9 |
+
- qwen3_5
|
| 10 |
+
- antidoom
|
| 11 |
+
- ftpo
|
| 12 |
+
- anti-repetition
|
| 13 |
+
- 1-bit
|
| 14 |
+
- q1_0
|
| 15 |
+
- gguf
|
| 16 |
+
- speculative-decoding
|
| 17 |
+
- dspark
|
| 18 |
+
- llama.cpp
|
| 19 |
+
- blackwell
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# Bonsai-27B-antidoom-1bit-DSpark
|
| 23 |
+
|
| 24 |
+
A **[DSpark](https://github.com/PrismML-Eng/Bonsai-demo)-accelerated + [antidoom](https://github.com/Liquid4All/antidoom)
|
| 25 |
+
(FTPO anti-repetition)** build of [`prism-ml/Bonsai-27B`](https://huggingface.co/prism-ml/Bonsai-27B-gguf) —
|
| 26 |
+
the 1-bit (`Q1_0`, 1.125 bpw g128) quantization of the Qwen3.5-27B hybrid-attention model.
|
| 27 |
+
|
| 28 |
+
Runs in the **[PrismML-Eng/llama.cpp](https://github.com/PrismML-Eng/llama.cpp)** fork (CUDA, the
|
| 29 |
+
Q1_0 hybrid-attention kernels). Benchmarked on a single **RTX 5090 (32 GB, Blackwell sm_120)**.
|
| 30 |
+
|
| 31 |
+
## Contents
|
| 32 |
+
| File | What |
|
| 33 |
+
|---|---|
|
| 34 |
+
| `Bonsai-27B-antidoom-1bit-Q1_0.gguf` | antidoom-tuned 1-bit model (4.5 GB) |
|
| 35 |
+
| `Bonsai-27B-dspark-Q4_1.gguf` | DSpark speculative drafter (from prism-ml) |
|
| 36 |
+
| `Bonsai-27B-mmproj-Q8_0.gguf` | vision projector (from prism-ml) |
|
| 37 |
+
|
| 38 |
+
## Run with DSpark (fastest)
|
| 39 |
+
```bash
|
| 40 |
+
build/bin/llama-server \
|
| 41 |
+
-m Bonsai-27B-antidoom-1bit-Q1_0.gguf \
|
| 42 |
+
-md Bonsai-27B-dspark-Q4_1.gguf \
|
| 43 |
+
--spec-type draft-dspark --spec-draft-n-max 4 \
|
| 44 |
+
-ngl 999 -ngld 999 -fa on -c 16384 -np 1
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Benchmark (RTX 5090, greedy, bs=1, 256 tok)
|
| 48 |
+
| Config | tok/s | accept | note |
|
| 49 |
+
|---|---|---|---|
|
| 50 |
+
| **DSpark, code prompt** | **186.2** | 78.6% | **1.16× over native** |
|
| 51 |
+
| Native (llama-bench tg256) | 161.2 | — | reference |
|
| 52 |
+
| Native (llama-server decode) | 157.5 | — | |
|
| 53 |
+
| DSpark, prose prompt | 132.8 | 51% | low-accept workloads slower |
|
| 54 |
+
|
| 55 |
+
DSpark speedup is workload-dependent: on predictable content (code, high accept) it beats native;
|
| 56 |
+
the 1-bit target is so bandwidth-cheap (3.5 GB) that low-accept drafting overhead can dominate.
|
| 57 |
+
The 5090 exceeds prism-ml's published H100 native (104.8 t/s) — this 1-bit model is memory-bandwidth-bound.
|
| 58 |
+
|
| 59 |
+
## Antidoom (FTPO) pass — what was done
|
| 60 |
+
Bonsai-27B is unusually **doom-loop resistant** (it self-corrects repetition and stays coherent even
|
| 61 |
+
under forced long generation), so runaway-repetition pairs were surfaced by **priming**: contexts that
|
| 62 |
+
have already begun repeating a phrase, sent to the raw completion endpoint, where the model continues
|
| 63 |
+
the loop. Antidoom's own detector + chosen-token sampler then extracted **40 FTPO preference pairs**
|
| 64 |
+
(rejected = the loop-continuation token, chosen = coherent escapes). FTPO trained a LoRA
|
| 65 |
+
(r=32, q/k/v/o + gate/up/down, 12 epochs, lr 3e-5) on the FP16 unpacked model:
|
| 66 |
+
|
| 67 |
+
- **chosen-win (prefers the coherent escape over continuing the loop): 0.11 → 0.66** (early-stopped).
|
| 68 |
+
- LoRA merged (CPU) into FP16, re-quantized to `Q1_0`. Note the aggressive 1-bit format partially
|
| 69 |
+
dilutes the LoRA's fine adjustments, so the anti-repetition effect is strongest at higher precision.
|
| 70 |
+
|
| 71 |
+
Output remains coherent at 1-bit. This is a demonstration of the antidoom method on a
|
| 72 |
+
1-bit hybrid-attention target, packaged with the shipped DSpark drafter.
|
| 73 |
+
|
| 74 |
+
## Provenance
|
| 75 |
+
Base weights, DSpark drafter and mmproj are from [prism-ml](https://huggingface.co/prism-ml)
|
| 76 |
+
(re-quantized after the antidoom LoRA merge for the model weights; drafter/mmproj copied unchanged).
|
| 77 |
+
Built with [antidoom](https://github.com/Liquid4All/antidoom) and the PrismML llama.cpp fork.
|