Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
Mixed-precision quantized with OptiQ — sensitivity-driven quantization for Apple Silicon
This is a mixed-precision quantized version of
Qwen/Qwen3.5-4B
in MLX format. Unlike uniform quantization (all layers at the same bit-width), OptiQ measures each layer's sensitivity and assigns optimal per-layer bit-widths, preserving model quality where it matters most.
How OptiQ Works
OptiQ is an optimizing compiler that converts PyTorch models into hardware-optimized MLX versions using data-driven mixed-precision quantization:
Sensitivity Analysis
— For each layer, OptiQ simulates quantization at each candidate bit-width and measures the KL divergence between the original and quantized output distributions. Layers that distort the distribution more are "sensitive."
Greedy Knapsack Optimization
— Starting with all layers at the minimum bit-width, OptiQ greedily upgrades the most sensitive layers to higher precision until the target bits-per-weight budget is exhausted.
Per-Layer Bit Allocation
— The result is a custom quantization config where each layer gets the bit-width that maximizes quality within the size budget. Protected layers (embeddings, final layers) are always assigned high precision.
Quantization Details
Property
Value
Target BPW
4.5
Achieved BPW
4.50
Candidate bits
4, 8
Layers at 4-bit
162
Layers at 8-bit
87
Total quantized layers
249
Group size
64
Model size
2811 MB
Uniform 4-bit size
2258 MB
Calibration data
WikiText-2 (2 samples, 128 tokens)
Benchmark Results
GSM8K
(200 samples, 3-shot chain-of-thought):
Model
GSM8K Accuracy
OptiQ mixed (4.5 BPW)
81.5%
Uniform 4-bit
79.5%
OptiQ improves over uniform 4-bit by +2.0 percentage points.
Usage
This model works with standard
mlx-lm
— no special code needed:
Qwen3.5 uses a hybrid attention architecture with alternating
linear_attn
and
self_attn
layers. OptiQ's sensitivity analysis identifies which layers are most sensitive to quantization error and assigns them higher precision, while less sensitive layers get 4-bit quantization to minimize model size.
Qwen3.5-4B-OptiQ-4bit huggingface.co is an AI model on huggingface.co that provides Qwen3.5-4B-OptiQ-4bit's model effect (), which can be used instantly with this mlx-community Qwen3.5-4B-OptiQ-4bit model. huggingface.co supports a free trial of the Qwen3.5-4B-OptiQ-4bit model, and also provides paid use of the Qwen3.5-4B-OptiQ-4bit. Support call Qwen3.5-4B-OptiQ-4bit model through api, including Node.js, Python, http.
Qwen3.5-4B-OptiQ-4bit huggingface.co is an online trial and call api platform, which integrates Qwen3.5-4B-OptiQ-4bit's modeling effects, including api services, and provides a free online trial of Qwen3.5-4B-OptiQ-4bit, you can try Qwen3.5-4B-OptiQ-4bit online for free by clicking the link below.
mlx-community Qwen3.5-4B-OptiQ-4bit online free url in huggingface.co:
Qwen3.5-4B-OptiQ-4bit is an open source model from GitHub that offers a free installation service, and any user can find Qwen3.5-4B-OptiQ-4bit on GitHub to install. At the same time, huggingface.co provides the effect of Qwen3.5-4B-OptiQ-4bit install, users can directly use Qwen3.5-4B-OptiQ-4bit installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Qwen3.5-4B-OptiQ-4bit install url in huggingface.co: