From 677930c2760aea06cfba63b5f43464a60ed32906 Mon Sep 17 00:00:00 2001 From: Qiaolin Yu Date: Sun, 21 Dec 2025 22:27:02 -0800 Subject: [PATCH] Add glm-4.6-fp8 with/without mtp in nightly ci (#15566) --- .../8-gpu-models/test_glm_46_fp8.py | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 test/registered/8-gpu-models/test_glm_46_fp8.py diff --git a/test/registered/8-gpu-models/test_glm_46_fp8.py b/test/registered/8-gpu-models/test_glm_46_fp8.py new file mode 100644 index 000000000..6eafed22c --- /dev/null +++ b/test/registered/8-gpu-models/test_glm_46_fp8.py @@ -0,0 +1,67 @@ +import sys +import unittest +from pathlib import Path + +# Add nightly directory to path for run_combined_tests import +sys.path.insert(0, str(Path(__file__).parent.parent.parent / "nightly")) + +from accuracy_test_runner import AccuracyTestParams +from performance_test_runner import PerformanceTestParams +from run_combined_tests import run_combined_tests + +from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.test_utils import ModelLaunchSettings + +# Runs on both H200 and B200 via nightly-8-gpu-common suite +register_cuda_ci(est_time=12000, suite="nightly-8-gpu-common", nightly=True) + +GLM_4_6_FP8_MODEL_PATH = "zai-org/GLM-4.6-FP8" + + +class TestGLM46FP8Unified(unittest.TestCase): + """Unified test class for GLM-4.6-FP8 performance and accuracy. + + Single variant with simple TP=8 configuration. + Runs BOTH: + - Performance test (using NightlyBenchmarkRunner) + - Accuracy test (using run_eval with mgsm_en) + """ + + def test_glm_46_fp8_all_variants(self): + """Run performance and accuracy for GLM-4.6-FP8.""" + base_args = [ + "--tp=8", + "--trust-remote-code", + ] + mtp_args = [ + "--speculative-algorithm=EAGLE", + "--speculative-num-steps=3", + "--speculative-eagle-topk=1", + "--speculative-num-draft-tokens=4", + ] + + variants = [ + ModelLaunchSettings( + GLM_4_6_FP8_MODEL_PATH, + tp_size=8, + extra_args=base_args, + ), + ModelLaunchSettings( + GLM_4_6_FP8_MODEL_PATH, + tp_size=8, + extra_args=base_args + mtp_args, + ), + ] + + run_combined_tests( + models=variants, + test_name="GLM-4.6-FP8 Unified", + accuracy_params=AccuracyTestParams(dataset="gsm8k", baseline_accuracy=0.80), + performance_params=PerformanceTestParams( + profile_dir="performance_profiles_glm_4_6_fp8", + ), + ) + + +if __name__ == "__main__": + unittest.main()