[PieceWise CUDA Graph] Support awq/gptq model in piecewise cudagraph (#12518)

This commit is contained in:
Xiaoyu Zhang
2025-11-11 11:56:15 +08:00
committed by GitHub
parent 08c805a85f
commit 9caca6a45c
7 changed files with 339 additions and 42 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ suites = {
TestFile("test_original_logprobs.py", 41),
TestFile("test_page_size.py", 60),
TestFile("test_penalty.py", 82),
TestFile("test_piecewise_cuda_graph.py", 300),
TestFile("test_piecewise_cuda_graph.py", 450),
TestFile("test_priority_scheduling.py", 130),
TestFile("test_pytorch_sampling_backend.py", 66),
TestFile("test_radix_attention.py", 105),
+38
View File
@@ -132,5 +132,43 @@ class TestPiecewiseCudaGraphDeepSeek(CustomTestCase):
self.assertGreater(metrics["accuracy"], 0.62)
class TestPiecewiseCudaGraphAWQ(CustomTestCase):
"""Test piecewise CUDA graph with AWQ quantized model"""
@classmethod
def setUpClass(cls):
cls.model = "Qwen/QwQ-32B-AWQ"
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=["--enable-piecewise-cuda-graph"],
)
@classmethod
def tearDownClass(cls):
kill_process_tree(cls.process.pid)
def test_mgsm_accuracy(self):
"""Test MGSM accuracy with AWQ model"""
num_examples = 1319
args = SimpleNamespace(
base_url=self.base_url,
model=self.model,
eval_name="mgsm_en",
num_examples=num_examples,
num_threads=min(num_examples, 1024),
)
metrics = run_eval(args)
print(f"MGSM Accuracy: {metrics['score']:.3f}")
print(f"Output throughput: {metrics.get('throughput', 'N/A')} token/s")
# Expected accuracy: 0.680, allow some variance
self.assertGreaterEqual(metrics["score"], 0.65)
if __name__ == "__main__":
unittest.main()