The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Ternary Bonsai 2 27B on Apple Silicon
Long-Context Probe, KV-Cache Scaling, and Negative Results for the 20 tok/s Target
Chengyi Xu and Nexora β Nexora Research
Executive Summary
PrismML's Ternary Bonsai 2 27B uses end-to-end ternary weights (${-1, 0, +1}$) mapped to a compact 2-bit quantization (PQ2_0, 7.2 GB on disk) while maintaining near-full baseline accuracy on standard coding and reasoning benchmarks.
This repository publishes our experimental evaluation of Bonsai 2 on an Apple M4 Max 64 GB host under native 262,144 token context constraints.
Key Findings & Negative Results
- Context Admissibility: The server successfully loaded and prefilled a 260,013-token prompt, retrieving needle sentinels with 100% precision.
- Decode Throughput Collapse at Depth:
- F16 KV Cache: Full-depth decode dropped to 3.37 tok/s (far below the 20 tok/s operational requirement).
- Symmetric Q4 KV Cache: Decode achieved 5.29 tok/s at 260k tokens.
- Short Context Baseline: Short-context reasoning (
xhigh) ran at 21.87 tok/s.
- Conclusion: While Ternary Bonsai 2's PQ2_0 weights fit comfortably within memory, KV-cache memory bandwidth and attention costs on Apple Silicon Metal architectures prevent simultaneous delivery of 262k context and β₯ 20 tok/s decode without specialized model kernels or memory layout optimizations.
Repository Contents
ternary-bonsai2-27b-eval/
βββ README.md # Overview and summary of findings
βββ CITATION.cff # Citation metadata
βββ LICENSE # MIT License
βββ MANIFEST.json # Deployment specification and environment metadata
βββ RESEARCH.md # In-depth architectural analysis and literature review
βββ bench/
β βββ context_probe.py # Deterministic long-context probe harness
β βββ test_context_probe.py # Probe unit test suite
β βββ results.jsonl # Machine-readable per-trial execution log
β βββ context-260k-f16.json # Raw benchmark result (F16 KV)
β βββ context-260k-q4.json # Raw benchmark result (Q4 KV)
β βββ context-260k-f16-no-think.json # Raw benchmark result (No reasoning)
β βββ xhigh.json # Raw benchmark result (Short prompt, xhigh reasoning)
β βββ tool_smoke_payload.json # Tool calling smoke test payload
βββ deploy/
β βββ start-canary.example.sh # Server launch script template
β βββ local.prism.bonsai2-262k.plist.example # macOS launchd agent template
βββ logs/
βββ canary-f16.log # Sanitized startup and timing log (F16 KV)
βββ canary-q4.log # Sanitized startup and timing log (Q4 KV)
Reproducing the Context Probe
Run the unit tests:
python3 bench/test_context_probe.py
Run a probe against an active OpenAI-compatible endpoint:
python3 bench/context_probe.py \
--endpoint http://127.0.0.1:18795/v1 \
--tokens 260000 \
--needle "CRITICAL_SENTINEL_ALPHA" \
--output probe-results.json
Citation
@dataset{xu2026bonsai2eval,
title = {Ternary Bonsai 2 27B on Apple Silicon: Long-Context Probe, KV-Cache Scaling and Negative Results for 20 TPS Target},
author = {Xu, Chengyi and {{Nexora}}},
year = {2026},
month = oct,
url = {https://github.com/chengyixu/ternary-bonsai2-27b-eval}
}
License
MIT License. Copyright (c) 2026 Chengyi Xu and Nexora. Model weights are property of their respective creators (PrismML) and are not distributed in this repository.
- Downloads last month
- 112