transformers/tests/generation
Xin Qiu b31905d1f6
Fix remaining issues in beam score calculation (#27808)
* Fix issues in add and is_done for BeamHypotheses

* make newly added arguments optional for better compatibility

* Directly use cur_len as generated_len, add note for retrocompatibility

* update test expectation

* make cur_len represents the length of the entire sequence including the decoder prompt

* remove redundant if/else in testing
2023-12-08 14:14:16 +01:00
..
__init__.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_beam_constraints.py Generate: move generation_*.py src files into generation/*.py (#20096) 2022-11-09 15:34:08 +00:00
test_beam_search.py Time to Say Goodbye, torch 1.7 and 1.8 (#22291) 2023-03-21 19:22:01 +01:00
test_configuration_utils.py Generate: GenerationConfig throws an exception when generate args are passed (#27757) 2023-11-30 14:16:31 +00:00
test_flax_logits_process.py Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
test_flax_utils.py Add support for beam search's num_return_sequencs flag in flax (#23082) 2023-05-03 10:50:34 -04:00
test_framework_agnostic.py Fix remaining issues in beam score calculation (#27808) 2023-12-08 14:14:16 +01:00
test_logits_process.py Fix: Raise informative exception when prefix_allowed_tokens_fn return empty set of tokens (#27797) 2023-12-08 10:25:49 +00:00
test_stopping_criteria.py Generate: move generation_*.py src files into generation/*.py (#20096) 2022-11-09 15:34:08 +00:00
test_streamers.py Generate: TextIteratorStreamer timeout (#22576) 2023-04-05 09:57:46 +01:00
test_tf_logits_process.py Better TF docstring types (#23477) 2023-05-24 13:52:52 +01:00
test_tf_utils.py Better TF docstring types (#23477) 2023-05-24 13:52:52 +01:00
test_utils.py Generate: New Cache abstraction and Attention Sinks support (#26681) 2023-12-08 09:00:17 +01:00