Qwen3.8-27B-MIVFP4e-DFlash2-MIVFP4 (4.5 bpw NAX-Pretiled MIVFP4 + AWQ + FWHT-64, SpinQuant $R_1$-Synced .miv)

Fastest & most compact companion DFlash2 block-diffusion speculative draft model for scoltzero/Qwen3.8-27B-MIVFP4e, quantized to mivfp4_gauss_g64_s16_v1 (4.5 bpw, 1.268 GiB / 1.362 GB) with offline SpinQuant $R_1$ absorption, coupled up_proj <-> down_proj AWQ smoothing across all 5 layers, and local FWHT-64 incoherence transforms for ninfer-metal.

Compared to the 3.58 GiB BF16 draft (scoltzero/Qwen3.8-27B-MIVFP4e-DFlash2), DFlash2-MIVFP4 cuts artifact size by 64.6% (2.83x smaller!), saves -2.61 GiB UMA, slashes draft latency by -51.6% (6.03 ms -> 2.92 ms), and accelerates end-to-end M5 Ultra decode by +7.9% to +12.7% while maintaining 100% 0-ULP bit-exact Verify parity.


Quantization Methodology (dflash2_mivfp4)

Packed offline via encoder/m5_mivfp4_quantize.py (rotate_companion_dflash2_checkpoint(..., dflash2_quant="mivfp4")) and packer/m5_artifact.py:

  • Offline SpinQuant $R_1$ Sync: Absorbs miv_rotation_basis.safetensors (spinquant.r1, 5120x5120) from scoltzero/Qwen3.8-27B-MIVFP4e directly into dflash2.fc.weight before quantization (spinquant_r1_applied: true).
  • Coupled AWQ Smoothing + Local FWHT-64: Applies exact coupled up_proj <-> down_proj AWQ smoothing across all 5 draft layers (awq_smoothed_layers: 5) and local register-level FWHT-64 on all 10 o_proj & down_proj projections (fwht64_objects: 10).
  • 4-bit NAX-Pretiled mivfp4_gauss_g64_s16_v1: Quantizes all 36 large projections into mivfp4_nax_lane_g64_v2 (4.5 bpw, 21.69 dB aggregate SQNR, 1.268 GiB / 1.362 GB total model.miv v2, zero zero-point ra overhead), while preserving all 45 norms, attention_conv.*, mlp_conv.*, and candidate_selector.* tensors in lossless direct_bf16_v1.
  • Apple M5 Ultra Optimizations: Fused ZRAM mivfp4 concat kernels (try_mivfp4_zram_concat) cut draft step latency by 51.6% (2.92 ms), full > 256K / 1M local sliding-window RoPE re-anchoring (omlx_m5_draft_cache_reanchor_rope, 0 B spill), and strict isolation from target ActKV-Lite / KVMem page 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 + KVMem Verification (95,985 tok, orig_max=32K -> 4.0x YaRN, kvmem_actkv B=8K, R=2K): Passed 3/3 (100%) Multi-Needle NIAH (10% / 50% / 90%) in 39.4 s TTFT, 127.1 tok/s decode (+6.4% faster than DFlash2-Q8's 119.4 tok/s, identical 4.17 acc/round!), 1,389 stream-evicted pages, 1,573.5 MB NVMe offloaded, 16 Quest-recalled pages, 18.97 GiB peak UMA (-0.90 GiB vs DFlash2-Q8).

SpinQuant $R_1$ Pairing & Checksums

  • Draft model.miv (1.268 GiB / 1.362 GB) SHA-256: eb4e56ed3abc5dd1652cc47db30a2b7cf0d9b813db638fccdd05b52733694524
  • Paired Target scoltzero/Qwen3.8-27B-MIVFP4e model.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-MIVFP4 \
  --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
39
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for scoltzero/Qwen3.8-27B-MIVFP4e-DFlash2-MIVFP4

Base model

Qwen/Qwen3.8-27B
Quantized
(2)
this model