transformers/tests
Joao Gante 4bc723f87d
Generate: use GenerationConfig as the basis for .generate() parametrization (#20388)
* generate from config mvp

* fix failing tests

* max_time test

* Load default gen config at model load time; Update docs

* further documentation; add tests

* adapt rag to the new structure

* handle models not instantiated with from_pretained (like in tests)

* better default generation config

* add can_generate fn

* handle legacy use case of ad hoc model config changes

* initialize gen config from config in individual methods, if gen config is none

* fix _get_decoder_start_token_id when called outside GenerationMixin

* correct model config load order (set attr > model config > decoder config)

* update rag to match latest changes

* Apply suggestions from code review

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* load gen config from model config in model.from_pretrained

* fix can_generate fn

* handle generate calls without a previous from_pretrained (e.g. tests)

* add legacy behavior (and a warning)

* lower logger severity

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-12-15 18:27:20 +00:00
..
benchmark [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
deepspeed Fix tapas scatter (#20149) 2022-11-14 01:04:26 -05:00
extended Update self-push workflow (#17177) 2022-05-13 16:28:00 +02:00
fixtures add a warning in SpmConverter for sentencepiece's model using the byte fallback feature (#16629) 2022-04-11 11:06:10 +02:00
generation Generate: use GenerationConfig as the basis for .generate() parametrization (#20388) 2022-12-15 18:27:20 +00:00
mixed_int8 Add keep_in_fp32_modules support (#20683) 2022-12-13 11:59:57 +01:00
models Add Swin backbone (#20769) 2022-12-14 19:35:28 +01:00
onnx Add RemBERT ONNX config (#20520) 2022-12-05 11:39:09 -05:00
optimization [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
pipelines Fixing object detection with layoutlm (#20776) 2022-12-15 18:46:43 +01:00
repo_utils Repo utils test (#19696) 2022-10-18 13:47:36 -04:00
sagemaker transformers-cli login => huggingface-cli login (#18490) 2022-08-06 09:42:55 +02:00
tokenization fix train_new_from_iterator in the case of byte-level tokenizers (#17549) 2022-06-08 15:30:41 +02:00
trainer Repurpose torchdynamo training args towards torch._dynamo (#20498) 2022-11-30 11:10:45 -05:00
utils Fix TF nightly tests (#20507) 2022-11-30 14:47:54 +00:00
__init__.py GPU text generation: mMoved the encoded_prompt to correct device 2020-01-06 15:11:12 +01:00
test_configuration_common.py Add WhisperModel to transformers (#19166) 2022-10-05 22:28:31 +02:00
test_feature_extraction_common.py [Vision] .to function for ImageProcessors (#20536) 2022-12-05 19:10:54 +01:00
test_image_transforms.py Fix donut image processor (#20625) 2022-12-08 19:10:40 +00:00
test_modeling_common.py [Tests] Improve test_attention_outputs (#20701) 2022-12-14 14:41:40 +01:00
test_modeling_flax_common.py Allow flax subfolder (#19902) 2022-10-26 18:33:23 +02:00
test_modeling_tf_common.py [Tests] Improve test_attention_outputs (#20701) 2022-12-14 14:41:40 +01:00
test_sequence_feature_extraction_common.py Some tests misusing assertTrue for comparisons fix (#16771) 2022-04-19 14:44:08 +02:00
test_tokenization_common.py 🚨 🚨 🚨 Fix Issue 15003: SentencePiece Tokenizers Not Adding Special Tokens in convert_tokens_to_string (#15775) 2022-11-02 15:45:38 -04:00