MrNAM205/Bonsai-1.7B-gguf
<p align="center"> <img src="./assets/bonsai-logo.svg" width="280" alt="Bonsai"> </p>
<p align="center"> <a href="https://prismml.com"><b>Prism ML Website</b></a> | <a href="https://github.com/PrismML-Eng/Bonsai-demo/blob/main/1-bit-bonsai-8b-whitepaper.pdf"><b>Whitepaper</b></a> | <a href="https://github.com/PrismML-Eng/Bonsai-demo"><b>Demo & Examples</b></a> | <a href="https://colab.research.google.com/drive/1EzyAaQ2nwDv_1X0jaC5XiVC3ZREg9bdG?usp=sharing"><b>Colab Notebook</b></a> | <a href="https://discord.gg/prismml"><b>Discord</b></a> </p>
Bonsai-1.7B-GGUF-1bit
End-to-end 1-bit language model for llama.cpp (CUDA, Metal, CPU)
13.9x smaller than FP16 | 3.0x faster on RTX 4090 | runs on any device
Highlights
- Deployed footprint — runs on virtually any device
- End-to-end 1-bit weights across embeddings, attention projections, MLP projections, and LM head
- GGUF Q1_0_g128 format for 1-bit packing of weights with shared scales for each group (group size 128).
- Cross-platform: CUDA (RTX/datacenter), Metal (Mac), Swift (iPhone/iPad), Android
- MLX companion: also available as MLX 1-bit g128 for native Apple Silicon inference
<p align="center"> <img src="./assets/frontier.svg" width="680" alt="Frontier Efficiency"> </p>
Resources
- [Google Colab](https://colab.research.google.com/drive/1EzyAaQ2nwDv_1X0jaC5XiVC3ZREg9bdG?usp=sharing) — try Bonsai in your browser, no setup required
- [Whitepaper](https://github.com/PrismML-Eng/Bonsai-demo/blob/main/1-bit-bonsai-8b-whitepaper.pdf) — for more details on Bonsai, check out our whitepaper
- [Demo repo](https://github.com/PrismML-Eng/Bonsai-demo) — comprehensive examples for serving, benchmarking, and integrating Bonsai
- [Discord](https://discord.gg/prismml) — join the community for support, discussion, and updates
- 1-bit kernels: llama.cpp fork (CUDA + Metal) · MLX fork (Apple Silicon) · mlx-swift fork (iOS/macOS)
- [Locally AI](https://locallyai.app/) — we have partnered with Locally AI for iPhone support
Model Overview
Quantization Format: Q10g128
Each weight is a single bit: 0 maps to −scale, 1 maps to +scale. Every group of 128 weights shares one FP16 scale factor.
Effective bits per weight: 1.125 (1 sign bit + 16-bit scale amortized over 128 weights).
Memory Requirement
Parameter memory only (weights and scales loaded into memory):
The GGUF file on disk is 0.25 GB (~6.2 MB larger) because the format embeds the tokenizer, chat template, and model metadata alongside the weights.
Best Practices
Generation Parameters
System Prompt
You can use a simple system prompt such as:
You are a helpful assistantQuickstart
llama.cpp (CUDA)
# Clone the PrismML fork of llama.cpp (includes Q1_0_g128 kernels)
git clone https://github.com/PrismML-Eng/llama.cpp
cd llama.cpp
# Build with CUDA support
cmake -B build -DGGML_CUDA=ON && cmake --build build -j
# Run inference
./build/bin/llama-cli \
-m Bonsai-1.7B-Q1_0_g128.gguf \
-p "Explain quantum computing in simple terms." \
-n 256 \
--temp 0.5 \
--top-p 0.85 \
--top-k 20 \
-ngl 99llama.cpp (Metal / macOS)
# Clone the PrismML fork of llama.cpp (includes Q1_0_g128 kernels)
git clone https://github.com/PrismML-Eng/llama.cpp
cd llama.cpp
# Build with Metal support (default on macOS)
cmake -B build && cmake --build build -j
# Run inference
./build/bin/llama-cli \
-m Bonsai-1.7B-Q1_0_g128.gguf \
-p "Explain quantum computing in simple terms." \
-n 256 \
--temp 0.5 \
--top-p 0.85 \
--top-k 20 \
-ngl 99llama.cpp Server
./build/bin/llama-server \
-m Bonsai-1.7B-Q1_0_g128.gguf \
--host 0.0.0.0 \
--port 8080 \
-ngl 99Open the web UI at http://127.0.0.1:8080, or see our llama.cpp fork for more examples.
Cross-Platform Throughput
Citation
If you use 1-bit Bonsai 1.7B, please cite:
@techreport{bonsai,
title = {Bonsai: End-to-End 1-bit Language Model Deployment
Across Apple, GPU, and Mobile Runtimes},
author = {Prism ML},
year = {2026},
month = {March},
url = {https://prismml.com}
}Contact
For questions, feedback, or collaboration inquiries: contact@prismml.com
