diff --git a/tests/kernels/quantization/test_awq.py b/tests/kernels/quantization/test_awq.py index 3bf59dea30..a897795802 100644 --- a/tests/kernels/quantization/test_awq.py +++ b/tests/kernels/quantization/test_awq.py @@ -27,23 +27,3 @@ def test_awq_dequantize_opcheck(monkeypatch: pytest.MonkeyPatch): torch.ops._C.awq_dequantize, (qweight, scales, zeros, split_k_iters, thx, thy), ) - - -@pytest.mark.skip(reason="Not working; needs investigation.") -@pytest.mark.skipif( - not hasattr(torch.ops._C, "awq_gemm"), - reason="AWQ is not supported on this GPU type.", -) -def test_awq_gemm_opcheck(monkeypatch: pytest.MonkeyPatch): - with monkeypatch.context() as m: - m.setenv("VLLM_USE_TRITON_AWQ", "0") - input = torch.rand((2, 8192), device="cuda", dtype=torch.float16) - qweight = torch.randint( - -2000000000, 2000000000, (8192, 256), device="cuda", dtype=torch.int32 - ) - scales = torch.empty((64, 2048), device="cuda", dtype=torch.float16) - qzeros = torch.randint( - -2000000000, 2000000000, (64, 256), device="cuda", dtype=torch.int32 - ) - split_k_iters = 8 - opcheck(torch.ops._C.awq_gemm, (input, qweight, scales, qzeros, split_k_iters)) diff --git a/tests/quantization/fp_quant.py b/tests/quantization/fp_quant.py deleted file mode 100644 index 664ce9d111..0000000000 --- a/tests/quantization/fp_quant.py +++ /dev/null @@ -1,32 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright contributors to the vLLM project -"""Test model set-up and inference for quantized HF models supported -on the GPU backend using FPQuant. - -Validating the configuration and printing results for manual checking. - -Run `pytest tests/quantization/test_fp_quant.py`. -""" - -import pytest - -from tests.quantization.utils import is_quant_method_supported - -MODELS = [ - "ISTA-DASLab/Qwen3-0.6B-RTN-NVFP4", - "ISTA-DASLab/Qwen3-0.6B-RTN-MXFP4", -] -DTYPE = ["bfloat16"] -EAGER = [True, False] - - -@pytest.mark.skipif( - not is_quant_method_supported("fp_quant"), - reason="FPQuant is not supported on this GPU type.", -) -@pytest.mark.parametrize("model", MODELS) -@pytest.mark.parametrize("eager", EAGER) -def test_fpquant(vllm_runner, model, eager): - with vllm_runner(model, enforce_eager=eager) as llm: - output = llm.generate_greedy(["1 2 3 4 5"], max_tokens=2) - assert output[0][1] == "1 2 3 4 5 6" diff --git a/tests/quantization/test_fp8.py b/tests/quantization/test_fp8.py index 4c789059c7..499955c9f6 100644 --- a/tests/quantization/test_fp8.py +++ b/tests/quantization/test_fp8.py @@ -67,70 +67,6 @@ def test_model_load_and_run( print(outputs[0][1]) -KV_CACHE_MODELS = [ - # AutoFP8 format using separate .k_scale and .v_scale - # The original checkpoint below was removed from the Hub. To unblock CI and - # until a small replacement with split K/V scales is found, skip this case. - # See PR #27717 for context. - pytest.param( - "nm-testing/Qwen2-1.5B-Instruct-FP8-K-V", - marks=pytest.mark.skip( - reason=( - "Checkpoint removed from HF; temporarily disabling this " - "AutoFP8 split K/V case (PR #27717)." - ) - ), - ), -] - - -@pytest.mark.skipif( - not is_quant_method_supported("fp8"), - reason="FP8 is not supported on this GPU type.", -) -@pytest.mark.parametrize("model_id", KV_CACHE_MODELS) -@pytest.mark.parametrize( - "use_rocm_aiter", [True, False] if current_platform.is_rocm() else [False] -) -def test_kv_cache_model_load_and_run( - vllm_runner, model_id: str, use_rocm_aiter: bool, monkeypatch -): - if use_rocm_aiter: - monkeypatch.setenv("VLLM_ROCM_USE_AITER", "1") - - # `LLM.apply_model` requires pickling a function. - monkeypatch.setenv("VLLM_ALLOW_INSECURE_SERIALIZATION", "1") - with vllm_runner(model_id, kv_cache_dtype="fp8", enforce_eager=True) as llm: - - def check_model(model): - attn = model.model.layers[0].self_attn.attn - - assert isinstance(attn.quant_method, Fp8KVCacheMethod) - - if not current_platform.is_rocm(): - # NOTE: This code path requires validation on Non-CUDA platform - # NOTE: it is valid for scales to be 1.0 (default value), but - # we know these checkpoints have scales < 1.0 - assert 0.0 < attn._k_scale < 1.0 - assert 0.0 < attn._v_scale < 1.0 - else: - # NOTE: This code path is for ROCm platform - # NOTE: it is valid for scales to be 1.0 (default value), but - # we know these checkpoints have scales < 1.0 - # However on ROCm platform, the _k_scale and _v_scale will be - # scaled by a factor of 2 as described in - # vllm/model_executor/layers/quantization/kv_cache.py - assert 0.0 < attn._k_scale < (1.0 * 2.0) - assert 0.0 < attn._v_scale < (1.0 * 2.0) - - llm.apply_model(check_model) - - # note: this does not test accuracy, just that we can run through - # see lm-eval tests for accuracy - outputs = llm.generate_greedy(["Hello my name is"], max_tokens=4) - print(outputs[0][1]) - - @pytest.mark.skipif( not is_quant_method_supported("fp8"), reason="FP8 is not supported on this GPU type.", diff --git a/vllm/model_executor/layers/quantization/__init__.py b/vllm/model_executor/layers/quantization/__init__.py index f47dcae310..53f4e7d2a8 100644 --- a/vllm/model_executor/layers/quantization/__init__.py +++ b/vllm/model_executor/layers/quantization/__init__.py @@ -156,7 +156,6 @@ def get_quantization_config(quantization: str) -> type[QuantizationConfig]: "quark": QuarkConfig, "moe_wna16": MoeWNA16Config, "torchao": TorchAOConfig, - "auto-round": INCConfig, "inc": INCConfig, "mxfp4": Mxfp4Config, "gpt_oss_mxfp4": GptOssMxfp4Config, diff --git a/vllm/model_executor/layers/quantization/fp8.py b/vllm/model_executor/layers/quantization/fp8.py index 6fc9b0d8f6..7cdb04cfbe 100644 --- a/vllm/model_executor/layers/quantization/fp8.py +++ b/vllm/model_executor/layers/quantization/fp8.py @@ -486,9 +486,6 @@ class Fp8LinearMethod(LinearMethodBase): weight_bf16 = weight_fp8 * weight_scale return torch.nn.functional.linear(x, weight_bf16.t(), bias) - if self.use_marlin: - return self.fp8_linear.apply_weights(layer, x, bias) - return self.fp8_linear.apply_weights(layer, x, bias)