Downloads · 30 days
27
29% of all-time downloads
saisaketh/TinyLlama-1.1B-Chat-armq-590MB
TinyLlama-1.1B-Chat-armq-590MB is a text generation model from saisaketh. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
A mixed-precision quantization of TinyLlama/TinyLlama-1.1B-Chat-v1.0, built with armq.
Downloads · 30 days
27
29% of all-time downloads
All-time downloads
93
Public
Parameters
1.1B
619 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors619 MB · 99%
How the weights are stored.
U321.1B · 100%
From the Hugging Face model README
A mixed-precision quantization of
TinyLlama/TinyLlama-1.1B-Chat-v1.0, built with
armq.
Rather than giving every layer the same bit-width, armq measures how sensitive each layer actually is and solves for the bit allocation that minimises quality loss subject to a hard size budget. This checkpoint occupies exactly the same bytes as a uniform 4-bit build of the same model, and scores better.
| uniform 4-bit | this model | ||
|---|---|---|---|
| Size | 590.2 MB | 590.2 MB | identical |
| bits/weight | 4.501 | 4.501 | identical |
| Perplexity ↓ | 10.6829 | 10.3416 | -3.2% |
| Generation speed | 114.2 tok/s | 122.3 tok/s | +7% |
Perplexity on 32 × 512-token windows (16352 predicted tokens) of held-out wikitext-2 test. Calibration used the train split only, so the recipe was never tuned on the text it is scored against.
Measured on Apple M2 (arm64), 8.0 GB unified memory, MLX 0.32.0, mlx-lm 0.31.3.
Generation speed changed by +7% on the test machine. Mixed precision means adjacent layers no longer share a kernel configuration, and whether that helps or hurts is architecture-dependent — it went the other way on the other model in this pair. armq optimises quality-at-size, not latency.
Loads like any MLX checkpoint — no custom code:
from mlx_lm import load, generate
model, tokenizer = load("saisaketh/TinyLlama-1.1B-Chat-armq-590MB")
print(generate(model, tokenizer, "Arm devices are", max_tokens=100))
pip install mlx-lm
mlx_lm.generate --model saisaketh/TinyLlama-1.1B-Chat-armq-590MB --prompt "Arm devices are"
2-bit x1, 3-bit x4, 4-bit x88, 5-bit x35, 6-bit x20, 8-bit x8
The full per-layer assignment ships in armq_recipe.json in this repo. It
is a few KB and reproduces this checkpoint exactly from the base model:
pip install git+https://github.com/saketh8/arm-mlx-optimizer
armq build TinyLlama/TinyLlama-1.1B-Chat-v1.0 --recipe armq_recipe.json --out ./rebuilt
The pattern armq found is not one you would guess: value projections and the output head are protected at high precision, while query, gate and up projections tolerate 3–4 bits.
Weights are a derivative of
TinyLlama/TinyLlama-1.1B-Chat-v1.0 and inherit its
apache-2.0 license. The armq tooling that produced them is MIT.
Method, benchmarks and reproduction instructions: https://github.com/saketh8/arm-mlx-optimizer