transformers/tests
Matt 48fbab7330
Allow apply_chat_template to pass kwargs to the template and support a dict of templates (#29658)
* Allow apply_chat_template to pass kwargs to the template

* Fix priority for template_kwargs

* Fix docstring

* style fix

* Add the option for the model to have a dict of templates

* Error message cleanup

* Add test for chat template dicts

* Simplify the chat template dict test and apply it to all tokenizers in self.get_tokenizers()

* Save chat template dicts as lists with fixed key names

* Add test for serialization/reloading

* Add require_jinja just to be safe, even though I don't think we use it
2024-03-14 18:23:14 +00:00
..
benchmark
bettertransformer
deepspeed fix failing trainer ds tests (#29057) 2024-02-16 17:18:45 +05:30
extended [tests] make test_trainer_log_level_replica to run on accelerators with more than 2 devices (#29609) 2024-03-13 17:44:35 +00:00
fixtures
fsdp Add support for FSDP+QLoRA and DeepSpeed ZeRO3+QLoRA (#29587) 2024-03-13 22:03:02 +05:30
generation [tests] use torch_device instead of auto for model testing (#29531) 2024-03-08 11:21:43 +00:00
models Fix PVT v2 tests (#29660) 2024-03-14 17:00:32 +01:00
optimization
peft_integration FIX [CI]: Fix failing tests for peft integration (#29330) 2024-02-29 03:56:16 +01:00
pipelines fix image-to-text batch incorrect output issue (#29342) 2024-03-08 11:11:10 +00:00
quantization Exllama kernels support for AWQ models (#28634) 2024-03-05 03:22:48 +01:00
repo_utils
sagemaker Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
tokenization Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
tools
trainer [tests] use the correct n_gpu in TrainerIntegrationTest::test_train_and_eval_dataloaders for XPU (#29307) 2024-03-08 10:52:25 -05:00
utils Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
__init__.py
test_backbone_common.py
test_cache_utils.py Generate: add tests for caches with pad_to_multiple_of (#29462) 2024-03-06 10:57:04 +00:00
test_configuration_common.py
test_configuration_utils.py Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
test_feature_extraction_common.py
test_feature_extraction_utils.py
test_image_processing_common.py Raise unused kwargs image processor (#29063) 2024-02-20 16:20:20 +01:00
test_image_processing_utils.py
test_image_transforms.py
test_modeling_common.py Fix batching tests for new models (Mamba and SegGPT) (#29633) 2024-03-13 17:52:49 +00:00
test_modeling_flax_common.py
test_modeling_flax_utils.py
test_modeling_tf_common.py Add tf_keras imports to prepare for Keras 3 (#28588) 2024-01-30 17:26:36 +00:00
test_modeling_tf_utils.py Add tf_keras imports to prepare for Keras 3 (#28588) 2024-01-30 17:26:36 +00:00
test_modeling_utils.py Llama: allow custom 4d masks (#29618) 2024-03-13 15:07:52 +00:00
test_pipeline_mixin.py Image Feature Extraction pipeline (#28216) 2024-02-05 14:50:07 +00:00
test_processing_common.py
test_sequence_feature_extraction_common.py
test_tokenization_common.py Allow apply_chat_template to pass kwargs to the template and support a dict of templates (#29658) 2024-03-14 18:23:14 +00:00
test_tokenization_utils.py Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00