Xiao-AMD's picture
update-fp8 (#3)
db22bcc verified
{
"architectures": [
"GraniteMoeHybridForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attention_multiplier": 0.0078125,
"bos_token_id": 100257,
"dtype": "bfloat16",
"embedding_multiplier": 12,
"eos_token_id": 100257,
"hidden_act": "silu",
"hidden_size": 4096,
"initializer_range": 0.1,
"intermediate_size": 768,
"layer_types": [
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"attention",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"attention",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"attention",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"mamba",
"attention",
"mamba",
"mamba",
"mamba",
"mamba"
],
"logits_scaling": 16,
"mamba_chunk_size": 256,
"mamba_conv_bias": true,
"mamba_d_conv": 4,
"mamba_d_head": 64,
"mamba_d_state": 128,
"mamba_expand": 2,
"mamba_n_groups": 1,
"mamba_n_heads": 128,
"mamba_proj_bias": false,
"max_position_embeddings": 131072,
"model_type": "granitemoehybrid",
"normalization_function": "rmsnorm",
"num_attention_heads": 32,
"num_experts_per_tok": 10,
"num_hidden_layers": 40,
"num_key_value_heads": 8,
"num_local_experts": 72,
"output_router_logits": false,
"pad_token_id": 100256,
"position_embedding_type": "nope",
"quantization_config": {
"algo_config": null,
"exclude": [
"model.layers.0.block_sparse_moe.router.layer",
"model.layers.1.block_sparse_moe.router.layer",
"model.layers.2.block_sparse_moe.router.layer",
"model.layers.3.block_sparse_moe.router.layer",
"model.layers.4.block_sparse_moe.router.layer",
"model.layers.5.block_sparse_moe.router.layer",
"model.layers.6.block_sparse_moe.router.layer",
"model.layers.7.block_sparse_moe.router.layer",
"model.layers.8.block_sparse_moe.router.layer",
"model.layers.9.block_sparse_moe.router.layer",
"model.layers.10.block_sparse_moe.router.layer",
"model.layers.11.block_sparse_moe.router.layer",
"model.layers.12.block_sparse_moe.router.layer",
"model.layers.13.block_sparse_moe.router.layer",
"model.layers.14.block_sparse_moe.router.layer",
"model.layers.15.block_sparse_moe.router.layer",
"model.layers.16.block_sparse_moe.router.layer",
"model.layers.17.block_sparse_moe.router.layer",
"model.layers.18.block_sparse_moe.router.layer",
"model.layers.19.block_sparse_moe.router.layer",
"model.layers.20.block_sparse_moe.router.layer",
"model.layers.21.block_sparse_moe.router.layer",
"model.layers.22.block_sparse_moe.router.layer",
"model.layers.23.block_sparse_moe.router.layer",
"model.layers.24.block_sparse_moe.router.layer",
"model.layers.25.block_sparse_moe.router.layer",
"model.layers.26.block_sparse_moe.router.layer",
"model.layers.27.block_sparse_moe.router.layer",
"model.layers.28.block_sparse_moe.router.layer",
"model.layers.29.block_sparse_moe.router.layer",
"model.layers.30.block_sparse_moe.router.layer",
"model.layers.31.block_sparse_moe.router.layer",
"model.layers.32.block_sparse_moe.router.layer",
"model.layers.33.block_sparse_moe.router.layer",
"model.layers.34.block_sparse_moe.router.layer",
"model.layers.35.block_sparse_moe.router.layer",
"model.layers.36.block_sparse_moe.router.layer",
"model.layers.37.block_sparse_moe.router.layer",
"model.layers.38.block_sparse_moe.router.layer",
"model.layers.39.block_sparse_moe.router.layer",
"lm_head"
],
"export": {
"kv_cache_group": [
"*k_proj",
"*v_proj"
],
"min_kv_scale": 0.0,
"pack_method": "reorder",
"weight_format": "real_quantized",
"weight_merge_groups": null
},
"global_quant_config": {
"bias": null,
"input_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
},
"output_tensors": null,
"target_device": null,
"weight": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
}
},
"kv_cache_quant_config": {
"*k_proj": {
"bias": null,
"input_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
},
"output_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": null,
"symmetric": true
},
"target_device": null,
"weight": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
}
},
"*v_proj": {
"bias": null,
"input_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
},
"output_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": null,
"symmetric": true
},
"target_device": null,
"weight": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
}
}
},
"layer_quant_config": {
"*k_proj": {
"bias": null,
"input_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
},
"output_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": null,
"symmetric": true
},
"target_device": null,
"weight": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
}
},
"*v_proj": {
"bias": null,
"input_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
},
"output_tensors": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": null,
"symmetric": true
},
"target_device": null,
"weight": {
"ch_axis": null,
"dtype": "fp8_e4m3",
"group_size": null,
"is_dynamic": false,
"is_scale_quant": false,
"mx_element_dtype": null,
"observer_cls": "PerTensorMinMaxObserver",
"qscheme": "per_tensor",
"round_method": "half_even",
"scale_calculation_mode": null,
"scale_format": null,
"scale_type": "float",
"symmetric": true
}
}
},
"layer_type_quant_config": {},
"quant_method": "quark",
"quant_mode": "eager_mode",
"softmax_quant_spec": null,
"version": "0.11+173148031e"
},
"residual_multiplier": 0.22,
"rms_norm_eps": 1e-05,
"rope_scaling": null,
"rope_theta": 10000,
"router_aux_loss_coef": 0.0,
"shared_intermediate_size": 1536,
"tie_word_embeddings": true,
"transformers_version": "4.56.2",
"use_cache": true,
"vocab_size": 100352
}