[Bugfix][Quant] Read safetensors headers of checkpoints with other file names (#60411)

Signed-off-by: Stefan Koncarevic <Stefan.Koncarevic@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
stefankoncarevic
2026-10-08 01:38:41 -05:00
committed by GitHub
co-authored by Andreas Karatzas
parent ee406adf0c
commit 814301b268
4 changed files with 90 additions and 2 deletions
@@ -133,6 +133,11 @@ def is_layer_gptq_quantized(
quantized_layers = flatten_list(quantized_layers)
# Empty means no metadata could be read at all, not that the checkpoint
# holds no quantized layer, and loading GPTQ weights unquantized cannot work.
if not quantized_layers:
return True
# Fused layers like gate_up_proj or qkv_proj will not be fused
# in the safetensors checkpoint. So, we convert the name
# from the fused version to unfused + check to make sure that