Downloads · 30 days
18
10% of all-time downloads
sahilchachra/supra-50m-instruct-optiq-5bpw-mlx
supra-50m-instruct-optiq-5bpw-mlx is a machine learning model from sahilchachra. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as apache-2.0.
MLX quantization of SupraLabs/Supra-50M-Instruct for Apple Silicon.
Downloads · 30 days
18
10% of all-time downloads
All-time downloads
188
Public
Parameters
51.8M
41.8 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors41.8 MB · 95%
How the weights are stored.
U3251.8M · 100%
From the Hugging Face model README
MLX quantization of SupraLabs/Supra-50M-Instruct for Apple Silicon.
Variant: OptiQ mixed-precision (target 5.0 bpw)
Disk size: 42 MB
Quantized by: sahilchachra
Unlike uniform 4-bit quantization (which forces every layer onto the same bit grid and often collapses reasoning at low bit widths), this model was quantized with mlx-optiq using per-layer KL-sensitivity analysis:
lm_head, and a few middle blocks) get more bits; layers that tolerate aggressive quantization get fewer.optiq_mixed_precision (mlx-optiq)bf1684 quantizable components total. OptiQ allocated bits non-uniformly based on KL sensitivity:
| Bits | Components | Share |
|---|---|---|
| 8-bit | 14 | 16.7% |
| 6-bit | 26 | 31.0% |
| 4-bit | 44 | 52.4% |
| Total | 84 | 100.0% |
Components kept at 8-bit (most sensitive to quantization):
model.layers.11.mlp.up_projmodel.layers.11.mlp.down_projmodel.layers.11.mlp.gate_projmodel.layers.11.self_attn.o_projmodel.layers.11.self_attn.v_projmodel.layers.11.self_attn.k_projmodel.layers.11.self_attn.q_projmodel.layers.0.mlp.up_projmodel.layers.0.mlp.down_projmodel.layers.0.mlp.gate_projmodel.layers.0.self_attn.o_projmodel.layers.0.self_attn.v_projmodel.layers.0.self_attn.k_projmodel.layers.0.self_attn.q_projNotice the pattern: the MoE feed-forward gates dominate the top tier. Gate weights pick which experts run for every token — small numerical drift here changes routing decisions and compounds through the rest of the network, so OptiQ pays the bits to keep them precise while compressing the experts themselves more aggressively.
Evaluated on Apple M4 Pro with MLX. Model loaded once; performance and quality measured in a single pass.
| This model | Naive 8-bit | FP16 baseline | |
|---|---|---|---|
| Decode tok/s (avg, long traces) | 1587.34 | 1157.12 | 1270.13 |
| Peak memory (GB) | 0.141 | 0.154 | 0.223 |
| Disk size (MB) | 42 | 55 | 201 |
| Benchmark | This model | Naive 8-bit | FP16 baseline | n |
|---|---|---|---|---|
| IFEval (instruction following) | 13.6% | 13.6% | 15.9% | 44 |
| Alpaca-cleaned (instruct F1 vs reference) | 34.6 | 37.5 | 36.2 | 50 |
| Context length | Decode tok/s |
|---|---|
| ~128 tokens | 1586.2 |
| ~256 tokens | 1584.5 |
| ~512 tokens | 1586.1 |
| ~1024 tokens | 1592.6 |
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("sahilchachra/supra-50m-instruct-optiq-5bpw-mlx")
response = generate(model, tokenizer, prompt="Your prompt here", max_tokens=256, verbose=True)
| Model | Variant |
|---|---|
| sahilchachra/supra-50m-instruct-8bit-mlx | Affine int8 |
| sahilchachra/supra-50m-instruct-optiq-5bpw-mlx | OptiQ mixed-precision (target 5.0 bpw) ← this model |
See SupraLabs/Supra-50M-Instruct for full model details and intended use.