Views
No views yet
Qwen/Qwen3.6-27B for Apple Silicon (MLX). Most of the network runs at 4-bit for speed and size, while the handful of weights that are genuinely sensitive to low-bit quantization are kept at 6/8-bit or BF16.TL;DR on choosing a build: if you have the memory, the 6-bit build is effectively lossless. This mixed-4bit build is for when you want maximum decode speed and the smallest footprint and can accept a measurable (~5% perplexity) quality cost.
in_proj_a/in_proj_b) and the GQA k/v projections. Those feed the recurrent state, where a small error compounds over the sequence. So we quantize the bulk to 4-bit and fence exactly those tensors at higher precision — at negligible size cost, since they are tiny.| Module | Precision | Rationale |
|---|---|---|
MLP gate/up_proj (all 64 layers) | 4-bit | 42% of params; int4-robust |
MLP down_proj (middle layers) | 4-bit | robust (weight-only quant) |
DeltaNet in_proj_qkv | 4-bit | bulk projection, robust |
MLP down_proj (first/last ⅛ of layers) | 6-bit | slightly worse at network edges |
DeltaNet in_proj_z, out_proj | 6-bit | gate / output of the linear-attention path |
Full-attn q_proj, o_proj | 6-bit | only ¼ of layers; cheap to protect |
Full-attn k_proj, v_proj | 8-bit | 6:1 GQA amplifies shared k/v error |
embed_tokens, lm_head | 8-bit | untied 248K-vocab; logit precision |
DeltaNet in_proj_a, in_proj_b | BF16 (unquantized) | decay/control gates → recurrence error compounds |
conv1d, A_log, dt_bias, RMSNorms | BF16 | not linear layers; precision-critical for the SSM state |
| Build | bpw | size | ppl | Δppl vs BF16 | KL(bf16‖q) | top-1 agree |
|---|---|---|---|---|---|---|
| BF16 (reference) | 16 | 55.6 GB | 6.622 | — | — | — |
| 8-bit | 8.5 | 27 GB | 6.635 | +0.20% | 0.0018 | 97.7% |
| 6-bit | 6.5 | 21 GB | 6.595 | −0.41%¹ | 0.0087 | 96.6% |
| mixed-4bit (this model) | 5.36 | 17 GB | 6.977 | +5.36% | 0.0405 | 91.5% |
| uniform-4bit | 4.50 | 15 GB | 6.989 | +5.53% | 0.0651 | 89.8% |
1pip install mlx-lm
2mlx_lm.generate --model EigenLabs/Qwen3.6-27B-MLX-mixed-4bit \
3 --prompt "Explain gated delta networks in two sentences." --max-tokens 2561from mlx_lm import load, generate
2model, tokenizer = load("EigenLabs/Qwen3.6-27B-MLX-mixed-4bit")
3messages = [{"role": "user", "content": "What is 17*23?"}]
4prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
5print(generate(model, tokenizer, prompt=prompt, max_tokens=256))<think> block, so responses begin with a chain of thought.qwen3_5 implementation does not load the model's MTP head (so no built-in speculative decoding) or its vision tower (use mlx-vlm separately for images).mlx_lm.convert using a custom mixed-precision predicate (asymmetric affine, group_size=64):1def predicate(path, module):
2 if "in_proj_a" in path or "in_proj_b" in path: return False # keep BF16
3 if "embed_tokens" in path or "lm_head" in path: return bits(8)
4 if "k_proj" in path or "v_proj" in path: return bits(8)
5 if "in_proj_z" in path or "out_proj" in path: return bits(6)
6 if "q_proj" in path or "o_proj" in path: return bits(6)
7 if "down_proj" in path and edge_layer(path): return bits(6)
8 return bits(4) # MLP bulk, in_proj_qkvQwen/Qwen3.6-27B (© Alibaba / Qwen team). This is a quantized derivative produced by EigenLabs. Please cite the original Qwen3.6 model.