初始化项目,由ModelHub XC社区提供模型
Model: MiaoMint/Ternary-Bonsai-1.7B-gguf Source: Original Platform
This commit is contained in:
7
.eval_results/gsm8k.yaml
Normal file
7
.eval_results/gsm8k.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
- dataset:
|
||||
id: openai/gsm8k
|
||||
task_id: gsm8k
|
||||
value: 74.2
|
||||
source:
|
||||
url: https://huggingface.co/prism-ml/Bonsai-8B-gguf
|
||||
name: Model Card
|
||||
40
.gitattributes
vendored
Normal file
40
.gitattributes
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||
Ternary-Bonsai-1.7B-F16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Ternary-Bonsai-1.7B-Q2_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Ternary-Bonsai-1.7B-TQ1_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Ternary-Bonsai-1.7B-TQ2_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
177
LICENSE
Normal file
177
LICENSE
Normal file
@@ -0,0 +1,177 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
4
NOTICE.txt
Normal file
4
NOTICE.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
This software is copyright 2026-present Prism ML, Inc. It is available under the Apache 2.0 license.
|
||||
If you publicly deploy or redistribute this software, we would appreciate attribution such as: “Created using Bonsai by Prism ML."
|
||||
|
||||
This software is built from Qwen3-1.7B, Copyright 2024 Alibaba Cloud, which is available under the Apache 2.0 License: https://huggingface.co/Qwen/Qwen3-1.7B/blob/main/LICENSE
|
||||
175
README.md
Normal file
175
README.md
Normal file
@@ -0,0 +1,175 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
library_name: gguf
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- ternary
|
||||
- 1.58-bit
|
||||
- gguf
|
||||
- llama-cpp
|
||||
- q2_0
|
||||
- on-device
|
||||
- prismml
|
||||
- bonsai
|
||||
base_model:
|
||||
- prism-ml/Ternary-Bonsai-1.7B-unpacked
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<img src="./assets/bonsai-logo.svg" width="280" alt="Bonsai">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://prismml.com"><b>Prism ML Website</b></a> |
|
||||
<a href="https://github.com/PrismML-Eng/Bonsai-demo/blob/main/ternary-bonsai-8b-whitepaper.pdf"><b>White Paper</b></a> |
|
||||
<a href="https://github.com/PrismML-Eng/Bonsai-demo"><b>Demo & Examples</b></a> |
|
||||
<a href="https://discord.gg/prismml"><b>Discord</b></a>
|
||||
</p>
|
||||
|
||||
# Ternary-Bonsai-1.7B-gguf
|
||||
|
||||
Ternary (1.58-bit) language model in GGUF Q2_0 format for `llama.cpp`
|
||||
|
||||
<p align="center">
|
||||
<img src="./assets/frontier.svg" width="680" alt="Pareto Frontier">
|
||||
</p>
|
||||
|
||||
## Resources
|
||||
|
||||
- **[White Paper](https://github.com/PrismML-Eng/Bonsai-demo/blob/main/ternary-bonsai-8b-whitepaper.pdf)**
|
||||
- **[Demo repo](https://github.com/PrismML-Eng/Bonsai-demo)** — examples for serving, benchmarking, and integrating Bonsai
|
||||
- **[Discord](https://discord.gg/prismml)** — community support and updates
|
||||
- **Kernels**: Q2_0 is not yet in mainline `llama.cpp`. Use our fork at [PrismML-Eng/llama.cpp](https://github.com/PrismML-Eng/llama.cpp) (`prism` branch, default) which adds Q2_0 support for CPU (NEON/generic) and Metal. Upstream PR coming soon.
|
||||
|
||||
## Model Overview
|
||||
|
||||
| Item | Specification |
|
||||
| :--------------- | :----------------------------------------------------------------------- |
|
||||
| Base model | Qwen3-1.7B |
|
||||
| Parameters | 1.72B |
|
||||
| Architecture | GQA, SwiGLU MLP, RoPE, RMSNorm |
|
||||
| Context length | 32,768 tokens |
|
||||
| Vocab size | 151,936 |
|
||||
| Weight format | GGUF Q2_0 g128: {-1, 0, +1} with FP16 group-wise scaling |
|
||||
| Packed Q2_0 size | **436 MiB** (0.46 GB) |
|
||||
| Ternary coverage | Embeddings, attention projections, MLP projections, LM head |
|
||||
| License | Apache 2.0 |
|
||||
|
||||
## Quantization Format: GGUF Q2_0 (g128)
|
||||
|
||||
Each weight takes a value from {-1, 0, +1}, with one shared FP16 scale per group of 128 weights:
|
||||
|
||||
```
|
||||
w_i = scale_g * t_i, t_i in {-1, 0, +1}
|
||||
```
|
||||
|
||||
Q2_0 encodes each weight as a 2-bit code `q in {0, 1, 2, 3}`, dequantized via `w = (q - 1) * scale`. One 128-element block is 34 bytes (2 bytes FP16 scale + 32 bytes of packed 2-bit codes) for an effective **2.125 bits/weight**. The fourth code point (`q = 3`, reconstructing to `+2 * scale`) is reserved for future extensions; for ternary weights it is unused.
|
||||
|
||||
### Memory
|
||||
|
||||
| Format | Size | Reduction | Ratio |
|
||||
| :---------------- | ----------: | --------: | ---------: |
|
||||
| FP16 | 3.44 GB | -- | 1.0x |
|
||||
| **GGUF Q2_0 g128**| **436 MiB** (0.46 GB) | **86.6%** | **7.5x** |
|
||||
|
||||
## Files in this repo
|
||||
|
||||
| File | Format | Size | Recommended |
|
||||
| :-------------------------------- | :----- | -----: | :---------- |
|
||||
| `Ternary-Bonsai-1.7B-F16.gguf` | FP16 | 3.44 GB | baseline / re-quantization source |
|
||||
| `Ternary-Bonsai-1.7B-Q2_0.gguf` | Q2_0 (g128) | 442 MB | **recommended** (lossless for ternary) |
|
||||
|
||||
## Quickstart
|
||||
|
||||
### Build from the Prism fork
|
||||
|
||||
```bash
|
||||
git clone https://github.com/PrismML-Eng/llama.cpp
|
||||
cd llama.cpp
|
||||
cmake -B build -DGGML_METAL=ON # or -DGGML_CUDA=ON, -DGGML_VULKAN=ON
|
||||
cmake --build build -j
|
||||
```
|
||||
|
||||
### `llama.cpp` CLI
|
||||
|
||||
```bash
|
||||
./build/bin/llama-cli \
|
||||
-m Ternary-Bonsai-1.7B-Q2_0.gguf \
|
||||
-p "Explain quantum computing in simple terms." \
|
||||
-n 256
|
||||
```
|
||||
|
||||
### `llama.cpp` server
|
||||
|
||||
```bash
|
||||
./build/bin/llama-server -m Ternary-Bonsai-1.7B-Q2_0.gguf -c 4096
|
||||
```
|
||||
|
||||
|
||||
## Throughput (llama.cpp, Apple M4 Pro 48 GB)
|
||||
|
||||
| Backend | PP512 (tok/s) | TG128 (tok/s) | FP16 TG (tok/s) | Speedup |
|
||||
| :--------------- | ------------: | ------------: | ---------------: | ---------: |
|
||||
| Metal (GPU) | 2,088 | **229** | 60 | **3.8x** |
|
||||
| NEON CPU (10 t) | 508 | **123** | — | — |
|
||||
|
||||
Flags: `-ngl 99 -fa 1` for Metal; `-ngl 0 -fa 1 -t 10` for CPU.
|
||||
|
||||
## Fidelity (Q2_0 vs FP16 baseline)
|
||||
|
||||
Measured on wikitext-2 (20 chunks, context 512) via `llama-perplexity --kl-divergence`:
|
||||
|
||||
| Metric | Value |
|
||||
| :------------------ | ---------: |
|
||||
| Mean KL | 0.000000 |
|
||||
| Top-1 agreement | 100.000 % |
|
||||
| RMS Δp | 0.015 % |
|
||||
| PPL ratio (Q/base) | 1.0048 |
|
||||
|
||||
Q2_0 is effectively lossless for ternary weights — the ternary values land exactly on three of the four 2-bit code points.
|
||||
|
||||
## Benchmarks
|
||||
|
||||
Evaluated with EvalScope v1.4.2 + vLLM 0.15.1 on NVIDIA H100. Full benchmark suite:
|
||||
|
||||
| Model | Size | Avg | MMLU-R | MuSR | IFEval | GSM8K | HE+ | BFCLv3 |
|
||||
| :-------------------------- | ----------: | --------: | -----: | ---: | -----: | ----: | ---: | -----: |
|
||||
| **Ternary Bonsai 1.7B** | **0.44 GB** | **58.47** | 52.9 | 50.8 | 70.1 | 74.2 | 51.8 | 51.0 |
|
||||
| *1-bit Bonsai 1.7B (prior)* | *0.24 GB* | *49.60* | 43.2 | 45.1 | 63.0 | 66.3 | 45.1 | 34.9 |
|
||||
| Qwen3 1.7B | 3.44 GB | **66.57** | 66.8 | 50.1 | 70.3 | 83.1 | 57.3 | 71.8 |
|
||||
| Qwen3 0.6B | 1.19 GB | **48.02** | 47.5 | 41.5 | 62.8 | 64.1 | 30.5 | 41.7 |
|
||||
| LFM2 1.2B | 2.34 GB | **46.73** | 52.9 | 25.4 | 77.5 | 62.2 | 36.0 | 26.4 |
|
||||
| Gemma3 1B | 2.00 GB | **45.53** | 43.2 | 37.0 | 61.9 | 64.4 | 40.2 | 26.5 |
|
||||
| Llama 3.2 1B | 2.47 GB | **39.88** | 47.2 | 29.2 | 47.7 | 49.0 | 35.4 | 30.8 |
|
||||
|
||||
## Intelligence Density
|
||||
|
||||
```
|
||||
density = -ln(1 - score/100) / size_GB
|
||||
```
|
||||
|
||||
| Model | Size | Intelligence Density (1/GB) |
|
||||
| :-------------------------- | ----------: | --------------------------: |
|
||||
| **Ternary Bonsai 1.7B** | **0.44 GB** | **2.001** |
|
||||
| *1-bit Bonsai 1.7B (prior)* | *0.24 GB* | *2.832* |
|
||||
| Qwen3 0.6B | 1.19 GB | 0.549 |
|
||||
| Qwen3 1.7B | 3.44 GB | 0.318 |
|
||||
| Gemma3 1B | 2.00 GB | 0.304 |
|
||||
| LFM2 1.2B | 2.34 GB | 0.269 |
|
||||
| Llama 3.2 1B | 2.47 GB | 0.206 |
|
||||
|
||||
## Citation
|
||||
|
||||
```bibtex
|
||||
@techreport{ternarybonsai,
|
||||
title = {Ternary Bonsai: 1.58-bit Language Models at 8B, 4B, and 1.7B Scale},
|
||||
author = {Prism ML},
|
||||
year = {2026},
|
||||
month = {April},
|
||||
url = {https://prismml.com}
|
||||
}
|
||||
```
|
||||
|
||||
## Contact
|
||||
|
||||
For questions, feedback, or collaboration inquiries: **contact@prismml.com**
|
||||
3
Ternary-Bonsai-1.7B-F16.gguf
Normal file
3
Ternary-Bonsai-1.7B-F16.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:00be231b1ba8ab8b45db35d288f897fa9b5836bb6ad41762b759b6bc990b4fea
|
||||
size 3446249408
|
||||
3
Ternary-Bonsai-1.7B-Q2_0.gguf
Normal file
3
Ternary-Bonsai-1.7B-Q2_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d97d94eb564590c9f0300e54d3f87bbbb25a78693d0ade9f6e177973dcb8228a
|
||||
size 463290464
|
||||
1
assets/bonsai-logo.svg
Normal file
1
assets/bonsai-logo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="24" height="15" viewBox="0 0 24 15" fill="none" xmlns="http://www.w3.org/2000/svg"><style>path{fill:#000}@media(prefers-color-scheme:dark){path{fill:#fff}}</style><path d="M15.1304 6.25864H12L14.087 10.4311L6.78261 14.6035H16.1739L20.3478 10.4311L15.1304 6.25864Z"/><path d="M16.7826 6.25866H24V8.34488H19.4022L16.7826 6.25866Z"/><path d="M0 6.25866H10.837L11.8804 8.34488H0V6.25866Z"/><path d="M5.21739 3.12933H20.8696V5.21555H5.21739V3.12933Z"/><path d="M10.4348 0H17.7391V2.08622H10.4348V0Z"/></svg>
|
||||
|
After Width: | Height: | Size: 515 B |
BIN
assets/frontier.png
Normal file
BIN
assets/frontier.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
172
assets/frontier.svg
Normal file
172
assets/frontier.svg
Normal file
@@ -0,0 +1,172 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1500" height="680" viewBox="0 0 1500 680">
|
||||
<style>
|
||||
.bg { fill: #ede9e4; }
|
||||
.title { fill: #2d2a27; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-weight: 700; font-size: 28px; }
|
||||
.subtitle { fill: #6a6560; font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace; font-size: 14px; }
|
||||
.separator { stroke: #c5c0ba; }
|
||||
.grid { stroke: #d5d0ca; stroke-width: 0.8; }
|
||||
.axis { stroke: #2d2a27; stroke-width: 1.2; }
|
||||
.tick-label { fill: #6a6560; font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace; font-size: 13px; }
|
||||
.axis-label { fill: #6a6560; font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace; font-size: 13px; }
|
||||
.square-marker { fill: #d4b0b3; fill-opacity: 0.45; stroke: #a07578; stroke-width: 2; }
|
||||
.bonsai-fill { fill: #2d2a27; }
|
||||
.bonsai-label { fill: #2d2a27; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-weight: 700; font-size: 14px; }
|
||||
.prior-fill { fill: #2d2a27; }
|
||||
.prior-label { fill: #2d2a27; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-weight: 700; font-size: 14px; }
|
||||
.model-label { fill: #8a7072; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 12px; }
|
||||
.prior-line { stroke: #c0a8ab; stroke-width: 2; stroke-dasharray: 8 5; fill: none; }
|
||||
.bonsai-line { stroke: #2d2a27; stroke-width: 2.5; stroke-dasharray: 8 5; fill: none; }
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.bg { fill: #1e1c1b; }
|
||||
.title { fill: #e8e4e0; }
|
||||
.subtitle { fill: #a09890; }
|
||||
.separator { stroke: #3a3634; }
|
||||
.grid { stroke: #2e2b29; }
|
||||
.axis { stroke: #a09890; }
|
||||
.tick-label { fill: #a09890; }
|
||||
.axis-label { fill: #a09890; }
|
||||
.square-marker { fill: #d4b0b3; fill-opacity: 0.35; stroke: #a07578; }
|
||||
.bonsai-fill { fill: #e8e4e0; }
|
||||
.bonsai-label { fill: #e8e4e0; }
|
||||
.prior-fill { fill: #e8e4e0; }
|
||||
.prior-label { fill: #e8e4e0; }
|
||||
.model-label { fill: #b89498; }
|
||||
.prior-line { stroke: #7a6568; }
|
||||
.bonsai-line { stroke: #e8e4e0; }
|
||||
}
|
||||
</style>
|
||||
|
||||
<defs>
|
||||
<symbol id="bonsai-icon" viewBox="0 0 24 14.6035">
|
||||
<path d="M15.1304 6.25864H12L14.087 10.4311L6.78261 14.6035H16.1739L20.3478 10.4311L15.1304 6.25864Z"/>
|
||||
<path d="M16.7826 6.25866H24V8.34488H19.4022L16.7826 6.25866Z"/>
|
||||
<path d="M0 6.25866H10.837L11.8804 8.34488H0V6.25866Z"/>
|
||||
<path d="M5.21739 3.12933H20.8696V5.21555H5.21739V3.12933Z"/>
|
||||
<path d="M10.4348 0H17.7391V2.08622H10.4348V0Z"/>
|
||||
</symbol>
|
||||
</defs>
|
||||
|
||||
<!-- Background -->
|
||||
<rect width="1500" height="680" class="bg" />
|
||||
|
||||
<!-- Title and subtitle -->
|
||||
<text x="68" y="48" class="title">Frontier efficiency</text>
|
||||
<text x="68" y="72" class="subtitle">Average score (IFEval, GSM8K, HumanEval+, BFCL, MuSR, MMLU-Redux)</text>
|
||||
|
||||
<!-- Separator -->
|
||||
<line x1="68" y1="85" x2="1440" y2="85" class="separator" stroke-width="1" />
|
||||
|
||||
<!--
|
||||
pixelX(v) = 130 + (ln(v) + 1.8971) / 5.1160 * 1300
|
||||
pixelY(v) = 570 - (v - 35) * 9.1
|
||||
|
||||
Ternary: (0.37,57.47)→(359,366) (0.86,70.65)→(574,246) (1.75,75.48)→(755,202)
|
||||
1-bit: (0.25,49.30)→(260,440) (0.575,61.6)→(472,328) (1.15,70.5)→(648,247)
|
||||
-->
|
||||
|
||||
<!-- Vertical grid lines -->
|
||||
<line x1="260" y1="115" x2="260" y2="570" class="grid" />
|
||||
<line x1="436" y1="115" x2="436" y2="570" class="grid" />
|
||||
<line x1="612" y1="115" x2="612" y2="570" class="grid" />
|
||||
<line x1="788" y1="115" x2="788" y2="570" class="grid" />
|
||||
<line x1="964" y1="115" x2="964" y2="570" class="grid" />
|
||||
<line x1="1141" y1="115" x2="1141" y2="570" class="grid" />
|
||||
<line x1="1317" y1="115" x2="1317" y2="570" class="grid" />
|
||||
|
||||
<!-- Axes -->
|
||||
<line x1="130" y1="570" x2="1430" y2="570" class="axis" />
|
||||
<line x1="130" y1="115" x2="130" y2="570" class="axis" />
|
||||
|
||||
<!-- Y-axis tick labels -->
|
||||
<text x="118" y="529" text-anchor="end" class="tick-label">40</text>
|
||||
<text x="118" y="438" text-anchor="end" class="tick-label">50</text>
|
||||
<text x="118" y="347" text-anchor="end" class="tick-label">60</text>
|
||||
<text x="118" y="256" text-anchor="end" class="tick-label">70</text>
|
||||
<text x="118" y="165" text-anchor="end" class="tick-label">80</text>
|
||||
|
||||
<!-- Y-axis small ticks -->
|
||||
<line x1="125" y1="525" x2="130" y2="525" class="axis" />
|
||||
<line x1="125" y1="434" x2="130" y2="434" class="axis" />
|
||||
<line x1="125" y1="343" x2="130" y2="343" class="axis" />
|
||||
<line x1="125" y1="252" x2="130" y2="252" class="axis" />
|
||||
<line x1="125" y1="161" x2="130" y2="161" class="axis" />
|
||||
|
||||
<!-- X-axis tick labels -->
|
||||
<text x="260" y="595" text-anchor="middle" class="tick-label">0.25 GB</text>
|
||||
<text x="436" y="595" text-anchor="middle" class="tick-label">0.5 GB</text>
|
||||
<text x="612" y="595" text-anchor="middle" class="tick-label">1 GB</text>
|
||||
<text x="788" y="595" text-anchor="middle" class="tick-label">2 GB</text>
|
||||
<text x="964" y="595" text-anchor="middle" class="tick-label">4 GB</text>
|
||||
<text x="1141" y="595" text-anchor="middle" class="tick-label">8 GB</text>
|
||||
<text x="1317" y="595" text-anchor="middle" class="tick-label">16 GB</text>
|
||||
|
||||
<!-- X-axis small ticks -->
|
||||
<line x1="260" y1="570" x2="260" y2="575" class="axis" />
|
||||
<line x1="436" y1="570" x2="436" y2="575" class="axis" />
|
||||
<line x1="612" y1="570" x2="612" y2="575" class="axis" />
|
||||
<line x1="788" y1="570" x2="788" y2="575" class="axis" />
|
||||
<line x1="964" y1="570" x2="964" y2="575" class="axis" />
|
||||
<line x1="1141" y1="570" x2="1141" y2="575" class="axis" />
|
||||
<line x1="1317" y1="570" x2="1317" y2="575" class="axis" />
|
||||
|
||||
<!-- Axis labels -->
|
||||
<text x="730" y="635" text-anchor="middle" class="axis-label">Model size in GB (log scale)</text>
|
||||
<text x="52" y="343" text-anchor="middle" class="axis-label" transform="rotate(-90, 52, 343)">Average benchmark score</text>
|
||||
|
||||
<!-- Prior Pareto frontier curve (conventional models) -->
|
||||
<path d="M 521 572 L 555 541 L 585 515 L 612 492 L 656 456 L 698 424 L 747 389 L 788 361 L 845 326 L 891 300 L 926 282 L 964 263 L 1021 239 L 1067 221 L 1101 210 L 1124 203 L 1142 198 L 1170 191 L 1197 185 L 1221 180 L 1243 176 L 1264 173 L 1283 170 L 1300 168 L 1317 167 L 1323 166 L 1332 166 L 1347 165 L 1360 164 L 1373 164"
|
||||
class="prior-line" />
|
||||
|
||||
<!-- Bonsai frontier line (single line through all 6 points) -->
|
||||
<path d="M 155 480 L 780 170" class="bonsai-line" />
|
||||
|
||||
<!-- Other model squares -->
|
||||
<rect x="650" y="446" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="782" y="468" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="822" y="457" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="836" y="520" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="920" y="277" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1079" y="297" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1095" y="216" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1127" y="265" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1136" y="181" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1243" y="326" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1287" y="237" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1298" y="382" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1311" y="236" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1312" y="272" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1312" y="287" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1312" y="367" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1317" y="161" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1320" y="217" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1321" y="249" width="12" height="12" rx="1" class="square-marker" />
|
||||
<rect x="1352" y="285" width="12" height="12" rx="1" class="square-marker" />
|
||||
|
||||
<!-- 1-Bit Bonsai icons (faded prior work) -->
|
||||
<use href="#bonsai-icon" x="249" y="433" width="22" height="14" class="prior-fill" />
|
||||
<use href="#bonsai-icon" x="461" y="321" width="22" height="14" class="prior-fill" />
|
||||
<use href="#bonsai-icon" x="637" y="240" width="22" height="14" class="prior-fill" />
|
||||
|
||||
<!-- 1-Bit labels (well below their icons, clear of line) -->
|
||||
<text x="180" y="475" class="prior-label">1-Bit Bonsai 1.7B</text>
|
||||
<text x="400" y="370" class="prior-label">1-Bit Bonsai 4B</text>
|
||||
<text x="660" y="282" class="prior-label">1-Bit Bonsai 8B</text>
|
||||
|
||||
<!-- Ternary Bonsai icons -->
|
||||
<use href="#bonsai-icon" x="348" y="359" width="22" height="14" class="bonsai-fill" />
|
||||
<use href="#bonsai-icon" x="563" y="239" width="22" height="14" class="bonsai-fill" />
|
||||
<use href="#bonsai-icon" x="744" y="195" width="22" height="14" class="bonsai-fill" />
|
||||
|
||||
<!-- Ternary Bonsai labels (well above their icons, clear of line) -->
|
||||
<text x="235" y="318" class="bonsai-label">Ternary Bonsai 1.7B</text>
|
||||
<text x="445" y="208" class="bonsai-label">Ternary Bonsai 4B</text>
|
||||
<text x="655" y="155" class="bonsai-label">Ternary Bonsai 8B</text>
|
||||
|
||||
<!-- Other model labels (frontier models only) -->
|
||||
<text x="670" y="445" class="model-label">Qwen3 0.6B</text>
|
||||
<text x="940" y="280" class="model-label">Qwen3 1.7B</text>
|
||||
<text x="1115" y="215" class="model-label">Ministral3 3B</text>
|
||||
<text x="1110" y="175" class="model-label">Qwen3 4B</text>
|
||||
<text x="1337" y="160" class="model-label">Qwen3 8B</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.5 KiB |
Reference in New Issue
Block a user