Instructions to use litert-community/1Bit-Bonsai-1.7B-PoC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/1Bit-Bonsai-1.7B-PoC with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=litert-community/1Bit-Bonsai-1.7B-PoC \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
Bonsai-1.7B int1 β 1-bit proof of concept (no kernel exists)
This model does not run today. It is a proof of concept, published as an artifact rather than as something usable. There is no INT1 kernel in the LiteRT GPU accelerator, so nothing currently on a phone can execute it.
No support is offered for this repo. Please do not open issues asking why it won't load β it won't, by design, until a kernel exists.
A 1-bit .litertlm build of
prism-ml/Ternary-Bonsai-1.7B-unpacked,
targeting the mobile GPU accelerator.
What this actually is
A structurally complete LiteRT-LM bundle carrying 1-bit weights. It is well-formed in every respect a working bundle is:
| Size | 550,727,634 B (551 MB) |
| Format | .litertlm, LiteRT-LM 1.5.0 |
| Sections | 4 β LlmMetadataProto, 2Γ TFLiteModel, HF_Tokenizer_Zlib |
| Context | 4096 |
| Model type | qwen3 |
| Chat template | Bonsai's own, reasoning block intact |
| Sampling | TOP_P, k=20, p=0.85, temperature=0.5 |
For scale: the INT2 build of the same model at the same context is 766 MB. This is 551 MB, about 72% of it.
What's missing
The weights are 1-bit. The GPU accelerator has no matmul kernel that consumes 1-bit weights β its sub-byte path handles INT4 and INT2. Until such a kernel exists, the bundle loads into a runtime that has nothing to run it with.
That's the whole gap. It is a kernel problem, not a format, packaging, or quantization problem β which is precisely why this is published: the bundle is the part that already works.
Ternary already got its kernel
This is not a hypothetical ask. One bit-width up, the work has already been done:
In YNNPACK, int2 is enum value 0 β
the first entry in the type system β and it is consumed by the dot kernel
(ynnpack/kernels/dot/dot.cc) with NEON, AVX-512 and WASM SIMD implementations.
1-bit has none of that. There is no int1 or uint1 type anywhere in YNNPACK, and no INT1
matmul in the LiteRT GPU backend.
So the gap is exactly one bit-width wide, and somebody has already walked this path one step above it.
Why publish something that doesn't run
To make someone want to write the kernel.
A 1.7B model at 551 MB, already packaged and ready to load, is a more interesting thing to point a new kernel at than a hypothesis is. Everything upstream of the kernel is finished here β quantization, packaging, metadata, tokenizer, chat template. If you write an INT1 matmul for the LiteRT GPU backend, this file is waiting for it.
Provenance and licensing
- Base model:
prism-ml/Ternary-Bonsai-1.7B-unpacked, Apache-2.0 - Built from Qwen3-1.7B, Copyright 2024 Alibaba Cloud, Apache-2.0
- Quantized and repackaged derivative. No weights were retrained.
Created using Bonsai by Prism ML.
Training data: None was used here. This is a post-training quantization and repackaging of the released Bonsai checkpoint; no additional training, fine-tuning, or calibration data was involved. For the base model's training data, see the upstream Prism ML and Qwen3 model cards.
PII: No dataset was collected, processed, or shipped as part of this conversion, so no personally identifiable information is present in this artifact beyond whatever the upstream released weights already encode.
- Downloads last month
- 64
Model tree for litert-community/1Bit-Bonsai-1.7B-PoC
Base model
prism-ml/Ternary-Bonsai-1.7B-unpacked