transformers/tests/quantization
David LaPalomento b45cf0e90a
Guard against unset resolved_archive_file (#35628)
* archive_file may not be specified
When loading a pre-trained model from a gguf file, resolved_archive_file may not be set. Guard against that case in the safetensors availability check.

* Remap partial disk offload to cpu for GGUF files
GGUF files don't support disk offload so attempt to remap them to the CPU when device_map is auto. If device_map is anything else but None, raise a NotImplementedError.

* Don't remap auto device_map and raise RuntimeError
If device_map=auto and modules are selected for disk offload, don't attempt to map them to any other device. Raise a runtime error when a GGUF model is configured to map any modules to disk.

---------

Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>
2025-02-14 14:44:31 +01:00
..
aqlm_integration
autoawq
bitnet_integration
bnb use torch.testing.assertclose instead to get more details about error in cis (#35659) 2025-01-24 16:55:28 +01:00
compressed_tensor
eetq_integration
fbgemm_fp8
finegrained_fp8 Add require_read_token to fp8 tests (#36189) 2025-02-14 12:27:35 +01:00
ggml Guard against unset resolved_archive_file (#35628) 2025-02-14 14:44:31 +01:00
gptq
higgs New HIGGS quantization interfaces, JIT kernel compilation support. (#36148) 2025-02-14 12:26:45 +01:00
hqq
quanto_integration
spqr_integration Efficient Inference Kernel for SpQR (#34976) 2025-02-13 16:22:58 +01:00
torchao_integration
vptq_integration