Instructions to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark", filename="Bonsai-27B-antidoom-1bit-Q1_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - 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 Studio
How to use Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark to start chatting
- 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 @mariozechner/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
- Hermes Agent new
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 new
- OpenClaw new
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"
- 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
Bonsai-27B-antidoom-1bit-DSpark
A DSpark-accelerated + antidoom
(FTPO anti-repetition) build of prism-ml/Bonsai-27B —
the 1-bit (Q1_0, 1.125 bpw g128) quantization of the Qwen3.5-27B hybrid-attention model.
Runs in the PrismML-Eng/llama.cpp fork (CUDA, the Q1_0 hybrid-attention kernels). Benchmarked on a single RTX 5090 (32 GB, Blackwell sm_120).
Contents
| File | What |
|---|---|
Bonsai-27B-antidoom-1bit-Q1_0.gguf |
antidoom-tuned 1-bit model (4.5 GB) |
Bonsai-27B-dspark-Q4_1.gguf |
DSpark speculative drafter (from prism-ml) |
Bonsai-27B-mmproj-Q8_0.gguf |
vision projector (from prism-ml) |
Run with DSpark (fastest)
build/bin/llama-server \
-m Bonsai-27B-antidoom-1bit-Q1_0.gguf \
-md Bonsai-27B-dspark-Q4_1.gguf \
--spec-type draft-dspark --spec-draft-n-max 4 \
-ngl 999 -ngld 999 -fa on -c 16384 -np 1
Speed comparison — all four models (RTX 5090, 32 GB)
Single stream, greedy, 256 new tokens, PrismML llama.cpp fork (CUDA 13 / sm_120).
Native = llama-bench tg256 (fa=1, r=2). DSpark = llama-speculative-simple,
--spec-draft-n-max 4, code prompt (high-acceptance workload); all four runs measured
back-to-back in the same session.
| Model | Native tok/s | + DSpark tok/s | Accept | DSpark speedup |
|---|---|---|---|---|
| Bonsai-27B 1-bit (base) | 166.0 | 208.3 | 78.6% | 1.25× |
| Bonsai-27B 1-bit antidoom (this family) | 153.7 | 192.4 | 74.6% | 1.25× |
| Ternary-Bonsai-27B (base) | 136.5 | 185.9 | 69.2% | 1.36× |
| Ternary-Bonsai-27B antidoom (this family) | 129.2 | 184.6 | 69.2% | 1.43× |
tok/s (code prompt, bs=1) native ▒ +DSpark █
Bonsai 1-bit base ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 166.0
████████████████████████████████ 208.3
Bonsai 1-bit antidoom ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 153.7
█████████████████████████████ 192.4
Ternary base ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 136.5
████████████████████████████ 185.9
Ternary antidoom ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 129.2
████████████████████████████ 184.6
Notes:
- DSpark's gain is workload-dependent: on low-acceptance prose (~51%) the 1-bit target can be slower than native because the tiny weights make drafting overhead relatively expensive.
- The antidoom variants are ~5–8% slower natively because re-quantization stored the output tensor at q6_K (prism's originals pack it smaller); with DSpark the gap mostly closes.
- FTPO does not hurt the DSpark drafter (accept 74.6–78.6% 1-bit, 69.2% ternary, unchanged base vs antidoom for ternary).
- All numbers beat prism-ml's published H100 figures (104.8→143.8 1-bit, 98.0→131.8 ternary): these models are memory-bandwidth-bound and the 5090 has more bandwidth headroom at bs=1.
Antidoom (FTPO) pass — what was done
Bonsai-27B is unusually doom-loop resistant (it self-corrects repetition and stays coherent even under forced long generation), so runaway-repetition pairs were surfaced by priming: contexts that have already begun repeating a phrase, sent to the raw completion endpoint, where the model continues the loop. Antidoom's own detector + chosen-token sampler then extracted 40 FTPO preference pairs (rejected = the loop-continuation token, chosen = coherent escapes). FTPO trained a LoRA (r=32, q/k/v/o + gate/up/down, 12 epochs, lr 3e-5) on the FP16 unpacked model:
- chosen-win (prefers the coherent escape over continuing the loop): 0.11 → 0.66 (early-stopped).
- LoRA merged (CPU) into FP16, re-quantized to
Q1_0. Note the aggressive 1-bit format partially dilutes the LoRA's fine adjustments, so the anti-repetition effect is strongest at higher precision.
Output remains coherent at 1-bit. This is a demonstration of the antidoom method on a 1-bit hybrid-attention target, packaged with the shipped DSpark drafter.
Provenance
Base weights, DSpark drafter and mmproj are from prism-ml (re-quantized after the antidoom LoRA merge for the model weights; drafter/mmproj copied unchanged). Built with antidoom and the PrismML llama.cpp fork.
- Downloads last month
- 1,408
1-bit
4-bit
ollama run hf.co/Danny-Dasilva/Bonsai-27B-antidoom-1bit-DSpark: