Files
HuggingFace_transformer/tests
Nicolas Patry 80d712fac6 Adding new argument max_new_tokens for generate. (#11476)
* Adding new argument `max_new_tokens` for generate.

This is a proposal to add a new argument `max_new_tokens` to `generate`.
This include a `MaxNewTokensCriteria` that enables callers that don't
know about the token length ahead (like pipelines callers) to manage
more easily the length of their generated output.

* Adding a test for the user warning when both`max_length` and
`max_new_tokens` are used together.

* Removed redundant `no_grad`.
2021-05-27 14:22:58 +02:00
..
2021-05-12 11:46:02 -04:00
2021-04-23 09:17:37 -04:00
2020-12-07 18:36:34 -05:00
2020-12-07 18:36:34 -05:00
2020-12-07 18:36:34 -05:00
2020-12-07 18:36:34 -05:00
2020-12-07 18:36:34 -05:00
2021-05-12 13:48:15 +05:30
2021-04-23 09:17:37 -04:00
2021-01-27 21:25:11 +03:00
2020-12-07 18:36:34 -05:00
2021-05-12 13:48:15 +05:30
2021-04-26 13:50:34 +02:00
2021-05-03 09:07:29 -04:00
2021-04-26 13:50:34 +02:00
2020-12-09 10:32:43 -05:00
2020-12-07 18:36:34 -05:00
2020-12-07 18:36:34 -05:00
2021-04-26 13:50:34 +02:00
2021-01-27 21:25:11 +03:00
2021-05-05 12:38:01 +02:00
2020-12-07 18:36:34 -05:00
2020-12-07 18:36:34 -05:00
2021-05-12 13:48:15 +05:30
2020-12-07 18:36:34 -05:00
2021-05-12 13:48:15 +05:30
2021-04-26 13:50:34 +02:00
2021-05-03 09:07:29 -04:00
2020-12-07 18:36:34 -05:00
2020-12-07 18:36:34 -05:00
2021-04-26 13:50:34 +02:00
2021-04-21 11:11:20 -04:00