Views
No views yet
For the best Bonsai experience on edge or consumer-grade hardware, use the native 1-bit releases. The 1-bit format is where Bonsai's memory and energy wins come from.
- Bonsai-8B MLX 1-bit — 1-bit MLX for Apple Silicon.
- Bonsai-8B-gguf - 1-bit gguf supported by llama.cpp across many backends (GPU, Metal, CPU, Vulkan, etc)
- Bonsai-8B FP16 — FP16 safetensors for stock HuggingFace tooling.
lm_head stay FP16 due to sglang limitations.weight = scale × (int4 − zero).+d → scale=d, int4=9, zero=8 → d × (9-8) = +d
-d → scale=d, int4=7, zero=8 → d × (7-8) = -d1pip install sglang
2
3python -m sglang.launch_server \
4 --model /path/to/Bonsai-8B-awq/ \
5 --port 8000 \
6 --dtype bfloat161# Completion API
2curl http://localhost:8000/v1/completions \
3 -H "Content-Type: application/json" \
4 -d '{"model":"Bonsai-8B","prompt":"The capital of France is","max_tokens":20}'
5
6# Chat API
7curl http://localhost:8000/v1/chat/completions \
8 -H "Content-Type: application/json" \
9 -d '{"model":"Bonsai-8B","messages":[{"role":"user","content":"Who are you?"}],"max_tokens":100}'1# Option A: DP=8 — 8 independent replicas, no inter-GPU comms
2python -m sglang.launch_server \
3 --model /path/to/Bonsai-8B-awq/ \
4 --dp-size 8 \
5 --load-balance-method total_tokens \
6 --port 8000 --dtype bfloat16
7
8# Option B: TP=2 DP=4 — 4 replicas, each split across 2 GPUs
9python -m sglang.launch_server \
10 --model /path/to/Bonsai-8B-awq/ \
11 --tp-size 2 --dp-size 4 \
12 --load-balance-method total_tokens \
13 --port 8000 --dtype bfloat16
14
15# Option C: TP=4 DP=2 — 2 replicas across 4 GPUs each
16python -m sglang.launch_server \
17 --model /path/to/Bonsai-8B-awq/ \
18 --tp-size 4 --dp-size 2 \
19 --load-balance-method total_tokens \
20 --port 8000 --dtype bfloat16~/.cache/tvm-ffi/ and ~/.cache/flashinfer/, so subsequent launches drop back to 15 s.sglang[all] == 0.5.9torch == 2.9.1, transformers == 4.57.1, triton == 3.5.1ninja == 1.13 on PATHnvcc from CUDA 12.8 first on PATH (sglang's JIT Marlin needs -std=c++20; CUDA 11.x will fail)