transformers/tests
Jerry Zhang 2af272c101
Add autoquant support for torchao quantizer (#35503)
* Add autoquant support for torchao quantizer

Summary:
att, also verified that autoquantized model can be saved and loaded:

save: https://gist.github.com/jerryzh168/01d367aaf44dbbbfd4068a4a10a00061
load: https://gist.github.com/jerryzh168/d5c6c401b2abdf18e0b6771341f1525c

Test Plan:
tested locally with above script
model uploaded to https://huggingface.co/jerryzh168/llama3-8b-autoquant

Reviewers:

Subscribers:

Tasks:

Tags:

* add test

* ruff fix

* ruff reformat

* add docs and min_sqnr support

* format

* format

* fix test

* update doc

* format

* remove disable_compile

* format
2025-02-24 15:54:16 +01:00
..
agents use torch.testing.assertclose instead to get more details about error in cis (#35659) 2025-01-24 16:55:28 +01:00
bettertransformer use torch.testing.assertclose instead to get more details about error in cis (#35659) 2025-01-24 16:55:28 +01:00
deepspeed DeepSpeed github repo move sync (#36021) 2025-02-05 08:19:31 -08:00
extended
fixtures
fsdp [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
generation [CI] Check test if the GenerationTesterMixin inheritance is correct 🐛 🔫 (#36180) 2025-02-21 10:18:20 +00:00
models [tests] enable bnb tests on xpu (#36233) 2025-02-24 11:30:15 +01:00
optimization Support constant lr with cooldown (#35453) 2025-02-10 13:21:55 +01:00
peft_integration [tests] enable bnb tests on xpu (#36233) 2025-02-24 11:30:15 +01:00
pipelines Add support for post-processing kwargs in image-text-to-text pipeline (#35374) 2025-02-18 17:43:36 -05:00
quantization Add autoquant support for torchao quantizer (#35503) 2025-02-24 15:54:16 +01:00
repo_utils [Modular] skip modular checks based on diff (#36130) 2025-02-13 12:53:21 +00:00
sagemaker Trainer - deprecate tokenizer for processing_class (#32385) 2024-10-02 14:08:46 +01:00
tokenization Fix PretrainedTokenizerFast check => Fix PretrainedTokenizerFast Save (#35835) 2025-02-13 12:00:33 +01:00
tp TP initialization module-by-module (#35996) 2025-02-19 14:04:57 +01:00
trainer fix: prevent second save in the end of training if last step was saved already (#36219) 2025-02-20 17:38:52 +01:00
utils [CI] Check test if the GenerationTesterMixin inheritance is correct 🐛 🔫 (#36180) 2025-02-21 10:18:20 +00:00
__init__.py
test_backbone_common.py
test_configuration_common.py Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
test_feature_extraction_common.py
test_image_processing_common.py Au revoir flaky test_fast_is_faster_than_slow (#36240) 2025-02-17 18:30:07 +01:00
test_image_transforms.py Uses Collection in transformers.image_transforms.normalize (#36301) 2025-02-21 18:38:41 +01:00
test_modeling_common.py [CI] Check test if the GenerationTesterMixin inheritance is correct 🐛 🔫 (#36180) 2025-02-21 10:18:20 +00:00
test_modeling_flax_common.py [tests] remove flax-pt equivalence and cross tests (#36283) 2025-02-19 15:13:27 +00:00
test_modeling_tf_common.py [tests] remove flax-pt equivalence and cross tests (#36283) 2025-02-19 15:13:27 +00:00
test_pipeline_mixin.py Add image text to text pipeline (#34170) 2024-10-31 15:48:11 -04:00
test_processing_common.py Uniformize LlavaNextVideoProcessor kwargs (#35613) 2025-02-18 14:13:51 -05:00
test_sequence_feature_extraction_common.py
test_tokenization_common.py [tests] remove pt_tf equivalence tests (#36253) 2025-02-19 11:55:11 +00:00
test_training_args.py CI: fix test-save-trainer (#36191) 2025-02-14 10:20:56 +01:00