Ternary LLMs: how Bonsai fits 27B parameters in 6 GB

13 steps · about 5 h 5 min · Intermediate

  1. LLM Quantization Explained: How Many Bits Does a Model Need? (video, YouTube, 15 min)

    Start with the core idea: rounding weights to fewer values shrinks the file while the model mostly keeps its quality.

  2. LLM Quantization Explained: INT8, INT4 and Block Scaling (video, YouTube, 15 min)

    Adds the mechanics of mapping floats to integers, outliers, block scaling, and post-training versus quantization-aware training.

  3. LLM Quantization: GGUF, AWQ, GPTQ and FP8 Explained (article, Omid Saffari, 15 min)

    Shows how a file format like GGUF differs from a quantization method, so the names make sense later.

  4. BitNet b1.58: The 1-Bit LLM That Matches Full-Precision Models (article, didof.dev, 15 min)

    A friendly introduction to ternary weights {-1, 0, 1}, why 1.58 bits is log2(3), and why zero matters.

  5. The myth of 1-bit LLMs (video, YouTube, 25 min)

    Explains BitLinear, quantization-aware training, bit-packing and why '1.58 bits' is really stored in 2 bits.

  6. BitNet · Hugging Face (doc, Hugging Face Transformers docs, 10 min)

    Gives the absmean recipe in plain steps and explains why BitNet can't be quantized on the fly.

  7. Fine-tuning LLMs to 1.58bit: extreme quantization made easy (article, Hugging Face blog, 30 min)

    Shows how an existing model like Llama 3 can be converted to ternary during fine-tuning, the route Bonsai-style models are closer to.

  8. The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits (reference, arXiv (Ma et al., Microsoft), 40 min)

    The original paper behind ternary LLMs, with the absmean quantization function and the energy and latency claims.

  9. Introducing Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint (article, PrismML, 15 min)

    Now apply the ideas: ternary weights with FP16 group scales, 98.2% retained benchmark score and a 9x smaller footprint.

  10. Ternary-Bonsai-2-27B: A 27B Model That Fits in 8.6GB (article, MindStudio, 10 min)

    An independent breakdown of the g128 grouping and where the 8.6 GB figure comes from (language model plus vision tower).

  11. GitHub - PrismML-Eng/Bonsai-demo (repo, PrismML on GitHub, 45 min)

    Run Bonsai yourself with the GGUF and MLX builds, sampling settings and whitepapers.

  12. GitHub - microsoft/BitNet: Official inference framework for 1-bit LLMs (repo, Microsoft, 40 min)

    See how custom CPU kernels turn ternary weights into real speed and energy savings.

  13. How to Quantize a Model to GGUF with llama.cpp: Step-by-Step Guide (article, The Kaitchup, 30 min)

    Finish by quantizing a model yourself so you can compare ordinary 4-bit formats with ternary ones.