"docker/Dockerfile.arm" did not exist on "5eda21e773447d81ffc661ac094716420dc7b7cb"
test_cpu_wna16.py 765 Bytes
Newer Older
Li, Jiang's avatar
Li, Jiang committed
1
2
3
4
5
6
7
8
9
10
11
12
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import pytest

from vllm.platforms import current_platform

if not current_platform.is_cpu():
    pytest.skip("skipping CPU-only tests", allow_module_level=True)

MODELS = [
    "TheBloke/TinyLlama-1.1B-Chat-v1.0-AWQ",
    "TheBloke/TinyLlama-1.1B-Chat-v1.0-GPTQ",  # with g_idx
13
    "Qwen/Qwen1.5-0.5B-Chat-GPTQ-Int4",  # without g_idx
Li, Jiang's avatar
Li, Jiang committed
14
15
16
17
18
19
]
DTYPE = ["bfloat16"]


@pytest.mark.parametrize("model", MODELS)
@pytest.mark.parametrize("dtype", DTYPE)
20
def test_cpu_quant(vllm_runner, model, dtype):
Li, Jiang's avatar
Li, Jiang committed
21
22
23
24
    with vllm_runner(model, dtype=dtype) as llm:
        output = llm.generate_greedy(["The capital of France is"], max_tokens=32)
    assert output
    print(output)