[Compressed Tensors] Allow configs with non-explicit ignores (#41965)

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
This commit is contained in:
Kyle Sayers
2026-05-07 14:03:45 -07:00
committed by GitHub
parent 969fbfb4a9
commit c1819ca283
3 changed files with 34 additions and 19 deletions
@@ -32,6 +32,9 @@ from vllm.model_executor.layers.quantization.compressed_tensors.compressed_tenso
CompressedTensorsW8A16Fp8,
CompressedTensorsWNA16,
)
from vllm.model_executor.layers.quantization.compressed_tensors.utils import (
find_matched_target,
)
from vllm.model_executor.layers.quantization.input_quant_fp8 import QuantFP8
from vllm.model_executor.layers.quantization.utils.nvfp4_utils import (
cutlass_fp4_supported,
@@ -635,6 +638,24 @@ def test_get_quant_method_returns_none_for_unmatched_parallel_lm_head():
)
def test_find_matched_target_returns_none_on_no_match():
result = find_matched_target(
layer_name="model.layers.0.self_attn.qkv_proj",
module=Mock(spec=torch.nn.Linear),
targets=["no_match_target"],
)
assert result is None
def test_get_scheme_dict_returns_none_on_no_match():
config = _make_ct_config(target="matched_layer")
result = config.get_scheme_dict(
layer=Mock(spec=torch.nn.Linear),
layer_name="model.layers.0.unmatched_layer",
)
assert result is None
@pytest.mark.skipif(
not current_platform.is_cuda() or not current_platform.has_device_capability(75),
reason="MXFP8 requires Turing (sm_75+) or newer.",