transformers/tests/generation
Isaac Chung e2bffcfafd
Add early stopping for Bark generation via logits processor (#26675)
* add early stopping logits processor

* black formmated

* indent

* follow method signature

* actual logic

* check for None

* address comments on docstrings and method signature

* add unit test under `LogitsProcessorTest` wip

* unit test passing

* black formatted

* condition per sample

* add to BarkModelIntegrationTests

* wip BarkSemanticModelTest

* rename and add to kwargs handling

* not add to BarkSemanticModelTest

* correct logic and assert last outputs tokens different in test

* doc-builder style

* read from kwargs as well

* assert len of with less than that of without

* ruff

* add back seed and test case

* add original impl default suggestion

* doc-builder

* rename and use softmax

* switch back to LogitsProcessor and update docs wording

* camelCase and spelling and saving compute

* assert strictly less than

* assert less than

* expand test_generate_semantic_early_stop instead
2023-10-27 11:07:33 +01:00
..
__init__.py
test_beam_constraints.py
test_beam_search.py
test_configuration_utils.py Generation: strict generation config validation at save time (#25411) 2023-08-10 10:42:34 +01:00
test_flax_logits_process.py
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 TypeError: Object of type int64 is not JSON serializable (#24340) 2023-06-27 12:15:49 +01:00
test_logits_process.py Add early stopping for Bark generation via logits processor (#26675) 2023-10-27 11:07:33 +01:00
test_stopping_criteria.py
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 Add Seamless M4T model (#25693) 2023-10-23 14:49:48 +02:00