File size: 2,185 Bytes
894cdfa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | quant_stage:
quant_modifiers:
QuantizationModifier:
config_groups:
group_0:
targets: ['re:.*self_attn.q_proj.*', 're:.*self_attn.k_proj.*', 're:.*self_attn.v_proj.*',
're:.*self_attn.o_proj.*', 're:.*linear_attn.in_proj_qkv.*', 're:.*linear_attn.in_proj_z.*',
're:.*linear_attn.out_proj.*', 're:.*shared_expert.gate_proj.*', 're:.*shared_expert.up_proj.*',
're:.*shared_expert.down_proj.*']
weights:
num_bits: 8
type: float
symmetric: true
group_size: null
strategy: block
block_structure: [128, 128]
dynamic: false
actorder: null
scale_dtype: null
zp_dtype: null
observer: memoryless_minmax
observer_kwargs: {}
input_activations:
num_bits: 8
type: float
symmetric: true
group_size: 128
strategy: group
block_structure: null
dynamic: true
actorder: null
scale_dtype: null
zp_dtype: null
observer: null
observer_kwargs: {}
output_activations: null
format: null
group_1:
targets: ['re:.*mlp.experts.*gate_proj.*', 're:.*mlp.experts.*up_proj.*', 're:.*mlp.experts.*down_proj.*']
weights:
num_bits: 4
type: float
symmetric: true
group_size: 16
strategy: tensor_group
block_structure: null
dynamic: false
actorder: null
scale_dtype: torch.float8_e4m3fn
zp_dtype: null
observer: memoryless_minmax
observer_kwargs: {}
input_activations: null
output_activations: null
format: null
targets: [Linear]
ignore: ['re:.*lm_head', 're:.*embed_tokens', 're:visual.*', 're:model.visual.*', 're:.*mlp.gate$',
're:.*shared_expert_gate$', 're:.*linear_attn.in_proj_a', 're:.*linear_attn.in_proj_b',
're:.*linear_attn.conv1d', 're:^mtp\..*']
bypass_divisibility_checks: false
|