[Intel XPU] Enable fused_moe_triton tuning on XPU and add tuned DeepSeek-OCR-2 configs (#28723)

This commit is contained in:
Rahul Vijayaraghavan
2026-09-16 10:20:22 +08:00
committed by GitHub
parent f11cd8ab0e
commit d4ad368ed9
7 changed files with 433 additions and 26 deletions
@@ -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,
}