Downloads · 30 days
11
3% of all-time downloads
sahilchachra/supra-router-51m-mxfp4-mlx
supra-router-51m-mxfp4-mlx is a text generation model from sahilchachra. 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.
MLX MX FP4 (micro-scaled 4-bit float) quantization of SupraLabs/Supra-Router-51M, converted with mlx-lm.
Downloads · 30 days
11
3% of all-time downloads
All-time downloads
435
Public
Parameters
51.8M
27.6 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors27.6 MB · 92%
How the weights are stored.
U3251.8M · 100%
From the Hugging Face model README
MLX MX FP4 (micro-scaled 4-bit float) quantization of SupraLabs/Supra-Router-51M, converted with mlx-lm.
Supra-Router-51M is an ultra-lightweight (51.7M param) infrastructure routing model. Given a user prompt, it predicts whether the request should be handled by a local edge SLM or triaged to a cloud-hosted frontier model, via a multi-task decision sequence (domain, complexity, math/code flags, then the final route).
| Base model | Supra-Router-51M (Llama arch, ~51.7M params) |
| Quantization | MX FP4 (micro-scaled 4-bit float) |
| Bits per weight | 4.253 |
| Disk size | 28 MB (from ~101 MB fp16) |
| Format | MLX (safetensors) |
from mlx_lm import load, generate
model, tokenizer = load("sahilchachra/supra-router-51m-mxfp4-mlx")
prompt = "Task: Write a movie script about a chef who gets lost at sea.\nAnalysis: "
out = generate(model, tokenizer, prompt=prompt, max_tokens=100, verbose=False)
print(out)
This model does not use a chat template — wrap the raw user query in the training-time framing tokens shown above (Task: [prompt]\nAnalysis: ). It emits a deterministic, pipe-separated telemetry string:
Domain: [Semantic Field] | Complexity: [1-5] | Math: [True/False] | Code: [True/False] | Route: [small model/big model] | Justification: [...]
CLI:
mlx_lm.generate --model sahilchachra/supra-router-51m-mxfp4-mlx \
--prompt "Task: Explain quantum entanglement.\nAnalysis: " \
--max-tokens 100
50 prompts sampled (seed=42) from the model's own training data, SupraLabs/Prompt-Routing-Dataset (992 rows total), scored against the dataset's ground-truth routing_choice/math_task/coding_task/complexity_score labels. Each variant loaded fresh via mlx_lm.load and run through mlx_lm.generate with greedy decoding, parsing the model's own pipe-separated output.
| Variant | Route accuracy | Math flag accuracy | Code flag accuracy | Complexity exact-match | Agreement with FP16 |
|---|---|---|---|---|---|
| fp16 | 98% | 100% | 100% | 92% | — |
| mxfp4 | 94% | 100% | 100% | 84% | 96% |
| mxfp8 | 94% | 98% | 100% | 88% | 96% |
Verified against the model's documented "keyword-trap evasion" example plus a code-routing example, run through mlx_lm.generate on all variants:
Prompt: "Task: Write a movie script about a chef who gets lost at sea.\nAnalysis: "
Output: Domain: Film scripting | Complexity: 2 | Math: False | Code: False | Route: small model | ...
Prompt: "Task: Write a Python function to compute the nth Fibonacci number using dynamic programming.\nAnalysis: "
Output: Domain: Programming | Complexity: 2 | Math: False/True | Code: True | Route: big model | ...
Both quantized variants reproduce the same routing decision (Route: small model / Route: big model) as the FP16 original on both prompts — the compression preserves the model's core routing behavior.