Ternary Bonsai 2: A 27B LLM Compressed Under 6GB for In-Browser WebGPU Execution
Prism ML has released Ternary Bonsai 2, a 27-billion parameter language model derived from Qwen3.8-27B that utilizes extreme ternary weight quantization. The quantization reduces the model size to under 6GB—9x smaller than FP16 precision—allowing it to run locally in web browsers via WebGPU while maintaining 98.2% of its original accuracy. Running a capable 27B parameter model locally in-browser without relying on cloud APIs or dedicated server GPUs represents a major step forward for edge AI and user privacy. It demonstrates that aggressive quantization can make large open-weight models accessible on everyday consumer hardware. Ternary Bonsai 2 retains the exact underlying hybrid-attention causal architecture of Qwen3.8-27B without modifications. The model collection and an interactive WebGPU demonstration space are currently hosted on Hugging Face.
## BACKGROUND
Model quantization reduces memory usage and computational demands by representing neural network weights with lower-precision formats, such as ternary weights that limit values to just three states (-1, 0, +1). WebGPU is a modern web graphics standard that allows browser applications to tap directly into GPU hardware acceleration. Combining these technologies enables complex language models to execute client-side inside a standard browser environment.