Qwen3.8-27B-MIVFP4e-DFlash2-Q8 (8.5 bpw NAX-Pretiled Q8, SpinQuant $R_1$-Synced .miv)
High-precision Q8 companion DFlash2 block-diffusion speculative draft model for scoltzero/Qwen3.8-27B-MIVFP4e, quantized to oq_affine_q8_g64_bf16_v1 (8.5 bpw, 45.43 dB aggregate SQNR) with offline SpinQuant $R_1$ absorption and Apple10 NAX lane pre-tiling for ninfer-metal.
Compared to the 3.58 GiB BF16 draft (scoltzero/Qwen3.8-27B-MIVFP4e-DFlash2), DFlash2-Q8 shrinks artifact size by 42.1% (2.07 GiB / 2.23 GB), saves -1.70 GiB UMA, preserves Ξ 0.0000 average acceptance, and runs +4.9%β6.1% faster on Apple M5 Ultra with 100% 0-ULP bit-exact Verify parity.
- GitHub & Runtime: https://github.com/scoltzero/ninfer-metal
- Upstream Draft Source:
z-lab/Qwen3.8-27B-DFlash2(5-layerDFlash2DraftModel,block_size=8,sliding_window=2048,target_layer_ids=[5, 19, 33, 47, 61]) - Required Target Model:
scoltzero/Qwen3.8-27B-MIVFP4e(paired via SpinQuant $R_1$ basis) - Sibling Draft Models:
scoltzero/Qwen3.8-27B-MIVFP4e-DFlash2-MIVFP4(Even smaller & faster 4.5-bpw option:1.27 GiB-64.6%,+7.9%β12.7%vs BF16,-2.61 GiBUMA)scoltzero/Qwen3.8-27B-MIVFP4e-DFlash2(3.58 GiBlossless BF16 reference)
Quantization Methodology (dflash2_q8)
Packed offline via encoder/m5_mivfp4_quantize.py (rotate_companion_dflash2_checkpoint(..., dflash2_quant="q8")) and packer/m5_artifact.py:
- Offline SpinQuant $R_1$ Sync: Absorbs
miv_rotation_basis.safetensors(spinquant.r1,5120x5120) fromscoltzero/Qwen3.8-27B-MIVFP4edirectly intodflash2.fc.weightbefore quantization (spinquant_r1_applied: true). - Selective NAX-Pretiled Q8 (
45.43 dBSQNR): All36large projection matrices (fc+ 5-layerq/k/v/o_projandgate/up/down_proj) are quantized to group-64 8-bit affineoq_affine_q8_g64_bf16_v1in zero-copyoq_nax_lane_g64_v2tile layout (8.5 bpw,2.074 GiB/2.227 GBtotalmodel.mivv2). - Full-Precision Sensitive Operators: All
45remaining tensors (RMSNorms,attention_conv.*,mlp_conv.*, andcandidate_selector.*codebooks/projections) remain losslessdirect_bf16_v1. - Apple M5 Ultra Optimizations: Half the draft weight DRAM bandwidth vs BF16 during
block_size=8diffusion drafting (4.41 msvs6.03 msdraft step), full> 256K / 1Mlocal sliding-window RoPE re-anchoring (omlx_m5_draft_cache_reanchor_rope,0 Bspill), and strict isolation from targetActKV-Lite/KVMempage eviction.
Verified Apple M5 Ultra Benchmarks (80-GPU / 256 GiB, affine4_g128)
Apples-to-Apples Draft Comparison (3-prompt 256-tok greedy)
| Speculator | Draft Disk Size | Avg Decode | Peak Decode (Coding / Reasoning / Structured) | Acc / Round (Rate) | Peak UMA | 0-ULP Verify Parity |
|---|---|---|---|---|---|---|
AR (none) |
β | 59.54 tok/s |
59.59 (59.6 / 59.5 / 59.5) |
β | 15.88 GiB |
(T=1 QMV baseline) |
| Native MTP (embedded) | 0 B |
107.78 tok/s |
113.22 (113.2 / 110.2 / 99.9) |
1.75 (48.9%) |
16.27 GiB |
100% (== BF16 == Q8 == MIVFP4) |
DFlash2 (BF16, $R_1$) |
3.585 GiB (3.85 GB) |
110.94 tok/s |
121.03 (121.0 / 116.4 / 95.4) |
2.12 (30.9%) |
20.47 GiB |
100% (3/3 bit-exact) |
DFlash2-Q8 (8.5 bpw, $R_1$) |
2.074 GiB (-42.1%) |
116.38 tok/s (+4.9%) |
125.17 (125.2 / 123.7 / 100.3) |
2.08 (30.3%) |
18.77 GiB (-1.70 GiB) |
100% (3/3 bit-exact) |
DFlash2-MIVFP4 (4.5 bpw, $R_1$) |
1.268 GiB (-64.6%) |
119.71 tok/s (+7.9%) |
127.62 (127.6 / 127.6 / 103.9) |
2.00 (29.1%) |
17.86 GiB (-2.61 GiB) |
100% (3/3 bit-exact) |
Controlled A/B Benchmark Suite (position_coupled_v1, 723 affine_nax kernels 0 B spill)
Draft Variant (position_coupled_v1, T=0, D=7) |
Draft Size | Dim B/C (tok/s) |
Draft Latency | avg_acc |
Dim D B=1 / 2 / 4 (tok/s) |
Dim E 64K | UMA Footprint |
|---|---|---|---|---|---|---|---|
DFlash2 (BF16 + R1) |
3.58 GiB |
134.63 |
6.03 ms |
2.5581 |
121.34 / 195.15 / 239.48 |
33.32 |
20.03 GiB |
DFlash2-Q8 (Q8 + R1) |
2.07 GiB (-42.1%) |
142.88 (+6.1%) |
4.41 ms (-26.9%) |
2.5581 (Ξ 0.0000) |
126.90 / 199.17 / 241.14 |
33.90 |
18.33 GiB (-1.70 GiB) |
DFlash2-MIVFP4 (MIVFP4 + FWHT64 + R1) |
1.27 GiB (-64.6%) |
151.72 (+12.7%) |
2.92 ms (-51.6%) |
2.6085 |
132.56 / 205.41 / 254.85 |
35.50 (+6.5%) |
17.42 GiB (-2.61 GiB) |
- Long-Context Dynamic YaRN +
KVMemVerification (95,985tok,orig_max=32K -> 4.0xYaRN,kvmem_actkvB=8K, R=2K): Passed3/3(100%) Multi-Needle NIAH (10% / 50% / 90%) in39.5 sTTFT,119.4 tok/sdecode (4.17acc/round),1,389stream-evicted pages,16Quest-recalled pages,19.87 GiBpeak UMA.
SpinQuant $R_1$ Pairing & Checksums
- Draft
model.miv(2.074 GiB / 2.227 GB) SHA-256:14894ef9fe135c47bc397c65a999fe8111dfa1408c7a608696b699cfe15d2ea6 - Paired Target
scoltzero/Qwen3.8-27B-MIVFP4emodel.miv(vision-preserved rebuild) SHA-256:c1dec49d8851c27e23756ae82ef6396c4a77fa4232d07a6577be37a90f265e3b - Paired Target
miv_rotation_basis.safetensors(spinquant.r1) SHA-256:9ff1a822c5f70597c6189f67caff763d1286afdea10fda368183ecdb92e489ae
Usage (ninfer-metal-serve)
./serve/scripts/start_ninfer_serve.sh /path/to/Qwen3.8-27B-MIVFP4e \
--spec-backend dflash2 --draft-dir /path/to/Qwen3.8-27B-MIVFP4e-DFlash2-Q8 \
--max-context 1048576 --kv-dtype affine4_g128 \
--kv-accel-mode kvmem_actkv --actkv-budget-tokens 16384 --actkv-reserve-tokens 2048 \
--kvmem-disk-gb 32 --kvmem-recall-top-pages 16 --rope-scaling-mode dynamic_yarn
- Downloads last month
- 43
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support