Revert "[CI/Build] Add is_quant_method_supported to control quantization test configurations" (#5463)

This commit is contained in:
Simon Mo
2024-06-12 10:03:24 -07:00
committed by GitHub
parent 3dd6853bc8
commit e3c12bf6d2
8 changed files with 68 additions and 30 deletions
+11 -2
View File
@@ -4,8 +4,17 @@ Run `pytest tests/models/test_aqlm.py`.
"""
import pytest
import torch
from tests.quantization.utils import is_quant_method_supported
from vllm.model_executor.layers.quantization import QUANTIZATION_METHODS
aqlm_not_supported = True
if torch.cuda.is_available():
capability = torch.cuda.get_device_capability()
capability = capability[0] * 10 + capability[1]
aqlm_not_supported = (capability <
QUANTIZATION_METHODS["aqlm"].get_min_capability())
# In this test we hardcode prompts and generations for the model so we don't
# need to require the AQLM package as a dependency
@@ -58,7 +67,7 @@ ground_truth_generations = [
]
@pytest.mark.skipif(not is_quant_method_supported("aqlm"),
@pytest.mark.skipif(aqlm_not_supported,
reason="AQLM is not supported on this GPU type.")
@pytest.mark.parametrize("model", ["ISTA-DASLab/Llama-2-7b-AQLM-2Bit-1x16-hf"])
@pytest.mark.parametrize("dtype", ["half"])