Qwen3.8-3.6-27B-blend DFlash2, MLX 4-bit
Unofficial JetBrains derivative. This is a 4-bit MLX quantization of JetBrains/Qwen3.8-3.6-27B-blend-DFlash2, adapted from Inco AI's DFlash 2 drafter for the Qwen Blend target. The target uses Qwen models developed by Alibaba Cloud. This release is not affiliated with, sponsored by, or endorsed by Alibaba Cloud or Alibaba Group.
This is only the DFlash 2 drafter. It requires the separate JetBrains/Qwen3.8-3.6-27B-blend-MLX-4bit target, which verifies the proposed tokens. It cannot generate independently and is separate from the native MTP drafter.
Quantization
| Property | Value |
|---|---|
| Source | JetBrains BF16 DFlash2, revision 2b4232163b3e29a9f3a143a8f3a9a6e0a5c0dfe3 |
| Architecture | DFlash2DraftModel, 5 draft layers, 1,924,404,480 source parameters |
| Quantization | MLX affine, 4 bits, group size 64 |
| Weight file | 1,082,881,523 bytes (1.08 GB), versus 3.85 GB BF16 |
| Stored tensors | 179: 49 packed uint32 weights and 130 BF16 scale, bias, and unquantized tensors |
| Configured block size | 8, corresponding to 7 draft proposals |
| Tested MLX block size | 5 |
The conversion uses the DFlash loader followed by mlx.nn.quantize(draft, group_size=64, bits=4, mode="affine"), before binding the target. Attention, MLP, context-projection, dynamic-convolution projection, and selector Linear/Embedding modules are quantized. RMSNorm and other non-quantized parameters remain BF16. The target's embedding and LM head are supplied by the target at runtime and are not stored in this checkpoint.
The weights were independently generated from the pinned JetBrains BF16 source. Every saved tensor equals the runtime quantization, and the complete weight file is byte-identical to erokhins/Qwen3.8-3.6-27B-blend-DFlash2-MLX-4bit.
SHA-256: e42142e5356c14dff353789719de0568ebc2cf426948e888c62c7a38fab47f53.
See conversion-manifest.json for pinned inputs, versions, checksums, tensor shapes, and validation.
Loading with DFlash on Apple silicon
The tested DFlash loader does not automatically read pre-quantized checkpoints. Use the included load_quantized_draft.py, which creates the quantized module structure and strictly loads these weights without downloading the BF16 checkpoint.
Install the tested DFlash revision and download this repository, then run Python from the downloaded directory:
pip install "dflash[local] @ git+https://github.com/z-lab/dflash.git@07ebd93db9f472af339b644bb70221ad8428328a"
hf download JetBrains/Qwen3.8-3.6-27B-blend-DFlash2-MLX-4bit --local-dir ./blend-dflash2-mlx-4bit
cd ./blend-dflash2-mlx-4bit
import mlx.core as mx
from dflash.model_mlx import load, stream_generate
from load_quantized_draft import load_quantized_draft
model, tokenizer = load("JetBrains/Qwen3.8-3.6-27B-blend-MLX-4bit")
draft = load_quantized_draft(".")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "What is 17 times 23?"}],
tokenize=False,
add_generation_prompt=True,
enable_thinking=True,
reasoning_effort="low",
)
mx.random.seed(42)
for response in stream_generate(
model, draft, tokenizer, prompt,
block_size=5, max_tokens=1024,
temperature=1.0, top_p=0.95, top_k=20,
):
print(response.text, end="", flush=True)
print()
The example retains thinking and low-effort reasoning. The runtime can emit special end-of-message tokens in its raw text stream. Use the BF16 drafter repository for runtimes expecting BF16 weights; this file is an MLX checkpoint.
Validation
On Apple M5 Max with MLX 0.32.0 and MLX-LM 0.31.3:
- Verified source and reference weight hashes, every output tensor, and exact reference weight-file identity.
- Loaded the saved checkpoint through the included helper with strict name/shape checks; every loaded tensor equals the saved tensor.
- Verified the matching target's weight hashes against its pinned Hub revision.
- Passed arithmetic and Python aliasing generation smoke tests with thinking enabled, temperature 1.0, top-p 0.95, top-k 20, seed 42, and block size 5. Both completed normally and accepted draft tokens.
These checks establish conversion and basic inference functionality, not broad coding quality or a speed advantage.
Training and attribution
The BF16 drafter was adapted by JetBrains for the Blend target using agentic trajectories generated with Junie on internal coding tasks spanning multiple programming languages. No additional training or calibration was used for this quantization.
DFlash 2 was developed by Inco AI. The Qwen target models were developed by Alibaba Cloud. Credit for the original DFlash method belongs to Jian Chen, Yesheng Liang, and Zhijian Liu. See the DFlash 2 blog, DFlash repository, and BF16 drafter card for upstream information and citations.
Distributed under the Apache License, Version 2.0. Copyright © 2026 JetBrains s.r.o. applies only to original material contributed by JetBrains. Upstream material remains subject to its original copyright and attribution notices. See NOTICE and CHANGES.md.