[Feature] Enable return routed experts (#12162)

Co-authored-by: yizhang2077 <1109276519@qq.com>
Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
This commit is contained in:
Junrong Lin
2025-12-21 15:16:43 +08:00
committed by GitHub
parent 8fe3e37468
commit bed301a5ac
27 changed files with 646 additions and 10 deletions

View File

@@ -565,6 +565,7 @@ async def async_request_sglang_generate(
"stream": not args.disable_stream,
"lora_path": request_func_input.lora_name,
"return_logprob": args.return_logprob,
"return_routed_experts": args.return_routed_experts,
"logprob_start_len": -1,
**request_func_input.extra_request_body,
}
@@ -2809,6 +2810,11 @@ if __name__ == "__main__":
action="store_true",
help="Return logprob.",
)
parser.add_argument(
"--return-routed-experts",
action="store_true",
help="Return routed experts.",
)
parser.add_argument("--seed", type=int, default=1, help="The random seed.")
parser.add_argument(
"--disable-ignore-eos",