[Intel XPU] Enable fused_moe_triton tuning on XPU and add tuned DeepSeek-OCR-2 configs (#28723)
This commit is contained in:
@@ -103,6 +103,7 @@ def get_model_config(
|
||||
"DeepseekV3ForCausalLM",
|
||||
"DeepseekV32ForCausalLM",
|
||||
"DeepseekV4ForCausalLM",
|
||||
"DeepseekOCRForCausalLM",
|
||||
"Glm4MoeForCausalLM",
|
||||
"Glm4MoeLiteForCausalLM",
|
||||
"GlmMoeDsaForCausalLM",
|
||||
@@ -206,6 +207,9 @@ def get_model_config(
|
||||
|
||||
# text_config may not carry torch_dtype; fall back to bf16.
|
||||
torch_dtype = getattr(config, "torch_dtype", None) or torch.bfloat16
|
||||
num_layers = getattr(config, "num_hidden_layers", 0)
|
||||
# Only the DeepSeek family replaces leading MoE layers with dense ones.
|
||||
dense_layers = getattr(config, "first_k_dense_replace", 0)
|
||||
|
||||
return {
|
||||
"num_experts": E,
|
||||
@@ -215,6 +219,8 @@ def get_model_config(
|
||||
"dtype": torch_dtype,
|
||||
"block_shape": block_shape,
|
||||
"architecture": architecture,
|
||||
"num_layers": num_layers,
|
||||
"dense_layers": dense_layers,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user