Downloads · 30 days
1.4K
92% of all-time downloads
infosave/Bonsai-27Bcmf
Bonsai-27Bcmf is a text generation model from infosave. Use it when you need the model to write or continue text. It is set up for cortiq. The card lists the license as apache-2.0.
Bonsai-27B — a 1-bit-trained 27B hybrid (16 full-attention + 48 GatedDeltaNet layers, 248K vocabulary) — packed into a single CMF file with q1 encoding: 1.5 bits per weight, 6 bytes per 32 weights.
Downloads · 30 days
1.4K
92% of all-time downloads
All-time downloads
1.5K
Public
Repo size
5.1 GB
Likes
2
Public
Click a slice to open those files.
.cmf5.1 GB · 100%
From the Hugging Face model README
Bonsai-27B — a 1-bit-trained 27B hybrid (16 full-attention + 48 GatedDeltaNet layers, 248K vocabulary) — packed into a single CMF file with q1 encoding: 1.5 bits per weight, 6 bytes per 32 weights.
Because the model was trained at 1 bit, q1 is its native representation, not a lossy afterthought: generation is token-for-token identical to the same model stored at q8. The whole model is one 4.75 GB file that memory-maps straight off disk and decodes at 9–11 tok/s on an Apple M4 MacBook (24 GB) through a whole-token Metal graph.
CMF (Cortiq Model Format) is a single-file LLM container with a small pure-Rust runtime — no Python, no torch, no C++ toolchain, no CUDA install:
--o1): convert attention to a
constant-memory streaming operator — no retraining, weights
byte-identical.Format spec and engine: https://github.com/infosave2007/cmf Mobile app (Flutter, runs CMF on-device): https://github.com/infosave2007/cmfmobile — note this 4.75 GB model needs a 16–24 GB machine; on phones use Bonsai-1.7B in the same format (334 MB).
Prebuilt binaries (macOS arm64/x86_64, Linux, Windows): https://github.com/infosave2007/cmf/releases/latest
Or with a Rust toolchain:
cargo install cortiq-cli # needs >= 0.3.6
# download the model file (~4.75 GB)
huggingface-cli download infosave/Bonsai-27Bcmf bonsai-27b-q1.cmf --local-dir .
# chat (the file carries its own chat template)
cortiq run bonsai-27b-q1.cmf --prompt "Explain mmap in one sentence."
# Apple Silicon: run the whole-token Metal graph (9-11 tok/s on an M4)
CMF_GPU=1 cortiq run bonsai-27b-q1.cmf --prompt "Explain mmap in one sentence."
# raw completion mode (no chat template)
cortiq run bonsai-27b-q1.cmf --prompt "The capital of France is" --raw --greedy
cortiq serve speaks the OpenAI API, so existing clients and SDKs work
unchanged:
CMF_GPU=1 cortiq serve bonsai-27b-q1.cmf --port 8080 # + web dashboard on /
curl localhost:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"model": "cmf",
"messages": [{"role": "user", "content": "Explain mmap in one sentence."}]
}'
Streaming ("stream": true), /v1/models, /v1/completions and
/healthz work too. Note the scope honestly: requests are serialized
(one at a time per model) and there is no authentication — a
local-first server, not a multi-tenant gateway.
| Mode | Speed |
|---|---|
decode, CMF_GPU=1 (whole-token Metal graph) | 9–11.4 tok/s |
| decode, CPU only | ~3.2 tok/s |
| resident memory | ≈ file size (mmap) |
The GPU decode is distribution-equivalent to the CPU path (reduction order differs — the usual GPU tolerance class).
Converted from prism-ml/Bonsai-27B-unpacked (Apache-2.0) with:
cortiq convert --model prism-ml/Bonsai-27B-unpacked --quant q1 --output bonsai-27b-q1.cmf
q1 is intended for 1-bit-trained checkpoints (Bonsai / BitNet class). As post-training quantization of an ordinary model it destroys quality — the converter exposes it only as an explicit opt-in.