Support piecewise cuda graph for Qwen3-next (#13081)

This commit is contained in:
Chen1022
2025-11-25 21:01:27 +08:00
committed by GitHub
parent 432ecf841e
commit d64bf6c6ce
6 changed files with 112 additions and 3 deletions

View File

@@ -135,5 +135,43 @@ class TestQwen3NextMTPTopk(CustomTestCase):
self.assertGreater(metrics["accuracy"], 0.93)
class TestQwen3NextPiecewiseCudaGraph(CustomTestCase):
@classmethod
def setUpClass(cls):
cls.model = "Qwen/Qwen3-Next-80B-A3B-Instruct"
cls.base_url = DEFAULT_URL_FOR_TEST
cls.process = popen_launch_server(
cls.model,
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--tp",
"4",
"--enable-piecewise-cuda-graph",
"--piecewise-cuda-graph-compiler",
"eager",
],
)
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
def test_gsm8k(self):
args = SimpleNamespace(
num_shots=5,
data_path=None,
num_questions=200,
max_new_tokens=512,
parallel=128,
host="http://127.0.0.1",
port=int(self.base_url.split(":")[-1]),
)
metrics = run_eval(args)
print(f"{metrics=}")
self.assertGreater(metrics["accuracy"], 0.93)
if __name__ == "__main__":
unittest.main()