-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[TRTLLM-13948][test] Add DeepSeek R1/V3.2/V3-Lite disaggregated accur… #16344
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1371,15 +1371,12 @@ def test_kv_cache_v2_nixl_python(self): | |
| } | ||
| disaggregated_server_config = { | ||
| "hostname": "localhost", | ||
| "port": 8000, | ||
| "backend": "pytorch", | ||
| "context_servers": { | ||
| "num_instances": 1, | ||
| "urls": ["localhost:8001"] | ||
| "num_instances": 1 | ||
| }, | ||
| "generation_servers": { | ||
| "num_instances": 1, | ||
| "urls": ["localhost:8002"] | ||
| "num_instances": 1 | ||
| } | ||
| } | ||
| with launch_disaggregated_llm(disaggregated_server_config, | ||
|
|
@@ -1843,6 +1840,61 @@ def test_auto_dtype_with_helix(self, comms_medium, cuda_graph_config, | |
| max_workers=128) as llm: | ||
| run_accuracy_test(llm, self.MODEL_NAME, ["GSM8K"]) | ||
|
|
||
| @pytest.mark.skip_less_device(4) | ||
| @pytest.mark.parametrize("use_kv_cache_manager_v2", [False], | ||
| ids=["cache_mgr_v1"]) | ||
| def test_kv_cache_v2_nixl_python(self, use_kv_cache_manager_v2): | ||
| """Test with KV cache manager v1, block_reuse=False, backend=NIXL, transceiver_runtime=PYTHON.""" | ||
| max_num_tokens = 8192 | ||
| moe_config = {"backend": "TRTLLM", "max_num_tokens": max_num_tokens} | ||
| ctx_server_config = { | ||
| "disable_overlap_scheduler": True, | ||
| "kv_cache_config": { | ||
| "free_gpu_memory_fraction": 0.5, | ||
| "enable_block_reuse": False, | ||
| "use_kv_cache_manager_v2": use_kv_cache_manager_v2 | ||
| }, | ||
| "cache_transceiver_config": { | ||
| "backend": "NIXL", | ||
| "transceiver_runtime": "PYTHON", | ||
| "max_tokens_in_buffer": 4096 | ||
| }, | ||
| "tensor_parallel_size": 2, | ||
| "moe_expert_parallel_size": 2, | ||
| "enable_autotuner": False, | ||
| } | ||
| gen_server_config = { | ||
| "disable_overlap_scheduler": False, | ||
| "moe_config": moe_config, | ||
| "kv_cache_config": { | ||
| "free_gpu_memory_fraction": 0.5, | ||
| "enable_block_reuse": False, | ||
| "use_kv_cache_manager_v2": use_kv_cache_manager_v2 | ||
| }, | ||
| "cache_transceiver_config": { | ||
| "backend": "NIXL", | ||
| "transceiver_runtime": "PYTHON", | ||
| "max_tokens_in_buffer": 4096 | ||
| }, | ||
| "tensor_parallel_size": 2, | ||
| "moe_expert_parallel_size": 2, | ||
| "enable_autotuner": False, | ||
| } | ||
| disaggregated_server_config = { | ||
| "hostname": "localhost", | ||
| "backend": "pytorch", | ||
| "context_servers": { | ||
| "num_instances": 1, | ||
| }, | ||
| "generation_servers": { | ||
| "num_instances": 1, | ||
| } | ||
| } | ||
| with launch_disaggregated_llm(disaggregated_server_config, | ||
| ctx_server_config, gen_server_config, | ||
| self.MODEL_PATH) as llm: | ||
| run_accuracy_test(llm, self.MODEL_NAME, ["GSM8K"]) | ||
|
|
||
|
|
||
| @pytest.mark.timeout(DEFAULT_TEST_TIMEOUT) | ||
| @skip_pre_hopper | ||
|
|
@@ -2754,3 +2806,66 @@ def test_auto_dtype(self): | |
| server_waiting_timeout=3600) as llm: | ||
| task = MMLU(self.MODEL_NAME) | ||
| task.evaluate(llm, is_integration_test=True) | ||
|
|
||
|
|
||
| @pytest.mark.timeout(DEFAULT_TEST_TIMEOUT) | ||
| @skip_pre_blackwell | ||
| @pytest.mark.skip_less_device_memory(80000) | ||
| class TestDeepSeekR1(LlmapiAccuracyTestHarness): | ||
| MODEL_NAME = "deepseek-ai/DeepSeek-R1" | ||
| MODEL_PATH = f"{llm_models_root()}/DeepSeek-R1-0528-FP4-v2" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please verify the R1 model path? The existing CI model mapping and R1 tests use DeepSeek-R1/DeepSeek-R1-0528-FP4-v2, while this test currently omits the DeepSeek-R1/ parent directory. Unless there is a separate top-level symlink, this is likely to fail when loading the model.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be |
||
|
|
||
| @pytest.mark.skip_less_device(4) | ||
| @pytest.mark.parametrize("use_kv_cache_manager_v2", [False], | ||
| ids=["cache_mgr_v1"]) | ||
| def test_kv_cache_v2_nixl_python(self, use_kv_cache_manager_v2): | ||
| """Test with KV cache manager v1, block_reuse=False, backend=NIXL, transceiver_runtime=PYTHON.""" | ||
| max_num_tokens = 8192 | ||
| moe_config = {"backend": "TRTLLM", "max_num_tokens": max_num_tokens} | ||
| ctx_server_config = { | ||
| "disable_overlap_scheduler": True, | ||
| "kv_cache_config": { | ||
| "free_gpu_memory_fraction": 0.5, | ||
| "enable_block_reuse": False, | ||
| "use_kv_cache_manager_v2": use_kv_cache_manager_v2 | ||
| }, | ||
| "cache_transceiver_config": { | ||
| "backend": "NIXL", | ||
| "transceiver_runtime": "PYTHON", | ||
| "max_tokens_in_buffer": 4096 | ||
| }, | ||
| "tensor_parallel_size": 2, | ||
| "moe_expert_parallel_size": 2, | ||
| "enable_autotuner": False, | ||
| } | ||
| gen_server_config = { | ||
| "disable_overlap_scheduler": False, | ||
| "moe_config": moe_config, | ||
| "kv_cache_config": { | ||
| "free_gpu_memory_fraction": 0.5, | ||
| "enable_block_reuse": False, | ||
| "use_kv_cache_manager_v2": use_kv_cache_manager_v2 | ||
| }, | ||
| "cache_transceiver_config": { | ||
| "backend": "NIXL", | ||
| "transceiver_runtime": "PYTHON", | ||
| "max_tokens_in_buffer": 4096 | ||
| }, | ||
| "tensor_parallel_size": 2, | ||
| "moe_expert_parallel_size": 2, | ||
| "enable_autotuner": False, | ||
| } | ||
| disaggregated_server_config = { | ||
| "hostname": "localhost", | ||
| "backend": "pytorch", | ||
| "context_servers": { | ||
| "num_instances": 1, | ||
| }, | ||
| "generation_servers": { | ||
| "num_instances": 1, | ||
| } | ||
| } | ||
| with launch_disaggregated_llm(disaggregated_server_config, | ||
| ctx_server_config, gen_server_config, | ||
| self.MODEL_PATH) as llm: | ||
| run_accuracy_test(llm, self.MODEL_NAME, ["GSM8K"]) | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,8 @@ l0_dgx_b300: | |
| - accuracy/test_llm_api_pytorch.py::TestGPTOSS::test_w4a16[dp4-auto] | ||
| - accuracy/test_llm_api_pytorch.py::TestGPTOSS::test_w4a16[dp4-fp8] | ||
| - accuracy/test_disaggregated_serving.py::TestQwen3_8B::test_nixl_backend | ||
| - accuracy/test_disaggregated_serving.py::TestDeepSeekR1::test_kv_cache_v2_nixl_python[cache_mgr_v1] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed that the new accuracy test IDs are added under the stage: post_merge condition. If the intention is to use them as the PR pre-merge gate for the migration, they will not run automatically in the standard pre-merge pipeline. Is post-merge placement intentional, with targeted bot-run validation planned? |
||
| - accuracy/test_disaggregated_serving.py::TestDeepSeekV32Exp::test_kv_cache_v2_nixl_python[cache_mgr_v1] | ||
| - accuracy/test_disaggregated_serving.py::TestDeepSeekV3Lite::test_nixl_backend | ||
| - accuracy/test_disaggregated_serving.py::TestDeepSeekV3Lite::test_kv_cache_v2_nixl_python | ||
| - accuracy/test_disaggregated_serving.py::TestLlama3_1_8BInstruct::test_kv_cache_v2_nixl_python | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This test does not have memory guard.