[AMD] Clean up DeepSeek-R1-MXFP4 TP2/TP4 MLA GSM8K tests (#27243)

This commit is contained in:
Bingxu Chen
2026-06-21 21:41:19 -07:00
committed by GitHub
parent 0642cd5020
commit e2540188ce
2 changed files with 4 additions and 36 deletions
@@ -9,11 +9,6 @@ Registry: nightly-amd-2-gpu-mi35x-deepseek-r1-mxfp4-tp2 suite
import ast
import os
# Set HF cache for MI35x.
os.environ.setdefault("HF_HOME", "/data2/models/huggingface")
os.environ.setdefault("HF_HUB_CACHE", "/data2/models/huggingface/hub")
import re
import time
import unittest
@@ -39,21 +34,10 @@ register_amd_ci(
INVALID = -9999999
DEEPSEEK_R1_MXFP4_LOCAL_PATH = "/data2/models/amd-DeepSeek-R1-MXFP4-Preview"
DEEPSEEK_R1_MXFP4_HF_MODEL_ID = "amd/DeepSeek-R1-MXFP4-Preview"
SERVER_LAUNCH_TIMEOUT = 3600
GSM8K_ACCURACY_THRESHOLD = 0.93
def get_model_path() -> str:
env_path = os.environ.get("DEEPSEEK_R1_MXFP4_MODEL_PATH")
if env_path:
return env_path
if os.path.exists(DEEPSEEK_R1_MXFP4_LOCAL_PATH):
return DEEPSEEK_R1_MXFP4_LOCAL_PATH
return DEEPSEEK_R1_MXFP4_HF_MODEL_ID
def get_one_example(lines, i, include_answer):
ret = "Question: " + lines[i]["question"] + "\nAnswer:"
if include_answer:
@@ -128,9 +112,9 @@ def run_gsm8k_benchmark(
class TestDeepSeekR1MXFP4TP2MI35x(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.model = get_model_path()
cls.model = os.environ.get("DEEPSEEK_R1_MXFP4_MODEL_PATH", "amd/DeepSeek-R1-MXFP4-Preview")
cls.base_url = DEFAULT_URL_FOR_TEST
cls.num_questions = int(os.environ.get("GSM8K_NUM_QUESTIONS", "200"))
cls.num_questions = int(os.environ.get("GSM8K_NUM_QUESTIONS", "1319"))
env = os.environ.copy()
env["SGLANG_USE_AITER"] = "1"
@@ -8,11 +8,6 @@ Registry: nightly-amd-8-gpu-mi35x-deepseek-r1-mxfp4-tp4 suite
import ast
import os
# Set HF cache for MI35x.
os.environ.setdefault("HF_HOME", "/data2/models/huggingface")
os.environ.setdefault("HF_HUB_CACHE", "/data2/models/huggingface/hub")
import re
import time
import unittest
@@ -38,21 +33,10 @@ register_amd_ci(
INVALID = -9999999
DEEPSEEK_R1_MXFP4_LOCAL_PATH = "/data2/models/amd-DeepSeek-R1-MXFP4-Preview"
DEEPSEEK_R1_MXFP4_HF_MODEL_ID = "amd/DeepSeek-R1-MXFP4-Preview"
SERVER_LAUNCH_TIMEOUT = 3600
GSM8K_ACCURACY_THRESHOLD = 0.93
def get_model_path() -> str:
env_path = os.environ.get("DEEPSEEK_R1_MXFP4_MODEL_PATH")
if env_path:
return env_path
if os.path.exists(DEEPSEEK_R1_MXFP4_LOCAL_PATH):
return DEEPSEEK_R1_MXFP4_LOCAL_PATH
return DEEPSEEK_R1_MXFP4_HF_MODEL_ID
def get_one_example(lines, i, include_answer):
ret = "Question: " + lines[i]["question"] + "\nAnswer:"
if include_answer:
@@ -127,9 +111,9 @@ def run_gsm8k_benchmark(
class TestDeepSeekR1MXFP4TP4MI35x(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.model = get_model_path()
cls.model = os.environ.get("DEEPSEEK_R1_MXFP4_MODEL_PATH", "amd/DeepSeek-R1-MXFP4-Preview")
cls.base_url = DEFAULT_URL_FOR_TEST
cls.num_questions = int(os.environ.get("GSM8K_NUM_QUESTIONS", "200"))
cls.num_questions = int(os.environ.get("GSM8K_NUM_QUESTIONS", "1319"))
env = os.environ.copy()
env["SGLANG_USE_AITER"] = "1"