main
py 36 lines 906 Bytes
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
9 from .._correctness import check_mtp_correctness
10
11
12 @pytest.mark.parametrize(
13 ["model_setup", "mm_enabled", "expected_accuracy_threshold"],
14 [
15 # Reference accuracy: 65%-70%.
16 (("mtp", "XiaomiMiMo/MiMo-7B-Base", 1, None), False, 0.5),
17 ],
18 ids=["mimo"],
19 )
20 @single_gpu_only
21 def test_mtp_correctness(
22 monkeypatch: pytest.MonkeyPatch,
23 sampling_config: SamplingParams,
24 model_setup: tuple[str, str, int, str | None],
25 mm_enabled: bool,
26 expected_accuracy_threshold: float,
27 vllm_runner,
28 ):
29 check_mtp_correctness(
30 monkeypatch,
31 sampling_config,
32 model_setup,
33 mm_enabled,
34 expected_accuracy_threshold,
35 vllm_runner,
36 )