-
Notifications
You must be signed in to change notification settings - Fork 76
feat: support GLM-5-FP8 in HYBRID mode #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is incorrect. without quant field. |
||
| "architectures": ["Glm4MoeForCausalLM"], | ||
| "model_type": "glm4_moe", | ||
| "num_hidden_layers": 92, | ||
| "hidden_size": 5120, | ||
| "num_attention_heads": 96, | ||
| "num_key_value_heads": 8, | ||
| "head_dim": 128, | ||
| "intermediate_size": 12288, | ||
| "vocab_size": 151552, | ||
| "max_position_embeddings": 202752, | ||
| "n_routed_experts": 160, | ||
| "n_shared_experts": 1, | ||
| "num_experts_per_tok": 8, | ||
| "moe_intermediate_size": 1536, | ||
| "first_k_dense_replace": 3, | ||
| "routed_scaling_factor": 2.5, | ||
| "torch_dtype": "bfloat16", | ||
| "use_cache": true, | ||
| "tie_word_embeddings": false | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "architectures": ["Glm4MoeLiteForCausalLM"], | ||
| "model_type": "glm4_moe_lite", | ||
| "num_hidden_layers": 47, | ||
| "hidden_size": 2048, | ||
| "num_attention_heads": 20, | ||
| "num_key_value_heads": 20, | ||
| "head_dim": 64, | ||
| "intermediate_size": 10240, | ||
| "vocab_size": 154880, | ||
| "max_position_embeddings": 202752, | ||
| "n_routed_experts": 64, | ||
| "n_shared_experts": 1, | ||
| "num_experts_per_tok": 4, | ||
| "moe_intermediate_size": 1536, | ||
| "first_k_dense_replace": 1, | ||
| "kv_lora_rank": 512, | ||
| "q_lora_rank": 768, | ||
| "qk_nope_head_dim": 192, | ||
| "qk_rope_head_dim": 64, | ||
| "v_head_dim": 256, | ||
| "routed_scaling_factor": 1.8, | ||
| "torch_dtype": "bfloat16", | ||
| "use_cache": true, | ||
| "tie_word_embeddings": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is incorrect.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i will suggest we do manual copy paste to avoid illusion. |
||
| "architectures": ["GlmMoeDsaForCausalLM"], | ||
| "model_type": "glm_moe_dsa", | ||
| "num_hidden_layers": 78, | ||
| "hidden_size": 6144, | ||
| "num_attention_heads": 64, | ||
| "num_key_value_heads": 64, | ||
| "head_dim": 64, | ||
| "intermediate_size": 12288, | ||
| "vocab_size": 154880, | ||
| "max_position_embeddings": 202752, | ||
| "n_routed_experts": 256, | ||
| "n_shared_experts": 1, | ||
| "num_experts_per_tok": 8, | ||
| "moe_intermediate_size": 2048, | ||
| "moe_layer_freq": 1, | ||
| "first_k_dense_replace": 3, | ||
| "kv_lora_rank": 512, | ||
| "q_lora_rank": 2048, | ||
| "qk_nope_head_dim": 192, | ||
| "qk_rope_head_dim": 64, | ||
| "v_head_dim": 256, | ||
| "routed_scaling_factor": 2.5, | ||
| "torch_dtype": "bfloat16", | ||
| "use_cache": true, | ||
| "tie_word_embeddings": false | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest we remove the wideep support in this pr. Do more complete design in a seperate PR.