# q38-27b-paro-m2xfp4-df2.recipe -- a ParoQuant M2XFP4 Qwen3.8-27B (quant_method # paroquant_m2xfp4) with the DFlash2 drafter. # # tools/rad_pack_m2xfp4.py --model --recipe \ # data/recipes/q38-27b-paro-m2xfp4-df2.recipe --draft -o q38-27b-paro-m2xfp4-df2.rad # # The trunk's linears are imported as they ship, and need no rule: e2m1 codes, an E8M0 exponent a 32 # of K and the scheme's metadata byte a group (four 2-bit subgroup multipliers, subgroup s in bits # [2s, 2s+2)), stored in the ROTATED basis ParoQuant trained them in, with the rotations beside # them as the encoding's "givens" transform (abi/rad_encoding.h): per projection the Givens pairs # and angles of krot stages inside groups of 128 columns, and the channel scales. A fused gate|up or # qkv|z keeps one set of tables a checkpoint tensor (parts). rad-convert writes them as planes of # the weight; the GEMM is the plain M2XFP4 one, and the activation is rotated in front of it # (givens_dense_quant) -- nothing is re-quantised, so the weights are the fine-tune's to the bit. # # What the checkpoint does NOT ship in a form the architecture declares gets a rule. `convert` # loads the donor fp16, so everything it does not re-quantise is fp16 where the plugin declares # bf16 or f32: `cast` rounds once. The head is quantised as in every recipe here; the MTP head is # not read, since the DFlash2 drafter displaces it. THE DRAFTER is made as small as its acceptance # allows, as in q38-27b-m2xfp4-df2.recipe. blk.*.attn_norm.weight cast dtype=f32 blk.*.attn_q_norm.weight cast dtype=f32 blk.*.attn_k_norm.weight cast dtype=f32 blk.*.ffn_norm.weight cast dtype=f32 dflash.blk.*.attn_norm.weight cast dtype=f32 dflash.blk.*.attn_q_norm.weight cast dtype=f32 dflash.blk.*.attn_k_norm.weight cast dtype=f32 dflash.blk.*.ffn_norm.weight cast dtype=f32 blk.*.ssm_ab.weight cast dtype=bf16 blk.*.ssm_conv1d.weight cast dtype=bf16 token_embd.weight cast dtype=bf16 v.* cast dtype=bf16 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 m2xfp4 dflash.blk.*.attn_q.weight m2xfp4 dflash.blk.*.attn_k.weight m2xfp4 dflash.blk.*.attn_v.weight m2xfp4 dflash.blk.*.attn_output.weight m2xfp4 dflash.blk.*.ffn_gate_up.weight m2xfp4 dflash.blk.*.ffn_down.weight m2xfp4