Downloads · 30 days
320
100% of all-time downloads
RolanDorisTech/Qwen3.8-4B-Distill-MLX-4bit
Qwen3.8-4B-Distill-MLX-4bit is a machine learning model from RolanDorisTech. 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.
MLX-native quantized version of Qwen3.8-4B-Distill, built with oMLX Universal Dynamic Quantization (oQe). Standard mlx-lm safetensors — format-compatible with mlx-lm, oMLX, LM Studio, and mlx-swift.
Downloads · 30 days
320
100% of all-time downloads
All-time downloads
320
Public
Parameters
4.2B
2.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
How the weights are stored.
U324.2B · 100%
From the Hugging Face model README
MLX-native quantized version of Qwen3.8-4B-Distill, built with oMLX Universal Dynamic Quantization (oQe). Standard mlx-lm safetensors — format-compatible with mlx-lm, oMLX, LM Studio, and mlx-swift.
At a glance: 2.3GB · 65.4 tok/s · 2.684 GB peak on M1 Max · 4-bit oQe
Quantized and benchmarked by RolanDorisTech on an M1 Max —<br> more on YouTube: Local AI Made Easy.
| Size | 2.3GB |
| Quant | oQ4e (mixed + activation-importance) |
| Base | empero-ai/Qwen3.8-4B-Distill (Qwen/Qwen3.5-4B architecture) |
| Context | 262,144 tokens native |
| License | Apache-2.0 |
| Format | MLX safetensors (mlx-lm, oMLX, LM Studio, mlx-swift) |
| YouTube | Local AI Made Easy — @RolanDorisTech |
oQ measures each layer's real quantization sensitivity and allocates bits accordingly, instead of a flat uniform budget. oQe adds activation-importance weighting (imatrix) on top.
<details> <summary>Full methodology, benchmarks, and research citations</summary>Not all weights matter equally. Layers like lm_head, token embeddings, and the first and last transformer blocks are disproportionately sensitive: a small quantization error there can distort the output distribution and degrade reasoning. Other layers tolerate much more aggressive compression with little effect.
Conventional uniform quantization uses a largely fixed precision policy, whereas oQ measures layer sensitivity and allocates a mixed-precision budget accordingly.
oQ replaces that flat budget with a measured one. It runs calibration data through the model, measures each layer's real sensitivity to quantization error, and allocates more bits to layers where error hurts most and fewer bits where it doesn't.
oQe goes further: it adds an activation-importance calibration pass and uses per-channel activation statistics (an imatrix) to weight quantization error, giving greater importance to errors on channels that matter more during calibration.
Why it matters (published oMLX benchmark on Qwen3.5-35B-A3B, MMLU, 300 samples):
| Bits | Uniform Q (mlx-lm) | oQ |
|---|---|---|
| 2-bit | 14.0% | 64.0% |
| 3-bit | 76.3% | 85.0% |
| 4-bit | 79.7% | 83.3% |
The 2-bit uniform result was substantially lower in this test.
Note: This benchmark evaluates oQ on Qwen3.5-35B-A3B; it documents the oQ methodology and is not a quality benchmark for these oQe Qwen3.8 Distill models.
For full methodology see: https://github.com/jundot/omlx/blob/main/docs/oQ_Quantization.md
Related quantization research also shows that sensitivity- and activation-aware weighting can improve weight-only quantization results:
imatrix_mse observer, reduces WikiText-2 perplexity on Llama-3.1-8B (W4A16) from 6.96 to 6.85, and to 6.83 with GPTQ. Docs: https://docs.vllm.ai/projects/llm-compressor/en/latest/examples/imatrix/The takeaway: in this specific MMLU test, oQ achieved higher accuracy than uniform quantization at the same nominal bit width. This benchmark is on Qwen3.5-35B-A3B and documents the oQ methodology; it is not a quality benchmark for these Qwen3.8 Distill oQe models.
Output is standard MLX safetensors — format-compatible with mlx-lm, oMLX, LM Studio, and mlx-swift. Runtime compatibility should be verified against the specific application/version.
These Qwen3.8 Distill models in this release use oQe.
</details>Install:
pip install mlx-lm
Or if you use uv:
uv pip install mlx-lm
Generate:
mlx_lm.generate --model RolanDorisTech/Qwen3.8-4B-Distill-MLX-4bit --prompt "Explain oQ vs oQe" --max-tokens 250 --temp 0.6 --top-p 0.95 --top-k 20
LM Studio: Search and download RolanDorisTech/Qwen3.8-4B-Distill-MLX-4bit
Prompt format uses Qwen3 chat template with <think> tags. chat_template.jinja is included.
All three sizes are community <u>distills</u> of Qwen/Qwen3.8-2.4T-A95B into Qwen3.5 architecture, NOT official Alibaba releases.
| Variant | Size | Base | Traces | Base Distill |
|---|---|---|---|---|
| 2B-oQ4e | 1.1GB | 2B | ~30,000 | empero-ai/Qwen3.8-2B-Distill |
| 2B-oQ8e | 1.9GB | 2B | ~30,000 | empero-ai/Qwen3.8-2B-Distill |
| 4B-oQ4e | 2.3GB | 4B | ~45,000 | empero-ai/Qwen3.8-4B-Distill (this model) |
| 4B-oQ8e | 4.2GB | 4B | ~45,000 | empero-ai/Qwen3.8-4B-Distill |
| 9B-oQ4e | 4.9GB | 9B | ~70,000 | empero-ai/Qwen3.8-9B-Distill |
| 9B-oQ5e | 6.0GB | 9B | ~70,000 | empero-ai/Qwen3.8-9B-Distill |
| 9B-oQ6e | 7.0GB | 9B | ~70,000 | empero-ai/Qwen3.8-9B-Distill |
| 9B-oQ8e | 8.9GB | 9B | ~70,000 | empero-ai/Qwen3.8-9B-Distill |
Note: This is a <u>community distillation</u>, NOT an official Alibaba/Qwen release.
Local measurement by RolanDorisTech on M1 Max 64GB; not an upstream Empero or Qwen benchmark.
(Accuracy benchmarks to come — community evaluations like MMLU, GSM8K, HumanEval etc. will be published in a future update when time allows; current numbers are local speed only. Planning to queue overnight in oMLX with extended thinking ON.)
Test prompt: "Q: If 2x + 3 = 11, what is x? Think step by step inside <think> tags." — Result correct x=4, preserved.
For this Qwen3.8-4B-Distill-MLX-4bit model: 37 tokens prompt at 133.7 tok/s, 65.4 tok/s gen, peak 2.684 GB
| Variant | Size | Prompt tok/s | Gen tok/s | Peak Mem | Quant Time |
|---|---|---|---|---|---|
| 2B-oQ4e | 1.1GB | 267.7 | 118.6 | 1.241 | 1m43s |
| 2B-oQ8e | 1.9GB | 122.2 | 97.5 | 2.131 | 43s |
| 4B-oQ4e | 2.3GB | 133.7 | 65.4 | 2.684 | 4m01s |
| 4B-oQ8e | 4.2GB | 130.9 | 48.4 | 4.651 | 1m46s |
| 9B-oQ4e | 4.9GB | 101.5 | 43.0 | 5.471 | 7m23s |
| 9B-oQ5e | 6.0GB | 91.3 | 37.1 | 6.555 | 3m20s |
| 9B-oQ6e | 7.0GB | 84.3 | 33.3 | 7.664 | 3m21s |
| 9B-oQ8e | 8.9GB | 91.8 | 28.7 | 9.679 | 3m24s |
Note: This model is quantized from empero-ai/Qwen3.8-4B-Distill, a community model developed by Empero, not from an official Alibaba/Qwen 4B checkpoint.
For full lineage: https://huggingface.co/empero-ai/Qwen3.8-4B-Distill
The Qwen3.8 open-model releases documented by Qwen include Qwen/Qwen3.8-2.4T-A95B and Qwen/Qwen3.8-27B; this release should not be described as an Alibaba/Qwen "Qwen3.8-4B" checkpoint.
Accuracy benchmarks (MMLU, GSM8K, etc.) for these specific released models have not been run yet — only inference speed above is measured. Benchmarking is planned but takes significant compute time per model; results will be added when available.
Distilled reasoning model. May hallucinate. Lossy relative to BF16. Quantization quality depends on model, quantization level, and calibration; no direct same-size accuracy comparison with uniform g32/g64 is claimed here.
Text-trained/fine-tuned; vision behavior is inherited from the Qwen3.5 base and was not evaluated for this release.
Native context: 262,144 tokens inherited from Qwen3.5; practical usable context depends on the inference runtime, KV-cache implementation, and available memory.
Methodology:
Base model lineage:
Official Qwen releases:
More from YouTube series Local AI Made Easy — @RolanDorisTech