"vscode:/vscode.git/clone" did not exist on "5987e0ab69b639a0aef335fc9357b0b869948313"
  1. 08 Dec, 2023 1 commit
  2. 17 Nov, 2023 1 commit
  3. 27 Oct, 2023 1 commit
    • Isaac Chung's avatar
      Add early stopping for Bark generation via logits processor (#26675) · e2bffcfa
      Isaac Chung authored
      * 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
      e2bffcfa
  4. 12 Sep, 2023 1 commit
    • pokjay's avatar
      Fix ExponentialDecayLengthPenalty negative logits issue (#25594) · 6acc27ee
      pokjay authored
      
      
      * Fix issues in test_exponential_decay_length_penalty
      
      Fix tests which were broken and add validation of negative scores.
      
      Current test didn't take into account that ExponentialDecayLengthPenalty updates the score inplace, resulting in updates to base tested Tensor.
      
      In addition, the gt assert had empty Tensors due to indexing along the batch dimension.
      
      Test is currently expected to fail to show ExponentialDecayLengthPenalty issues with negative scores
      
      * Fix ExponentialDecayLengthPenalty negative logits issue
      
      In cases where the scores are negative, ExponentialDecayLengthPenalty decreases the score of eos_token_id instead of increasing it.
      To fix this issue we compute the penalty of the absolute value and add it to the original score.
      
      * Add examples for ExponentialDecayLengthPenalty
      
      * Fix styling issue in ExponentialDecayLengthPenalty doc
      
      * Apply suggestions from code review
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Style and quality fix
      
      * Fix example outputs
      
      ---------
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      6acc27ee
  5. 06 Aug, 2023 1 commit
  6. 20 Jul, 2023 1 commit
  7. 21 Jun, 2023 1 commit
  8. 07 Mar, 2023 1 commit
  9. 19 Jan, 2023 1 commit
    • Karim Foda's avatar
      Add hallucination filter (#18675) · b9403e95
      Karim Foda authored
      
      
      * Add hallucination penalty
      
      * Make quality changes
      
      * Inverse penalty
      
      * Fix imports & quality
      
      * Fix name spelling issue
      
      * set encoder_repetition_penalty and fix quality
      
      * Fix failing test
      
      * Add to config_common_kwargs
      
      * Fix modelling_rag error
      
      * Update src/transformers/generation_logits_process.py
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      
      * Remove breakpoint
      
      * Make style fixes
      
      * Update encoder_repetition_penalty default value
      
      * Merge latest main changes
      
      * Make fixup changes
      
      * Add EncoderRepetitionPenaltyLogitsProcessor to generation/__init__.py
      
      * Fix repo-inconsistency
      
      * Remove venv
      
      * Remove tensorflow-macos & add tests
      
      * Add documentation
      
      * Fix quality issues
      
      * move encoder_repetition_penalty to config
      
      * Update src/transformers/configuration_utils.py
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      
      * Update src/transformers/generation/configuration_utils.py
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      
      * Remove encoder_repetition_penalty from tests
      
      * Fix type error
      
      * Fix format error
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      b9403e95
  10. 17 Jan, 2023 1 commit
    • Sherman Siu's avatar
      Add Epsilon- and Eta-Sampling (#21121) · 865da84a
      Sherman Siu authored
      * Add epsilon- and eta-sampling.
      
      Add epsilon- and eta-sampling, following the official code from https://github.com/john-hewitt/truncation-sampling and adapting to be more configurable, as required by Huggingface transformers.
      
      * Add unit tests for epsilon- and eta-sampling.
      
      * Black: fix code formatting.
      
      * Fix docstring spacing.
      
      * Clean up newlines.
      
      * Fix implementation bugs and their associated tests.
      
      * Remove epsilon- and eta-sampling parameters from PretrainedConfig.
      
      * Clarify and clean up the documentation.
      
      * Remove parameters for PretrainedConfig test.
      865da84a
  11. 03 Jan, 2023 1 commit
    • Konstantin Kotik's avatar
      `MinNewTokensLengthLogitsProcessor` for `.generate` method #20814 (#20892) · 367fdf33
      Konstantin Kotik authored
      
      
      * feat: add min new length logit processor
      
      * test: add min new length logit processor
      
      * docs: add MinNewTokensLengthLogitsProcessor
      
      * feat: import MinNewTokensLengthLogitsProcessor
      
      * fix: update pytorch dummy objects
      
      * refactor & fix: rename attributes and var and get rid of dynamic attribute
      
      * tests: align test with new interface
      
      * docs: fix typo
      
      * docs: minor clarification
      
      * Empty-Commit
      
      * empty commit
      
      * run automated quality edits
      Co-authored-by: default avatarJoao Gante <joao@huggingface.co>
      367fdf33
  12. 09 Nov, 2022 1 commit
  13. 15 Sep, 2022 1 commit
  14. 13 Apr, 2022 1 commit
  15. 06 Apr, 2022 1 commit
  16. 11 Mar, 2022 1 commit
    • Kevin Bondzio's avatar
      Add soft length regulation for sequence generation (#15245) · 9442b3ce
      Kevin Bondzio authored
      
      
      * add possibility to softly regulate length when using sampling method in model.generate() function
      
      * fix test config, fix formatting
      
      * fix rag integration, fix docstyling
      
      * fix wrong docstring
      
      * change param to tuple, add test
      
      * fix old param in rag_model, remove unused import
      
      * change test according to new param
      
      * fix formatting
      
      * fix test case
      
      * fix doc style
      
      * move start_length calculation to Logitprocessor
      
      * add possibility to softly regulate length when using sampling method in model.generate() function
      
      * fix rag integration, fix docstyling
      
      * fix test config, fix formatting
      
      * change param to tuple, add test
      
      * fix old param in rag_model, remove unused import
      
      * add possibility to softly regulate length when using sampling method in model.generate() function
      
      * change param to tuple, add test
      
      * fix old param in rag_model, remove unused import
      
      * remove unused import
      
      * fix small errors
      
      * fix test
      
      * add possibility to softly regulate length when using sampling method in model.generate() function
      
      * fix test config, fix formatting
      
      * fix rag integration, fix docstyling
      
      * change param to tuple, add test
      
      * fix old param in rag_model, remove unused import
      
      * change test according to new param
      
      * fix test case
      
      * move start_length calculation to Logitprocessor
      
      * add possibility to softly regulate length when using sampling method in model.generate() function
      
      * fix rag integration, fix docstyling
      
      * fix test config, fix formatting
      
      * change param to tuple, add test
      
      * fix old param in rag_model, remove unused import
      
      * add possibility to softly regulate length when using sampling method in model.generate() function
      
      * fix test config, fix formatting
      
      * fix rag integration, fix docstyling
      
      * add possibility to softly regulate length when using sampling method in model.generate() function
      
      * fix rag integration, fix docstyling
      
      * change param to tuple, add test
      
      * fix old param in rag_model, remove unused import
      
      * fix small errors
      
      * Update src/transformers/generation_utils.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/generation_utils.py
      
      * Update src/transformers/generation_utils.py
      
      * fix docstring, add type ind model rag
      
      * fix docstrings
      
      * introduce seq_length variable for cleaner code
      
      * fix black formatting
      
      * add input_ids_seq_length to modeling_rag
      
      * add input_ids_seq_length to test
      
      * retrigger checks
      
      * retrigger checks
      Co-authored-by: default avatarKevin Bondzio <kev@AIM-LAP-02.local>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarKevin Bondzio <kev@AIM-LAP-02.fritz.box>
      9442b3ce
  17. 02 Mar, 2022 1 commit
  18. 23 Feb, 2022 1 commit
  19. 09 Feb, 2022 1 commit
  20. 14 Jun, 2021 1 commit
  21. 22 Mar, 2021 1 commit
  22. 10 Feb, 2021 1 commit
    • Suraj Patil's avatar
      remove adjust_logits_during_generation method (#10087) · c130e67d
      Suraj Patil authored
      * add forced logits processors
      
      * delete adjust_logits method
      
      * add forced_eos_token_id argument in config
      
      * add tests for forced logits processors
      
      * update gen utils tests
      
      * add forced option to tf generate
      
      * remove adjust_logits method from tf models
      
      * update adjust_logits for marian
      
      * delete _force_token_id_to_be_generated method
      
      * style
      
      * import warnings
      
      * pass max_length to _get_logits_processor
      
      * set forced_eos_token_id to None
      
      * set forced attributes in conf utils
      
      * typo
      
      * fix rag generate
      
      * add forced_eos_token_id in rag config
      
      * remove force_bos_token_to_be_generated from BartConfig
      
      * remove _force_token_ids_generation from FSMT
      
      * nit
      
      * fix negative constant
      
      * apply suggestions from code review
      c130e67d
  23. 04 Feb, 2021 1 commit
  24. 09 Dec, 2020 1 commit
    • Patrick von Platen's avatar
      Diverse beam search 2 (#9006) · 02d0e035
      Patrick von Platen authored
      
      
      * diverse beam search
      
      * bug fixes
      
      * bug fixes
      
      * bug fix
      
      * separate out diverse_beam_search function
      
      * separate out diverse_beam_search function
      
      * bug fix
      
      * improve code quality
      
      * bug fix
      
      * bug fix
      
      * separate out diverse beam search scorer
      
      * code format
      
      * code format
      
      * code format
      
      * code format
      
      * add test
      
      * code format
      
      * documentation changes
      
      * code quality
      
      * add slow integration tests
      
      * more general name
      
      * refactor into logits processor
      
      * add test
      
      * avoid too much copy paste
      
      * refactor
      
      * add to docs
      
      * fix-copies
      
      * bug fix
      
      * Revert "bug fix"
      
      This reverts commit c99eb5a8dc57a7b0d33a8ac06d8c6a32a7812ad4.
      
      * improve comment
      
      * implement sylvains feedback
      Co-authored-by: default avatarAyush Jain <a.jain@sprinklr.com>
      Co-authored-by: default avatarayushtiku5 <40797286+ayushtiku5@users.noreply.github.com>
      02d0e035
  25. 18 Nov, 2020 1 commit
  26. 03 Nov, 2020 1 commit
    • Patrick von Platen's avatar
      Refactoring the generate() function (#6949) · a1bbcf3f
      Patrick von Platen authored
      * first draft
      
      * show design proposition for new generate method
      
      * up
      
      * make better readable
      
      * make first version
      
      * gpt2 tests pass
      
      * make beam search for gpt2 work
      
      * add first encoder-decoder code
      
      * delete typo
      
      * make t5 work
      
      * save indermediate
      
      * make bart work with beam search
      
      * finish beam search bart / t5
      
      * add default kwargs
      
      * make more tests pass
      
      * fix no bad words sampler
      
      * some fixes and tests for all distribution processors
      
      * fix test
      
      * fix rag slow tests
      
      * merge to master
      
      * add nograd to generate
      
      * make all slow tests pass
      
      * speed up generate
      
      * fix edge case bug
      
      * small fix
      
      * correct typo
      
      * add type hints and docstrings
      
      * fix typos in tests
      
      * add beam search tests
      
      * add tests for beam scorer
      
      * fix test rag
      
      * finish beam search tests
      
      * move generation tests in seperate file
      
      * fix generation tests
      
      * more tests
      
      * add aggressive generation tests
      
      * fix tests
      
      * add gpt2 sample test
      
      * add more docstring
      
      * add more docs
      
      * finish doc strings
      
      * apply some more of sylvains and sams comments
      
      * fix some typos
      
      * make fix copies
      
      * apply lysandres and sylvains comments
      
      * final corrections on examples
      
      * small fix for reformer
      a1bbcf3f