- 30 Jan, 2023 1 commit
-
-
Joao Gante authored
Co-authored-by:Patrick von Platen <patrick.v.platen@gmail.com>
-
- 20 Jan, 2023 1 commit
-
-
Joao Gante authored
Co-authored-by:Patrick von Platen <patrick.v.platen@gmail.com>
-
- 04 Jan, 2023 1 commit
-
-
Joao Gante authored
-
- 03 Jan, 2023 1 commit
-
-
Motoki Wu authored
* Add StopIdStoppingCriteria * add a working test for stop id criteria * add to global scope * add stop_ids to generate * add pipeline test * use tokenizer encode in test * add test to generation utils * reformat * fixup * make-fix-copies * rename to stop_token_id * use stop_tokens instead * add to text to text generation * make fixup * make repo-consistency * Add support for list of ints for eos_token_id inside generation/utils.py * Instead of having if elses, cast the eos_token_id into a List[int] * Add List[int] support for logits_process.py * add List[int] for beam_search.py * add List[int] for forced_eos_token_id * revert stop token id stopping criteria changes * make fixup * fix tests * add eos_token_id to generation/utils.py and added tests test_utils.py * add eos_token_id type hints and fix for pad tokens * add comments * remove some prints and remove forced false test * fix * put back test_stop_sequence_stopping_criteria * remove unused import and make fixup * add a none check * update docstring * add more docstring for list ints * make fixup
-
- 21 Nov, 2022 1 commit
-
-
Joao Gante authored
-
- 14 Nov, 2022 1 commit
-
-
Joao Gante authored
-
- 09 Nov, 2022 1 commit
-
-
Joao Gante authored
* move generation_*.py src files into generation/*.py * populate generation.__init__ with lazy loading * move imports and references from generation.xxx.object to generation.object
-
- 01 Nov, 2022 1 commit
-
-
Joao Gante authored
* Use beam search functionality; Add extra outputs and test * Add full tests for contrastive search * Add error message on unconventional cache format
-
- 21 Oct, 2022 1 commit
-
-
Joao Gante authored
* contrastive search test updates * make fixup
-
- 19 Oct, 2022 1 commit
-
-
GMFTBY authored
Adding the state-of-the-art contrastive search decoding methods for the codebase of generation_utils.py (#19477) * add: the contrastive search for generaton_utils * add: testing scripts for contrastive search under examples/text-generation * update the quality of codes * revise the docstring; make the generation_contrastive_search.py scripts; * revise the examples/pytorch/text-generation/run_generation_contrastive_search.py to the auto-APIs format * revise the necessary documents * fix: revise the docstring of generation_contrastive_search.py * Fix the code indentation * fix: revise the nits and examples in contrastive_search docstring. * fix the copyright * delete generation_contrastive_search.py * revise the logic in contrastive_search * update the intergration test and the docstring * run the tests over * add the slow decorate to the contrastive_search intergrate test * add more test * do the style, quality, consistency checks
-
- 30 Sep, 2022 1 commit
-
-
Karim Foda authored
-
- 02 Sep, 2022 1 commit
-
-
Joao Gante authored
-
- 19 Aug, 2022 1 commit
-
-
Joao Gante authored
-
- 12 Aug, 2022 1 commit
-
-
Joao Gante authored
* validate generate model_kwargs * generate tests -- not all models have an attn mask
-
- 23 Jul, 2022 1 commit
-
-
Joao Gante authored
-
- 28 Jun, 2022 1 commit
-
-
Yih-Dar authored
* fix Co-authored-by:ydshieh <ydshieh@users.noreply.github.com>
-
- 21 Jun, 2022 1 commit
-
-
unifyh authored
- Fix `top_k_top_p_filtering` not passing `filter_value` to `TopPLogitsWarper` causing any top-p filtered logits to be -inf instead of specified value - Add corresponding test
-
- 10 Jun, 2022 1 commit
-
-
Patrick von Platen authored
-
- 19 May, 2022 1 commit
-
-
Patrick von Platen authored
* [Draft] fix transition probs * up * up * up * make it work * fix * finish * update
-
- 12 May, 2022 1 commit
-
-
Sylvain Gugger authored
* Black preview * Fixup too! * Fix check copies * Use the same version as the CI * Bump black
-
- 11 Apr, 2022 1 commit
-
-
Joao Gante authored
* min length must be smaller than max length * Update min_length in tests
-
- 16 Mar, 2022 1 commit
-
-
Patrick von Platen authored
* up * fix min lengths
-
- 07 Mar, 2022 1 commit
-
-
Chan Woo Kim authored
[Bug Fix] Beam search example in docs fails & a fix (integrating `max_length` in `BeamScorer.finalize()`) (#15555) * added the test and fix * had left out a comment
-
- 04 Mar, 2022 1 commit
-
-
Chan Woo Kim authored
* added classes to get started with constrained beam search * in progress, think i can directly force tokens now but not yet with the round robin * think now i have total control, now need to code the bank selection * technically works as desired, need to optimize and fix design choices leading to undersirable outputs * complete PR #1 without disjunctive decoding * removed incorrect tests * Delete k.txt * Delete test.py * Delete test.sh * revert changes to test scripts * genutils * full implementation with testing, no disjunctive yet * shifted docs * passing all tests realistically ran locally * removing accidentally included print statements * fixed source of error in initial PR test * fixing the get_device() vs device trap * fixed documentation docstrings about constrained_beam_search * fixed tests having failing for Speech2TextModel's floating point inputs * fix cuda long tensor * added examples and testing for them and founx & fixed a bug in beam_search and constrained_beam_search * deleted accidentally added test halting code with assert False * code reformat * Update tests/test_generation_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update tests/test_generation_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update tests/test_generation_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update tests/test_generation_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update tests/test_generation_utils.py * fixing based on comments on PR * took out the testing code that should but work fails without the beam search moditification ; style changes * fixing comments issues * docstrings for ConstraintListState * typo in PhrsalConstraint docstring * docstrings improvements * finished adding what is sort of an opinionated implementation of disjunctive generation, but it revealed errors in inner beam search logic during testing. * fixed bug found in constrained beam search that used beam_idx that were not global across all the batches * disjunctive constraint working 100% correctly * passing all tests * Accidentally included mlruns * Update src/transformers/generation_beam_constraints.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update src/transformers/generation_beam_constraints.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * complete overhaul of type complexities and other nits * strict type checks in generate() * fixing second round of feedback by narsil * fixed failing generation test because of type check overhaul * generation test fail fix * fixing test fails Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com>
-
- 23 Feb, 2022 1 commit
-
-
Lysandre Debut authored
* Per-folder tests reorganization Co-authored-by:
sgugger <sylvain.gugger@gmail.com> Co-authored-by:
Stas Bekman <stas@stason.org>
-
- 09 Feb, 2022 1 commit
-
-
Chan Woo Kim authored
* added classes to get started with constrained beam search * in progress, think i can directly force tokens now but not yet with the round robin * think now i have total control, now need to code the bank selection * technically works as desired, need to optimize and fix design choices leading to undersirable outputs * complete PR #1 without disjunctive decoding * removed incorrect tests * Delete k.txt * Delete test.py * Delete test.sh * revert changes to test scripts * genutils * full implementation with testing, no disjunctive yet * shifted docs * passing all tests realistically ran locally * removing accidentally included print statements * fixed source of error in initial PR test * fixing the get_device() vs device trap * fixed documentation docstrings about constrained_beam_search * fixed tests having failing for Speech2TextModel's floating point inputs * fix cuda long tensor * added examples and testing for them and founx & fixed a bug in beam_search and constrained_beam_search * deleted accidentally added test halting code with assert False * code reformat * Update tests/test_generation_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update tests/test_generation_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update tests/test_generation_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update tests/test_generation_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * Update tests/test_generation_utils.py * fixing based on comments on PR * took out the testing code that should but work fails without the beam search moditification ; style changes * fixing comments issues * docstrings for ConstraintListState * typo in PhrsalConstraint docstring * docstrings improvements Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com>
-
- 24 Jan, 2022 1 commit
-
-
Patrick von Platen authored
* better * save intermediate * finish code * up * docs * Apply suggestions from code review * up * add compute transition beam scores function to model and make sure scores are correct with eos * apply nicos comments * Apply suggestions from code review * another fix
-
- 30 Dec, 2021 1 commit
-
-
Patrick von Platen authored
* [Generate] correct encoder_outputs are passed without attention_mask * Apply suggestions from code review * up
-
- 23 Dec, 2021 1 commit
-
-
Patrick von Platen authored
* up * save * correct * up * correct more * up * up * up * up * up * correct * fix tf * fix * remove tokenizer
-
- 21 Dec, 2021 1 commit
-
-
Leandro von Werra authored
* add custom `stopping_criteria` and `logits_processor` to `generate` * add tests for custom `stopping_criteria` and `logits_processor` * fix typo in RAG * address reviewer comments * improve custom logits processor/stopping criteria error message * fix types in merge function signature * change default for custom list from `None` to empty list * fix rag generate * add string split suggestion Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com>
-
- 17 Dec, 2021 2 commits
-
-
Patrick von Platen authored
* [ImageGPT] Deprecate pixel_values input name to input_ids * up * Apply suggestions from code review Co-authored-by:
NielsRogge <48327001+NielsRogge@users.noreply.github.com> * correct * finish Co-authored-by:
NielsRogge <48327001+NielsRogge@users.noreply.github.com>
-
Patrick von Platen authored
* [Generate] Correct input_ids detection * correct
-
- 16 Dec, 2021 1 commit
-
-
Patrick von Platen authored
* finish refactor * refactor * add tests * add more tests * up * finish tests * finish * up * Apply suggestions from code review Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * improve docstring * fix docs Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
-
- 19 Nov, 2021 1 commit
-
-
Patrick von Platen authored
* up * finalize * finalize * finish * Update src/transformers/generation_utils.py * apply feedback
-
- 08 Oct, 2021 1 commit
-
-
Patrick von Platen authored
* up * Update src/transformers/generation_stopping_criteria.py * finish
-
- 11 Jun, 2021 1 commit
-
-
Patrick von Platen authored
* fix_torch_device_generate_test * remove @ * fix tests
-
- 10 Jun, 2021 1 commit
-
-
Daniel Stancl authored
* Fix a condition in test_generate_with_head_masking * Fix usage of head_mask in bigbirg_pegasus * Fix head masking for speech2text * Resolve copy mismatch + drop unwanted print statement * Fix the condition
-
- 27 May, 2021 1 commit
-
-
Nicolas Patry authored
* 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`.
-
- 19 May, 2021 1 commit
-
-
Patrick von Platen authored
* fix_torch_device_generate_test * remove @
-
- 18 May, 2021 1 commit
-
-
Daniel Stancl authored
* Add missing head masking for generate() function * Add head_mask, decoder_head_mask and cross_attn_head_mask into prepare_inputs_for_generation for generate() function for multiple encoder-decoder models. * Add test_genereate_with_head_masking * [WIP] Update the new test and handle special cases * make style * Omit ProphetNet test so far * make fix-copies
-