main
py 44 lines 1.17 KB
Raw
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4 import pytest
5
6 from tests.utils import single_gpu_only
7 from vllm import SamplingParams
8 from vllm.platforms import current_platform
9
10 from .._correctness import check_mtp_correctness
11
12
13 @pytest.mark.parametrize(
14 ["model_setup", "mm_enabled", "expected_accuracy_threshold"],
15 [
16 pytest.param(
17 ("mtp", "ZixiQi/DeepSeek-V3-4layers-MTP-FP8", 1, None),
18 False,
19 0.0,
20 marks=pytest.mark.skipif(
21 current_platform.is_device_capability_family(100),
22 reason="DeepSeek MTP: TRTLLM MoE top_k check fails on Blackwell",
23 ),
24 ), # dummy model
25 ],
26 ids=["deepseek"],
27 )
28 @single_gpu_only
29 def test_mtp_correctness(
30 monkeypatch: pytest.MonkeyPatch,
31 sampling_config: SamplingParams,
32 model_setup: tuple[str, str, int, str | None],
33 mm_enabled: bool,
34 expected_accuracy_threshold: float,
35 vllm_runner,
36 ):
37 check_mtp_correctness(
38 monkeypatch,
39 sampling_config,
40 model_setup,
41 mm_enabled,
42 expected_accuracy_threshold,
43 vllm_runner,
44 )