| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # SPDX-FileCopyrightText: Copyright contributors to the vLLM project |
| 3 | import pytest |
| 4 | |
| 5 | from vllm.platforms import current_platform |
| 6 | |
| 7 | if not current_platform.is_cpu(): |
| 8 | pytest.skip("skipping CPU-only tests", allow_module_level=True) |
| 9 | |
| 10 | MODELS = [ |
| 11 | "RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w8a8", # INT8 W8A8 MoE |
| 12 | ] |
| 13 | DTYPE = ["bfloat16"] |
| 14 | |
| 15 | |
| 16 | @pytest.mark.parametrize("model", MODELS) |
| 17 | @pytest.mark.parametrize("dtype", DTYPE) |
| 18 | def test_cpu_w8a8(vllm_runner, model, dtype): |
| 19 | with vllm_runner(model, dtype=dtype) as llm: |
| 20 | output = llm.generate_greedy(["The capital of France is"], max_tokens=32) |
| 21 | assert output |
| 22 | print(output) |