Skip to content

tests: add ds r1 tp4 test #5197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 67 additions & 11 deletions tests/integration/defs/accuracy/test_llm_api_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,7 @@ def test_no_kv_cache_reuse(self, quant_dtype, mtp_nextn, fp8kv,
task.evaluate(llm)


@pytest.mark.skip_less_device_memory(80000)
class TestDeepSeekR1(LlmapiAccuracyTestHarness):
MODEL_NAME = "deepseek-ai/DeepSeek-R1"
MODEL_PATH = f"{llm_models_root()}/DeepSeek-R1/DeepSeek-R1"
Expand All @@ -999,15 +1000,69 @@ class TestDeepSeekR1(LlmapiAccuracyTestHarness):
"tp_size,pp_size,ep_size,mtp_nextn,fp8kv,attention_dp,cuda_graph,overlap_scheduler,max_batch_size,moe_backend",
[
# Use a larger batch_size to speed up the tests
(8, 1, 4, 3, False, False, True, True, 32, "CUTLASS"),
(8, 1, 4, 3, False, False, True, True, 32, "TRTLLM"),
(8, 1, 8, 0, True, True, True, True, 32, "CUTLASS"),
(8, 1, 1, 0, True, True, True, True, 32, "CUTLASS"),
pytest.param(8,
1,
4,
3,
False,
False,
True,
True,
32,
"CUTLASS",
marks=pytest.mark.skip_less_device(8)),
pytest.param(8,
1,
4,
3,
False,
False,
True,
True,
32,
"TRTLLM",
marks=pytest.mark.skip_less_device(8)),
pytest.param(8,
1,
8,
0,
True,
True,
True,
True,
32,
"CUTLASS",
marks=pytest.mark.skip_less_device(8)),
pytest.param(8,
1,
1,
0,
True,
True,
True,
True,
32,
"CUTLASS",
marks=pytest.mark.skip_less_device(8)),
pytest.param(4,
1,
1,
0,
True,
True,
True,
True,
32,
"CUTLASS",
marks=pytest.mark.skip_less_device(4)),
],
ids=["latency", "latency_trtllmgen", "throughput", "throughput_tp8"])
def test_nvfp4_8gpus(self, tp_size, pp_size, ep_size, mtp_nextn, fp8kv,
attention_dp, cuda_graph, overlap_scheduler,
max_batch_size, moe_backend):
ids=[
"latency", "latency_trtllmgen", "throughput", "throughput_tp8",
"throughput_tp4"
])
def test_nvfp4_multi_gpus(self, tp_size, pp_size, ep_size, mtp_nextn, fp8kv,
attention_dp, cuda_graph, overlap_scheduler,
max_batch_size, moe_backend):

kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.9)
pytorch_config = dict(disable_overlap_scheduler=not overlap_scheduler,
Expand Down Expand Up @@ -1044,9 +1099,10 @@ def test_nvfp4_8gpus(self, tp_size, pp_size, ep_size, mtp_nextn, fp8kv,
task.evaluate(llm)
task = GSM8K(self.MODEL_NAME)
task.evaluate(llm)
task = GPQADiamond(self.MODEL_NAME)
task.evaluate(llm,
extra_evaluator_kwargs=dict(apply_chat_template=True))
# Commented out because GPQA takes too long to run
# task = GPQADiamond(self.MODEL_NAME)
# task.evaluate(llm,
# extra_evaluator_kwargs=dict(apply_chat_template=True))

@pytest.mark.skip_less_mpi_world_size(8)
@skip_pre_hopper
Expand Down
9 changes: 5 additions & 4 deletions tests/integration/test_lists/qa/examples_test_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,11 @@ accuracy/test_cli_flow.py::TestNemotronUltra::test_auto_dtype[tp8-cuda_graph=Tru
accuracy/test_cli_flow.py::TestNemotronUltra::test_fp8_prequantized[tp8-cuda_graph=True]
accuracy/test_llm_api_pytorch.py::TestNemotronH::test_auto_dtype
accuracy/test_llm_api_pytorch.py::TestQwen2_7BInstruct::test_auto_dtype
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_8gpus[latency]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_8gpus[latency_trtllmgen]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_8gpus[throughput]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_8gpus[throughput_tp8]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_multi_gpus[latency]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_multi_gpus[latency_trtllmgen]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_multi_gpus[throughput]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_multi_gpus[throughput_tp8]
accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_multi_gpus[throughput_tp4]
accuracy/test_llm_api_pytorch.py::TestQwen3_8B::test_fp8_block_scales[latency]
accuracy/test_llm_api_pytorch.py::TestQwen3_30B_A3B::test_fp8_block_scales[latency]
accuracy/test_llm_api_pytorch.py::TestQwen3_30B_A3B::test_nvfp4[latency_moe_cutlass]
Expand Down