[Feature] Qwen3-Next & FLA: Support MTP topk>1; Up to 6% faster (#11133)

Co-authored-by: Stefan He <hebiaobuaa@gmail.com>
This commit is contained in:
Binyao Jiang
2025-11-01 19:47:56 -07:00
committed by GitHub
co-authored by Stefan He
parent c550ab9125
commit 3451fc3280
6 changed files with 492 additions and 78 deletions
+47 -2
View File
@@ -59,11 +59,56 @@ class TestQwen3NextMTP(CustomTestCase):
"--speculative-algorithm",
"NEXTN",
"--speculative-num-steps",
"1",
"3",
"--speculative-eagle-topk",
"1",
"--speculative-num-draft-tokens",
"2",
"4",
"--mem-fraction-static",
"0.8",
"--tp",
"4",
],
)
@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)
class TestQwen3NextMTPTopk(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=[
"--trust-remote-code",
"--speculative-algorithm",
"NEXTN",
"--speculative-num-steps",
"5",
"--speculative-eagle-topk",
"4",
"--speculative-num-draft-tokens",
"8",
"--mem-fraction-static",
"0.8",
"--tp",