Archived
Wikitext-2 KL against the HF bf16 reference: bf16 0.0015, w8a8 0.076, w4a8 0.242 (attention and layers 19-23 int8, feed-forward int4; all int4 is 0.612).
47 lines
2.8 KiB
Plaintext
47 lines
2.8 KiB
Plaintext
# gemma4-e4b-bf16-w4a8-df.recipe -- Gemma 4 E4B (text) from a bf16 checkpoint, e.g. NVIDIA's
|
|
# Nemotron-3.5-Bolt-E4B: int4 codes with an f16 scale per 128 columns (w4a8) on the feed-forward,
|
|
# The same trunk as gemma4-e4b-bf16-w4a8.recipe, with NVIDIA's DFlash drafter (rad-convert --draft-model <bf16 safetensors>)
|
|
# on block FP8 like the 31B's -df recipe, and its head as a block-FP8 copy of the target table.
|
|
#
|
|
# rad-convert <checkpoint> --recipe data/recipes/gemma4-e4b-bf16-w4a8-df.recipe --draft-model <dflash-bf16> \
|
|
# --set quantization_config.quant_method=compressed-tensors -o gemma4-e4b-w4a8-df.rad
|
|
|
|
|
|
blk.19.attn_qkv.weight rtn codes=i8 group=128 scale=f16
|
|
blk.19.attn_o.weight rtn codes=i8 group=128 scale=f16
|
|
blk.19.ffn_gate_up.weight rtn codes=i8 group=128 scale=f16
|
|
blk.19.ffn_down.weight rtn codes=i8 group=128 scale=f16
|
|
blk.20.attn_qkv.weight rtn codes=i8 group=128 scale=f16
|
|
blk.20.attn_o.weight rtn codes=i8 group=128 scale=f16
|
|
blk.20.ffn_gate_up.weight rtn codes=i8 group=128 scale=f16
|
|
blk.20.ffn_down.weight rtn codes=i8 group=128 scale=f16
|
|
blk.21.attn_qkv.weight rtn codes=i8 group=128 scale=f16
|
|
blk.21.attn_o.weight rtn codes=i8 group=128 scale=f16
|
|
blk.21.ffn_gate_up.weight rtn codes=i8 group=128 scale=f16
|
|
blk.21.ffn_down.weight rtn codes=i8 group=128 scale=f16
|
|
blk.22.attn_qkv.weight rtn codes=i8 group=128 scale=f16
|
|
blk.22.attn_o.weight rtn codes=i8 group=128 scale=f16
|
|
blk.22.ffn_gate_up.weight rtn codes=i8 group=128 scale=f16
|
|
blk.22.ffn_down.weight rtn codes=i8 group=128 scale=f16
|
|
blk.23.attn_qkv.weight rtn codes=i8 group=128 scale=f16
|
|
blk.23.attn_o.weight rtn codes=i8 group=128 scale=f16
|
|
blk.23.ffn_gate_up.weight rtn codes=i8 group=128 scale=f16
|
|
blk.23.ffn_down.weight rtn codes=i8 group=128 scale=f16
|
|
|
|
blk.*.attn_qkv.weight rtn codes=i8 group=128 scale=f16
|
|
blk.*.attn_q.weight rtn codes=i8 group=128 scale=f16
|
|
blk.*.attn_o.weight rtn codes=i8 group=128 scale=f16
|
|
blk.*.ffn_down.weight rtn codes=i4 group=128 scale=f16 rule=search
|
|
blk.*.ffn_gate_up.weight rtn codes=i4 group=128 scale=f16 rule=search
|
|
|
|
output.weight rtn codes=i8 group=128 scale=bf16 clamp=sym
|
|
|
|
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.draft_head.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|