radiance 1.2.3

- DFlash2: the drafter's linears can be MXFP4 (slydlake), and its draft candidates are
  rescored against the target's own lm_head, so a 2-bit draft head ranks them exactly
- the Qwen3.8-27B recipes (Quark MXFP4 and FP8) use both: MXFP4 drafter linears and a
  clip-searched 2-bit head. One stream at TP2: 182 -> 204 tok/s (MXFP4), 124 -> 139 tok/s
  (uncensored FP8); 0.75 GiB less weight. Containers made with the older recipes still load.
This commit is contained in:
Deadcode committed 2026-10-07 14:43:31 +02:00
1 parent ac79f4dc8a
commit 05af4db458
7 files changed
+189 -118

No files matched your search

+11 -10
View File
@@ -9,20 +9,21 @@
# What the recipe adds:
#
# - the lm_head, block fp8: the widest GEMM in the model at half the bytes
# - the drafter's linears, block fp8 from its bf16 release: it is read whole on every decode
# - the drafter's linears, OCP-MXFP4 from its bf16 release: it is read whole on every decode
# step, and a draft is verified, so its precision can move acceptance and never an emitted token
# - the drafter's 2-bit copy of the target's head (u2 codes, an f16 scale and a u8 zero a group
# of 128), read by its draft rounds only
# of 128, least-squares clip search), read by its draft rounds only; the engine rescores its
# top 32 against the target's fp8 head
#
# The drafter's selector projection, codebooks and convolution weights stay bf16.
output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.draft_head.weight rtn codes=u2 zero=u8 group=128 scale=f16
dflash.draft_head.weight rtn codes=u2 zero=u8 group=128 scale=f16 rule=search
dflash.fc.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.attn_q.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.attn_k.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.attn_v.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
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
+16 -10
View File
@@ -7,18 +7,24 @@
# the trunk is served at the 4-bit weights Quark shipped, against E4M3 activations. The checkpoint
# is served by the family's quantised plugin (qwen35_fp8). The delta net's a/b projection is
# declared bf16, and every MXFP4 value is exact in bf16, so `cast` keeps Quark's values that way.
# The rest is as in q38-27b-fp8-df2.recipe: the head at block fp8, the drafter's linears at block
# fp8, and its 2-bit copy of the target's head.
# The target's head goes block fp8, as in q38-27b-fp8-df2.recipe.
#
# THE DRAFTER is made as small as its acceptance allows, since it is read whole on every decode step
# and a draft is verified, so its precision moves acceptance and never an emitted token: its linears
# at OCP-MXFP4 like the trunk, 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. Against fp8 linears
# and an unsearched 2-bit head without the rescore, TP1 at depth 7: 108.9 -> 121.6 tok/s one
# stream, 0.75 GiB less weight.
blk.*.ssm_ab.weight 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
dflash.draft_head.weight rtn codes=u2 zero=u8 group=128 scale=f16 rule=search
dflash.fc.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.attn_q.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.attn_k.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.attn_v.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
dflash.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
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