Ternary Bonsai 2.5 27B: How Much RAM Does a 6GB Model Really Need?
Explore Bonsai 2.5 27B memory budgets, ternary quantization, GGUF and MLX compatibility, private AI deployment and data security boundaries.
Evidence 11 cited sources
On this page
Evidence scope, November 26, 2026: XBSTACK performed read-only artifact checks, calculations from the public configuration and 12 lightweight checks, and examined third-party reports. We did not download or run Bonsai 2.5 weights. This is a deployment decision study, not an inference benchmark.
Answer first: PrismML released Ternary Bonsai 2.5 27B on November 24, targeting tool-driven agents on memory-constrained hardware. Its reported 5.93 GB model footprint is not the complete runtime budget. The smallest published GGUF contains 5,993,834,848 bytes (5.99 decimal GB or roughly 5.58 GiB); the standard llama.cpp Q2_0 artifact is about 7.67 GB. An execution process also needs context state, working buffers, optional vision components and memory for the operating system. Pick a compatible runtime and packing before deciding whether a device is suitable. Compact weights also open more options for local AI, private deployment and data sovereignty, but privacy and data security still require storage, network and tool controls plus workload validation.
1. Why the ternary release matters
Bonsai 2.5 retains the hybrid-attention architecture and ternary representation of the preceding Bonsai 2 27B, based on Qwen3.8-27B. The release focuses on completing long sequences of tool calls, not merely answering a single prompt. Recovering after a failed tool call, using a real result rather than guessing, and verifying the final state are important agent behaviors.
The model card describes weights represented by -1, 0 and +1, with one FP16 scale per group of 128 and a blockwise Hadamard rotation. Matching activation transformations matter at inference time. A GGUF file extension does not guarantee compatibility with an older engine.
An ideal ternary symbol carries log₂3, about 1.585 bits. Five trits have 243 combinations, which fit in one byte. A teaching representation of 128 symbols, padded into 26 bytes plus a two-byte scale, averages 1.75 bits per weight; two-bit slots plus the scale average 2.125 bits. Actual artifacts include other tensors, alignment and container structures. This arithmetic cannot establish the actual model-wide precision or its reasoning quality.
We exhaustively round-tripped all 243 five-trit combinations using a small standard-library Python codec. It is an independent explanation of coding mechanics, not a reimplementation or benchmark of PTQ1_0 kernels.

Figure 1. Ternary representation and group scaling. The illustrated scales and two-bit code mapping are teaching examples, not actual model weights or PTQ1_0 binary encoding. The documented Bonsai method uses one FP16 scale per 128 weights and matching Hadamard transformations; scaling approximates magnitude rather than recovering the original weights exactly.
2. Published artifact sizes: read the file, not the slogan
The public Hugging Face metadata API returned revision 28a7093cc25bc151cc2b284c5570f12ce343fdcf. The integer lengths below were retrieved independently. We did not download weight contents; server-reported file hashes are metadata, not locally verified full-file checksums.
| Packing | Base GGUF bytes | Decimal GB | MTP variant |
|---|---|---|---|
| PTQ1_0 | 5,993,834,848 | 5.99 | 6.23 GB |
| PQ2_0 | 7,253,354,848 | 7.25 | 7.49 GB |
| Q2_0 | 7,673,194,848 | 7.67 | 7.91 GB |
The Q8_0 and BF16 optional vision projection artifacts contain 629,246,976 and 931,145,856 bytes, respectively. A text-only deployment need not download either. An MTP build adds a draft head for speculative decoding. Choose the appropriate base or MTP file rather than mirroring the complete eight-file, roughly 44 GB repository. Select the exact artifact from the pinned official GGUF file list and check memory and runtime compatibility before downloading.
Decimal GB uses 10⁹ bytes; GiB uses 2³⁰. Memory monitors and repository listings may display different units, so compare byte counts whenever precision matters.
3. The context budget: a reproducible calculation
The Qwen3.8-27B base configuration lists 64 layers, 16 full-attention layers, four key/value heads, head dimension 256 and 262,144 maximum positions. Assuming the same architecture, one sequence and FP16 key and value entries, without KV quantization or extra alignment:
KV_bytes_per_token = 2 × 16 × 4 × 256 × 2
= 65,536 bytes
| Context tokens | FP16 full-attention KV only |
|---|---|
| 4,096 | 0.25 GiB |
| 8,192 | 0.50 GiB |
| 32,768 | 2.00 GiB |
| 131,072 | 8.00 GiB |
| 262,144 | 16.00 GiB |
These are calculated payload sizes, not measured RAM or VRAM peaks. The deployed artifact and loader configuration still need validation. Linear-attention recurrent state, activations, working buffers, vision, concurrency and the operating system are excluded. KV quantization, unified cache strategies and offloading may change actual allocations. File mapping does not mean that every byte is resident at every moment.
At 32K, the 5.58 GiB PTQ1_0 artifact plus 2 GiB of theoretical full-attention cache add up to roughly 7.58 GiB in a simplified budget. This is already close to an 8 GiB device’s capacity before other costs. It is not a guarantee that an 8GB device can run 32K agent workloads. The advertised maximum context is a model capability, not free memory.

Figure 2. Conceptual memory components, not measured peak usage. The hybrid architecture also requires recurrent state; allow for optional vision assets, OS headroom and concurrent workloads. The preceding table calculates only single-sequence FP16 full-attention KV payload. Artifact size is not resident runtime memory.
4. GGUF or MLX? Match the packing to the engine
| Path | Selection | Boundary |
|---|---|---|
| NVIDIA CUDA | Consider PTQ1_0 with the PrismML fork | Verify actual build and task throughput |
| Apple Metal | The vendor’s Metal comparison uses PQ2_0; PTQ1_0 also requires the matching fork | Unified memory is shared with the OS |
| Stock llama.cpp | Q2_0 with b11556 or newer according to the model card | An older engine may load yet generate incorrect output |
| Apple MLX | Match the current MLX artifact and documented loader | GGUF settings and older demos cannot certify MLX behavior |
The current MLX card documents language weights, an FP16 vision tower and an optional MTP head. The demo repository still contains earlier text-only guidance for 2.5 MLX. Record the artifact revision and loader version rather than silently reconciling differing documentation. We did not run MLX image inference.
For a memory-limited single-user server, first verify single-slot configuration (-np 1), a short context and correct sampling. Start a future device test at 4K or 8K rather than assuming the advertised maximum is practical. A reasoning model may consume a small output limit before producing its answer, so record completion and task success separately from tokens per second.
An RTX 3080 10 GB community report observed about 9.5 GB total GPU memory before selecting one slot and about 7.8 GB afterward, including desktop usage. The vendor added a corresponding note. It is a useful diagnostic lead, not a controlled universal saving; the complete pair of allocation logs is missing.
5. Vendor benchmark claims and early user reports
Selected published vendor scores, not XBSTACK measurements:
| Vendor benchmark | Qwen3.8 FP16 | Bonsai 2 | Bonsai 2.5 |
|---|---|---|---|
| Five tool-calling suites, average | 77.7 | 67.0 | 77.2 |
| Three agentic coding suites, average | 60.5 | 37.9 | 54.2 |
| SWE-bench Verified | 80.6 | 60.8 | 75.6 |
| AppWorld | 93.2 | 51.2 | 90.5 |
The reported average tool-calling gap is 0.5 points, while agentic coding remains 6.3 points behind the baseline. These differences are calculated from the published rounded averages. They cannot establish a 99% success probability on an arbitrary workflow. Harness, tool schemas, sampling, permissions, context, budget and recovery policies matter.
In the original Hacker News discussion, a developer reported approximately 22.3 generated tokens/s on an example prompt using Q2 GGUF on a 24GB Mac mini M5 Pro. The developer also reported success on one small public bug-fixing task. These are self-reported observations, not an independent replication by XBSTACK. They do not establish comparable speed at 128K or reliable execution of other coding tasks.
Measure time per validated task, tool mistakes, recovery, final state and memory alongside generation speed. Compare higher-precision alternatives under the same harness if the machine can accommodate them. The LFM2.5 local deployment guide explains a different MoE memory trade-off; active parameter count and ternary storage are not interchangeable.
6. Lightweight verification: the advertised demo is not necessarily version 2.5
On November 26 we fetched the source of the WebGPU demo linked from PrismML’s homepage. Its index.html referenced prism-ml/Ternary-Bonsai-2-27B-gguf, contained browser-local WebGPU loading code and did not show a 2.5 marker. An older vendor-hosted Gradio demo referenced Ternary-Bonsai-27B. The Hugging Face inference-provider mappings for both current GGUF and MLX repositories were empty; an exact Space search returned no candidates, and the two checked local service endpoints did not connect.
These results describe the checked routes at this time, not proof that no free inference service exists anywhere. They are sufficient to avoid attributing older-version responses to Bonsai 2.5 or triggering a multi-gigabyte browser download. See the WebGPU project files.
Our 12 checks cover exhaustive five-trit encoding and uniqueness, group overhead arithmetic, byte units, ordering of the three real GGUF assets, the larger corresponding MTP artifacts and separate vision files. We retain the revision, exact lengths, response hashes, base configuration and result. A passing preflight is not a passing model capability benchmark.

Conceptual deployment guide: stock llama.cpp requires b11556 or newer per the model card; Metal still needs compatible GGUF kernels, while MLX uses its own artifact. 4K/8K is a proposed test starting point, not an observed inference result.
7. A second reason to deploy locally: data control, privacy and security
Why compress a 27B model enough to consider deployment on a personal computer or controlled server? Beyond reducing hardware requirements, local inference gives users another architectural option for AI data sovereignty: deciding which model version runs, where data is retained, who can access it and what actions are permitted. Bonsai 2.5’s compact weights concern deployment feasibility, not proof that an application using the model is secure, compliant or fully offline.
Local AI runs inference on user-controlled devices or infrastructure. On-device AI specifically runs on the endpoint; edge AI can also run on gateways or nodes near the data source; self-hosted AI may run on a controlled server, and private AI deployment can also use isolated cloud infrastructure. An offline LLM additionally requires locally available weights, runtime, retrieval and tools. Data residency concerns where data resides; data sovereignty also involves access, transfers, auditing and deletion. These terms are not interchangeable.
Local AI vs cloud AI: where does sensitive data travel?
| Architecture | Data boundary | Trade-offs |
|---|---|---|
| Offline on-device inference | Documents, vectors and inference stay on-device when all components are local; check networking, backups and logs | Personal documents and offline tasks; device memory and quality limits |
| Self-hosted or on-premises LLM deployment | Data flows within controlled infrastructure; tenant isolation, identity, encryption and audit remain necessary | Internal enterprise knowledge and sensitive documents; hardware, maintenance and compliance costs |
| Hybrid BYOK | Local retrieval followed by explicitly authorized evidence transfer; the remote provider may process those excerpts | Combines local data control with remote capabilities; owning an API key does not keep data local |
| Cloud AI | Inputs and related context may reach a remote service; retention and use depend on contract and configuration | Elastic compute for complex tasks; review retention, privacy and access boundaries |
This is an architectural comparison, not a network-behavior benchmark of Bonsai 2.5. A reference local RAG or private AI knowledge base pipeline is local import and parsing → local embedding/index → retrieval and reranking → minimal evidence → local inference → citation verification. Remote generation and tools require separate authorization rather than implicit fallback. Remote OCR, embeddings, reranking, telemetry, crash reporting, cloud sync and MCP tools can still create data leakage paths even with local model inference. See the local AI and BYOK privacy guide.
Private deployment does not guarantee data security
| Risk surface | Recommended control and acceptance check |
|---|---|
| Model supply chain security | Pin a trusted model revision and runtime; recompute a complete-file SHA-256 after download and compare with trusted metadata; review dependencies and loader code rather than enabling arbitrary remote code execution |
| Local inference service | Bind to loopback by default; authenticate and encrypt authorized network access and isolate clients; verify unauthorized access is denied |
| Sensitive data and logs | Minimize document access; encrypt persistent storage and backups; limit log content, retention and access; use synthetic sensitive markers to inspect logs and temporary files |
| Local AI agent security | Apply least privilege and zero-trust-style per-call authorization to file writes, read scopes, network destinations and high-risk actions; never treat a model’s promise as enforcement |
| Prompt injection | Treat documents and tool results as untrusted data; test whether malicious content induces unauthorized file access, transfer or mutation; deny and audit unexpected actions |
| Offline operation and data residency | Preinstall required assets, repeat a synthetic workload offline and audit network connections; document the boundaries of sync, backups, remote inference and telemetry |
The AI agent security guide and MCP tool poisoning study explain why local agents still need independent controls over retrieved content and external tools. These are deployment recommendations and future acceptance checks, not security tests completed in this study or certifications of the model or OwnRAG.
Decision: Privacy-first AI and private LLM deployment are worth evaluating for personal documents, internal enterprise knowledge and commercially sensitive data. Do not substitute a claim of local-only data for verified network behavior, or smaller weights for task accuracy. Compare hardware, energy, maintenance, security auditing and human review costs across endpoints, private servers and hybrid services. A local model need not replace every cloud model.

Reference architecture, not a security test or certification. Local processing does not automatically prevent data transfer; authorized cloud models and remote tools may process necessary inputs. Permissions, network activity, logs and data flows still require verification.
8. A practical decision for local RAG and agents
For local private knowledge bases such as OwnRAG, generation is only one part of the system. Evaluate embedding, retrieval, reranking, evidence assembly and citation verification separately; see the local retrieval study and local-first knowledge architecture. A 5.58 GiB weight file cannot establish feasibility for fully resident inference on a 4GB-class phone. No claim is made that OwnRAG integrates this model.
A small future evaluation should pin model revision, engine build and packing, then score exact JSON output, a short code patch, unauthorized tool denial, failure recovery and abstention when evidence is absent. Use independent checks rather than model self-assessment. Increase context gradually; capture actual peak RAM, first-token latency, elapsed generation, failures and task completion. Disable unnecessary external access and write permissions, using a per-call policy gate and a clear local/BYOK data boundary.
The useful engineering question is whether a model meets an actual task’s memory and quality constraints at an acceptable resource cost. The artifact preflight is complete. A genuine 2.5 capability benchmark needs a verifiable free inference endpoint or separate approval for a bounded local download.
For related engineering studies on local model deployment, on-device inference and privacy boundaries, explore the Local AI topic.
Sources and reproducibility
- Release announcement, GGUF card, pinned artifact revision.
- Base config, current MLX card, official demo and setup.
- GPU memory discussion, early independent developer reports.
- XBSTACK public preflight and raw results (all five files independently read back; this is not an inference benchmark).
Next step: harden the execution boundary
Full decision path →Continue with the control that should be enforced before the next tool call, credential handoff, or production rollout.
DISCUSSION
Questions, verification and corrections
Sign in to comment. Every new comment is reviewed before publication; while pending, it is visible only to you and the administrator.