diff --git a/.github/workflows/scripts/estimated_times.yaml b/.github/workflows/scripts/estimated_times.yaml index 42000d552183..10ba5cbe453f 100644 --- a/.github/workflows/scripts/estimated_times.yaml +++ b/.github/workflows/scripts/estimated_times.yaml @@ -114,8 +114,6 @@ estimated_times: tests/e2e/pull_request/four_card/spec_decode/test_mtp_qwen3_next.py: 730 tests/e2e/pull_request/four_card/spec_decode/test_dspark_deepseekv4.py: 1280 tests/e2e/pull_request/four_card/spec_decode/test_mtp_step3p5.py: 30 - tests/e2e/pull_request/eight_card/test_glm5_2.py: 1360 - tests/e2e/pull_request/eight_card/model_runner_v2/test_glm5_2.py: 1360 tests/e2e/pull_request/eight_card/model_runner_v2/test_spec_pp_accuracy.py: 600 tests/e2e/pull_request/four_card/test_data_parallel_tp2.py: 20 tests/e2e/pull_request/four_card/test_sequence_parallel_linear.py: 340 diff --git a/tests/e2e/pull_request/eight_card/model_runner_v2/test_glm5_2.py b/tests/e2e/pull_request/eight_card/model_runner_v2/test_glm5_2.py deleted file mode 100644 index af548732fbfe..000000000000 --- a/tests/e2e/pull_request/eight_card/model_runner_v2/test_glm5_2.py +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright (c) 2026 Huawei Technologies Co., Ltd. All Rights Reserved. -# Copyright 2023 The vLLM team. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# This file is a part of the vllm-ascend project. - -import os -from unittest.mock import patch - -import pytest -from vllm.config import CompilationConfig - -from tests.e2e.conftest import wait_until_npu_memory_free -from tests.e2e.pull_request.utils import _run_speculative_decoding - -MODEL = "Eco-Tech/GLM-5.2-w4a8" -DRAFT_MODEL = "RedHatAI/GLM-5.2-speculator.dspark" -EXPECTED_ACCEPTANCE_LENGTH = 3.0 -DSPARK_EXPECTED_ACCEPTANCE_LENGTH = 3.5 - - -@pytest.mark.e2e_model(MODEL) -@pytest.mark.e2e_coverage( - arch="moe", - feature="mtp", - parallel="TP,EP", - deploy="pd_mix", - hardware="A3", - quantization="W4A8", - graph_mode="full_decode_only", -) -@patch.dict( - os.environ, - { - "VLLM_USE_V2_MODEL_RUNNER": "1", - "VLLM_WORKER_MULTIPROC_METHOD": "spawn", - "PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True", - }, -) -@wait_until_npu_memory_free() -def test_glm5_2_mtp_full_decode_only() -> None: - _run_speculative_decoding( - model_name=MODEL, - speculative_config={ - "method": "mtp", - "num_speculative_tokens": 3, - }, - expected_acceptance_length=EXPECTED_ACCEPTANCE_LENGTH, - runner_kwargs={ - "quantization": "ascend", - "tensor_parallel_size": 8, - "max_model_len": 8192, - "compilation_config": CompilationConfig(cudagraph_mode="FULL_DECODE_ONLY"), - }, - ) - - -@pytest.mark.e2e_model(MODEL) -@pytest.mark.e2e_coverage( - arch="moe", - feature="dspark", - parallel="TP,EP", - deploy="pd_mix", - hardware="A3", - quantization="W4A8", - graph_mode="eager,full_decode_only", -) -@patch.dict( - os.environ, - { - "VLLM_USE_V2_MODEL_RUNNER": "1", - "VLLM_WORKER_MULTIPROC_METHOD": "spawn", - "PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True", - "HCCL_BUFFSIZE": "1024", - "HCCL_OP_EXPANSION_MODE": "AIV", - }, -) -@wait_until_npu_memory_free() -@pytest.mark.parametrize("enable_adaptive_verification", [False, True], ids=["fixed", "adaptive"]) -def test_glm5_2_dspark_eager(enable_adaptive_verification: bool) -> None: - _run_speculative_decoding( - model_name=MODEL, - speculative_config={ - "method": "dspark", - "model": DRAFT_MODEL, - "num_speculative_tokens": 7, - "enforce_eager": not enable_adaptive_verification, - **({"enable_adaptive_verification": True} if enable_adaptive_verification else {}), - }, - # The adaptive case is a functional smoke test, not an acceptance-length - # regression test, so it allows the full valid range [1, K + 1]. - expected_acceptance_length=4.5 if enable_adaptive_verification else DSPARK_EXPECTED_ACCEPTANCE_LENGTH, - runner_kwargs={ - "quantization": "ascend", - "tensor_parallel_size": 8, - "max_model_len": 4096, - "max_num_batched_tokens": 2048, - "enforce_eager": not enable_adaptive_verification, - "enable_prefix_caching": False, - "async_scheduling": False, - **( - {"compilation_config": CompilationConfig(cudagraph_mode="FULL_DECODE_ONLY")} - if enable_adaptive_verification - else {} - ), - }, - acceptance_length_rtol=0.78 if enable_adaptive_verification else 0.1, - ) diff --git a/tests/e2e/pull_request/eight_card/test_glm5_2.py b/tests/e2e/pull_request/eight_card/test_glm5_2.py deleted file mode 100644 index 1e745b8a5c49..000000000000 --- a/tests/e2e/pull_request/eight_card/test_glm5_2.py +++ /dev/null @@ -1,118 +0,0 @@ -# -# Copyright (c) 2026 Huawei Technologies Co., Ltd. All Rights Reserved. -# Copyright 2023 The vLLM team. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# This file is a part of the vllm-ascend project. -# Adapted from vllm/tests/basic_correctness/test_basic_correctness.py -# -"""Validate GLM-5.2 generation with DSpark and MTP speculative decoding. - -Run pytest tests/e2e/pull_request/eight_card/test_glm5_2.py. -""" - -import os -from unittest.mock import patch - -import pytest -from vllm.config import CompilationConfig - -from tests.e2e.pull_request.utils import _run_speculative_decoding - -MAIN_MODEL = "Eco-Tech/GLM-5.2-w4a8" -SPECULATOR_MODEL = "RedHatAI/GLM-5.2-speculator.dspark" -DSPARK_NUM_SPECULATIVE_TOKENS = 7 -MTP_NUM_SPECULATIVE_TOKENS = 3 -DSPARK_EXPECTED_ACCEPTANCE_LENGTH = 3.83 -MTP_EXPECTED_ACCEPTANCE_LENGTH = 3.06 - -os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn" - - -@pytest.mark.e2e_model(MAIN_MODEL) -@pytest.mark.e2e_coverage( - arch="moe", - feature="spec_decode,aclgraph", - parallel="TP,EP", - deploy="pd_mix", - hardware="A3", - quantization="W4A8", - graph_mode="full_decode_only", -) -@patch.dict( - os.environ, - { - "HCCL_BUFFSIZE": "512", - "HCCL_OP_EXPANSION_MODE": "AIV", - "LCCL_DETERMINISTIC": "1", - "HCCL_DETERMINISTIC": "true", - "ATB_MATMUL_SHUFFLE_K_ENABLE": "0", - "CLOSE_MATMUL_K_SHIFT": "1", - }, -) -def test_glm_5_2_dspark_acceptance_tp8() -> None: - _run_speculative_decoding( - model_name=MAIN_MODEL, - speculative_config={ - "method": "dspark", - "model": SPECULATOR_MODEL, - "num_speculative_tokens": DSPARK_NUM_SPECULATIVE_TOKENS, - "enforce_eager": True, - }, - expected_acceptance_length=DSPARK_EXPECTED_ACCEPTANCE_LENGTH, - runner_kwargs={ - "quantization": "ascend", - "tensor_parallel_size": 8, - "max_model_len": 8192, - "compilation_config": CompilationConfig(cudagraph_mode="FULL_DECODE_ONLY"), - }, - ) - - -@pytest.mark.e2e_model(MAIN_MODEL) -@pytest.mark.e2e_coverage( - arch="moe", - feature="mtp,aclgraph", - parallel="TP,EP", - deploy="pd_mix", - hardware="A3", - quantization="W4A8", - graph_mode="full_decode_only", -) -@patch.dict( - os.environ, - { - "HCCL_BUFFSIZE": "512", - "HCCL_OP_EXPANSION_MODE": "AIV", - "LCCL_DETERMINISTIC": "1", - "HCCL_DETERMINISTIC": "true", - "ATB_MATMUL_SHUFFLE_K_ENABLE": "0", - "CLOSE_MATMUL_K_SHIFT": "1", - }, -) -def test_glm_5_2_mtp_acceptance_tp8() -> None: - _run_speculative_decoding( - model_name=MAIN_MODEL, - speculative_config={ - "method": "deepseek_mtp", - "num_speculative_tokens": MTP_NUM_SPECULATIVE_TOKENS, - "enforce_eager": True, - }, - expected_acceptance_length=MTP_EXPECTED_ACCEPTANCE_LENGTH, - runner_kwargs={ - "quantization": "ascend", - "tensor_parallel_size": 8, - "max_model_len": 8192, - "compilation_config": CompilationConfig(cudagraph_mode="FULL_DECODE_ONLY"), - }, - )