Views
No views yet
4bit names the dominant precision, not the average.Tip: the 5bit is smaller and measures better overall — German prose is the one span where this build stays ahead.
optiq serve, mlx-vlm, vllm-mlx.
Ships the base model's processor configs, which quantization
pipelines commonly drop — without them, images are silently ignored.optiq/kv_config.json — details below.developer, merges system messages, guards tool-call
arguments; renders byte-identically to the original (verified).mtp/weights.safetensors — the default path optiq serve
and vllm-mlx both search.| Publisher | |||||
| Weights (GiB) | 26.62 | 17.67 | 18.06 | 18.09 | 14.09 |
| BPW¹ | 8.50 | 5.64 | 5.77 | 5.78 | 4.50 |
| Allocation | uniform² | measured (bf16) | measured (bf16) | measured (u4) | uniform² |
| Split 4/5/8 | all @8 | 100/262/136 | 270/–/228 | 237/–/261 | all @4 |
| Measured KV | — | ✓ | ✓ | — | — |
| Vision³ | ✓ | ✓ | ✓ | OptiQ only | ✓ |
| MTP head³ | ✓ | ✓ | ✓ | OptiQ only | ✓ |
| Hardened template | ✓ | ✓ | ✓ | — | ✓ |
| ΔNLL overall⁴ | 0.000 (anchor) | +0.019 ± 0.019 | +0.029 ± 0.015 | +0.040 ± 0.030 | +0.038 ± 0.045 |
| — German prose⁵ | 0 | +0.023 ± 0.003 | +0.019 ± 0.002 | +0.022 ± 0.002 | +0.039 ± 0.003 |
| — tool-call spans | 0 | −0.001 ± 0.013 | −0.008 ± 0.017 | +0.004 ± 0.005 | +0.013 ± 0.009 |
| — thinking spans | 0 | −0.001 ± 0.014 | +0.004 ± 0.013 | −0.005 ± 0.021 | +0.008 ± 0.013 |
| Flips per 10k⁶ | — | 216 | 503 | 566 | 772 |
| Divergence⁷ | (anchor) | 10.3 | 10.3 | 9.7 | 7.9 |
optiq serve, mlx-vlm, vllm-mlx).
Vision needs the base model's processor configs, which quantization
pipelines commonly drop; the MTP head needs the engine-neutral path
mtp/weights.safetensors. "OptiQ only": runs solely under
optiq serve — that repo lacks the processor configs, and its MTP
head sits on optiq's internal path that other engines do not search.1pip install mlx-optiq
2optiq serve --model p4ik/Qwen3.8-27B-MLX-OptiQ-4bit --mtp \
3 --kv-config "$(hf download p4ik/Qwen3.8-27B-MLX-OptiQ-4bit optiq/kv_config.json)"1from mlx_vlm import load, generate
2from mlx_vlm.prompt_utils import apply_chat_template
3from mlx_vlm.utils import load_config
4
5model, processor = load("p4ik/Qwen3.8-27B-MLX-OptiQ-4bit")
6config = load_config("p4ik/Qwen3.8-27B-MLX-OptiQ-4bit")
7
8prompt = apply_chat_template(processor, config, "Describe this image.", num_images=1)
9print(generate(model, processor, prompt, ["photo.jpg"]))1from mlx_lm import load, generate
2
3model, tokenizer = load("p4ik/Qwen3.8-27B-MLX-OptiQ-4bit")
4messages = [{"role": "user", "content": "Write a merge sort in Python."}]
5prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
6print(generate(model, tokenizer, prompt=prompt))1optiq convert Qwen/Qwen3.8-27B \
2 --method optiq --reference bf16 \
3 --target-bpw 5.0 --candidate-bits 4,8 \
4 --n-calibration 67 --calibration-mix optiq_erweitert.jsonl \
5 --skip-baselines| Property | Value |
|---|---|
| Method | optiq (exact per-layer KL vs the bf16 base) |
| Target BPW | 5.00 (achieved 5.13 before packing overhead) |
| Effective BPW | 5.63 |
| Weights | 18.06 GiB, 270 tensors @ 4-bit, 228 @ 8-bit |
| Group size | 64 |
| KV cache | measured, 16 layers, 5.00 bits average |
| MTP | int4 prequantized (as shipped by optiq), 29 tensors, 300 MiB |
| Vision tower | bf16, 879 MiB |
static (rule-based) allocation: a paired
corpus comparison put the two at parity, and the measured allocation ships
because it is documented evidence rather than convention. The per-layer KL
table is in optiq/sensitivity.json, the final assignment in
optiq/metadata.json.full_attention layers carry a KV cache — the 48
linear_attention layers hold a fixed-size Gated DeltaNet state).| File | Purpose |
|---|---|
model-*.safetensors | Mixed-precision weights |
preprocessor_config.json | Image preprocessing for mlx-vlm / vllm-mlx |
optiq/kv_config.json | Measured per-layer KV bit-widths |
mtp/weights.safetensors | MTP head — default path for optiq serve and vllm-mlx |
optiq/optiq_vision.safetensors | Vision tower, bf16 |
optiq/sensitivity.json | Measured per-layer KL table (4/8-bit vs bf16) |
optiq/metadata.json | Final per-tensor bit assignment |
| Parameter | Thinking | Instruct |
|---|---|---|
temperature | 1.0 | 0.7 |
top_p | 0.95 | 0.80 |
top_k | 20 | 20 |
min_p | 0.0 | 0.0 |
presence_penalty | 0.0 | 1.5 |
repetition_penalty | 1.0 | 1.0 |