Ternary Bonsai 2 Models Released with Browser WebGPU Support
Prism-ML has released the Ternary Bonsai 2 model family (including 2B, 4B, and 9B variants) on Hugging Face. The 2B model can run entirely locally within a web browser using custom WebGPU kernels, achieving speeds of up to 500 tokens per second on an M4 Max. This release represents a major milestone for edge and local AI, proving that highly efficient ternary quantization combined with optimized browser execution can deliver cloud-like performance directly on consumer hardware. It eliminates installation barriers by enabling instant, zero-setup AI inference inside standard web browsers. The collection includes various sizes hosted on Hugging Face alongside an interactive WebGPU demo. The impressive benchmark of 500 tokens per second was recorded on Apple's powerful M4 Max chip utilizing specialized GPU shaders.
## BACKGROUND
Ternary model quantization restricts neural network weights to three discrete values (-1, 0, and +1), drastically reducing memory footprint and computational requirements compared to traditional floating-point models. WebGPU is a modern web standard that provides low-level, high-performance GPU access directly inside web browsers, allowing developers to run heavy machine learning workloads client-side without cloud servers.