# q38-27b-nvfp4-df2.recipe -- unsloth's Qwen3.8-27B-NVFP4 with the DFlash2 drafter. # # rad-convert --draft-model \ # --recipe q38-27b-nvfp4-df2.recipe -o q38-27b-nvfp4-df2.rad # # The checkpoint is compressed-tensors mixed precision: the MLPs of layers 0-55 are NVFP4 (e2m1 # codes, an e4m3 scale per 16 of K, an f32 global scale per tensor); the attention and delta-net # projections, the MLPs of layers 56-63 and the lm_head are FP8 with a bf16 scale per row; the # delta net's a/b projections, the vision tower and the MTP head are bf16. The core decodes each # exactly, and every rule below quantises the decoded value, so one recipe covers all forms. # # - The trunk's linears at MXFP4 (`fp4_e2m1`, an e8m0 scale per 32 of K, the OCP exponent # rule): the encoding and kernel of q38-27b-quark-mxfp4-df2.recipe. No kernel serves NVFP4. # NVFP4 to MXFP4 rounds twice: on a synthetic Gaussian tensor the result is 0.14 relative # RMS from the source, against 0.12 for MXFP4 made from the source and 0.10 for NVFP4. At # model scale, against the block-fp8 Qwen3.8-27B on four documents: mean KL 0.287, top-1 # 87.5% (the Quark MXFP4 container: 0.206, 89.3%). # - The delta net's a/b projections stay bf16, as shipped: 96 rows of 5120, read as their own # projection beside [q|k|v|z]. # - The lm_head at block fp8 (from its per-row FP8), as in the other 27B recipes. # # The drafter as q38-27b-quark-mxfp4-df2.recipe makes it: its linears at MXFP4, and a 2-bit copy # of the target's head (u2 with a u8 zero, least-squares clip search) whose top 32 the engine # rescores against the target's fp8 head. blk.*.ffn_gate_up.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 blk.*.ffn_down.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 blk.*.attn_qg.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 blk.*.attn_k.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 blk.*.attn_v.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 blk.*.attn_output.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 blk.*.ssm_inz.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 blk.*.ssm_out.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 dflash.draft_head.weight rtn codes=u2 zero=u8 group=128 scale=f16 rule=search dflash.fc.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 dflash.blk.*.attn_q.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 dflash.blk.*.attn_k.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 dflash.blk.*.attn_v.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 dflash.blk.*.attn_output.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 dflash.blk.*.ffn_gate_up.weight rtn codes=fp4_e2m1 group=32 scale=e8m0 dflash.blk.*.ffn_down.weight rtn codes=fp4_e2m1 group=32 scale=e8m0