Archived
25 lines
1.6 KiB
Plaintext
25 lines
1.6 KiB
Plaintext
# gemma4-e4b-bf16-i8g-df.recipe -- Gemma 4 E4B (text, vision, NVIDIA's DFlash drafter) from a bf16 checkpoint:
|
|
# every trunk linear int8 with a bf16 scale per 128 columns, served at i8a8 (the activation quantised with a
|
|
# scale per row and 128 columns), an int8 lm_head, the drafter on block FP8, the vision tower bf16.
|
|
# Wikitext-2 KL against the bf16 original 0.010 (w8a8 recipe, one activation scale a row: 0.076).
|
|
#
|
|
# rad-convert <checkpoint> --recipe data/recipes/gemma4-e4b-bf16-i8g-df.recipe --draft-model <dflash-bf16> \
|
|
# --set quantization_config.quant_method=compressed-tensors -o gemma4-e4b-i8g-df.rad
|
|
|
|
blk.*.attn_qkv.weight rtn codes=i8 group=128 scale=bf16
|
|
blk.*.attn_q.weight rtn codes=i8 group=128 scale=bf16
|
|
blk.*.attn_o.weight rtn codes=i8 group=128 scale=bf16
|
|
blk.*.ffn_down.weight rtn codes=i8 group=128 scale=bf16
|
|
blk.*.ffn_gate_up.weight rtn codes=i8 group=128 scale=bf16
|
|
|
|
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
|