[CI] Fix Llama 3.1 8B FP4 CI (#14699)

This commit is contained in:
b8zhong
2025-12-08 22:27:15 -08:00
committed by GitHub
parent da3dc497b0
commit 0f8bd55f3e
+5 -7
View File
@@ -14,15 +14,13 @@ MODEL_PATH = "nvidia/Llama-3.1-8B-Instruct-FP4"
@unittest.skipIf(get_device_sm() < 100, "Test requires CUDA SM 100 or higher") @unittest.skipIf(get_device_sm() < 100, "Test requires CUDA SM 100 or higher")
class TestLlama31FP4B200(unittest.TestCase): class TestLlama31FP4(unittest.TestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
cls.model = MODEL_PATH cls.model = MODEL_PATH
cls.base_url = DEFAULT_URL_FOR_TEST cls.base_url = DEFAULT_URL_FOR_TEST
other_args = [ other_args = [
"--trust-remote-code", "--trust-remote-code",
"--mem-fraction-static",
"0.8",
"--quantization", "--quantization",
"modelopt_fp4", "modelopt_fp4",
] ]
@@ -40,18 +38,18 @@ class TestLlama31FP4B200(unittest.TestCase):
def test_gsm8k(self): def test_gsm8k(self):
parsed_url = urlparse(self.base_url) parsed_url = urlparse(self.base_url)
args = SimpleNamespace( args = SimpleNamespace(
num_shots=4, num_shots=5,
data_path=None, data_path=None,
num_questions=100, num_questions=1319,
max_new_tokens=512, max_new_tokens=512,
parallel=128, parallel=200,
host=f"{parsed_url.scheme}://{parsed_url.hostname}", host=f"{parsed_url.scheme}://{parsed_url.hostname}",
port=parsed_url.port, port=parsed_url.port,
) )
metrics = run_eval_few_shot_gsm8k(args) metrics = run_eval_few_shot_gsm8k(args)
print(metrics) print(metrics)
self.assertGreater(metrics["accuracy"], 0.61) self.assertGreater(metrics["accuracy"], 0.54)
if __name__ == "__main__": if __name__ == "__main__":