Skip to content

[BUG] _hide_unsupported_quantization_config_for_eval no longer hides a GGUF quantization_config on transformers 5.23 #6366

Done

Description

@Qubitium

Summary

tests/test_model.py::test_hide_unsupported_quantization_config_for_eval_temporarily_clears_gguf_bits is red on main at be148244 and already red at 89dbcf91. _hide_unsupported_quantization_config_for_eval() no longer hides a GGUF quantization_config, because transformers.quantizers.AutoQuantizationConfig.from_dict() accepts it on transformers 5.23.

Reproduction

cd /root/openai-audit/sweep-main/tests
CUDA_VISIBLE_DEVICES="" \
PYTHONPATH=/root/openai-audit/sweep-main:/root/openai-audit/sweep-main/tests \
  /root/venv/bin/python -m pytest \
  "test_model.py::test_hide_unsupported_quantization_config_for_eval_temporarily_clears_gguf_bits" \
  -q -o addopts="" -p no:cacheprovider

Result: 1 failed

test_model.py:693: in test_hide_unsupported_quantization_config_for_eval_temporarily_clears_gguf_bits
    assert model.config.quantization_config is None
E   AssertionError: assert {'quant_method': 'gguf', 'format': 'gguf', 'bits': 'q4_k_m'} is None

Root cause

gptqmodel/models/auto.py:568:

try:
    from transformers.quantizers import AutoQuantizationConfig
    AutoQuantizationConfig.from_dict(dict(quantization_config))
except Exception:
    pass
else:
    yield          # <-- assumes transformers can evaluate this config
    return
setattr(config, "quantization_config", None)

For {"quant_method": "gguf", "format": "gguf", "bits": "q4_k_m"}, transformers 5.23 constructs an AutoQuantizationConfig, so the helper concludes the config is supported and leaves it set. The test (and the helper's docstring contract) says GGUF is not evaluable and must be hidden for the duration of eval.

Classification: pre-existing product bug (also red at 89dbcf91), not merge-wave induced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions