Add DeepSeekV4 fused MoE Triton autotune support (#25569)
Co-authored-by: undefined <zhouchen.arrebol@jd.com> Co-authored-by: xq25478 <xq25478@qq.com> Co-authored-by: xieminghe.simon <xieminghe.simon@jd.com>
This commit is contained in:
co-authored by
undefined
xq25478
xieminghe.simon
parent
f04c522534
commit
ba2ffcf156
@@ -85,6 +85,7 @@ def get_model_config(
|
||||
"DeepseekV2ForCausalLM",
|
||||
"DeepseekV3ForCausalLM",
|
||||
"DeepseekV32ForCausalLM",
|
||||
"DeepseekV4ForCausalLM",
|
||||
"Glm4MoeForCausalLM",
|
||||
"GlmMoeDsaForCausalLM",
|
||||
"MistralLarge3ForCausalLM",
|
||||
|
||||
@@ -35,6 +35,7 @@ from sglang.srt.server_args import (
|
||||
set_global_server_args_for_scheduler,
|
||||
)
|
||||
from sglang.srt.utils import get_device, is_hip, is_xpu
|
||||
from sglang.srt.utils.hf_transformers_utils import get_config
|
||||
|
||||
_is_hip = is_hip()
|
||||
_is_xpu = is_xpu()
|
||||
@@ -174,8 +175,12 @@ def benchmark_config(
|
||||
topk_output.router_logits.copy_(new_topk_output.router_logits)
|
||||
|
||||
def run():
|
||||
model_config = get_config(args.model, trust_remote_code=True)
|
||||
architecture = model_config.architectures[0]
|
||||
is_dsv4 = architecture == "DeepseekV4ForCausalLM"
|
||||
moe_runner_config = MoeRunnerConfig(
|
||||
inplace=True,
|
||||
swiglu_limit=10.0 if is_dsv4 else None,
|
||||
)
|
||||
|
||||
with override_config(config):
|
||||
|
||||
Reference in New Issue
Block a user