1. 08 Jan, 2023 1 commit
    • Arthur's avatar
      Replace `past` with `past_key_values` (#20944) · f0577df6
      Arthur authored
      * start cleanup
      
      * more updates
      
      * more models are affected
      
      * more updates
      
      * update generation utils
      
      * style
      
      * revert change that removed reorder cachce
      
      * update generation utils
      
      * style
      
      * style
      
      * remove reorder cache
      f0577df6
  2. 20 Dec, 2022 1 commit
  3. 08 Dec, 2022 1 commit
  4. 06 Dec, 2022 1 commit
  5. 09 Nov, 2022 1 commit
    • Nicolas Patry's avatar
      Attempting to test automatically the `_keys_to_ignore`. (#20042) · bac2d29a
      Nicolas Patry authored
      
      
      * Attempting to test automatically the `_keys_to_ignore`.
      
      * Style.
      
      * First fix pass.
      
      * Moving test on its own.
      
      * Another batch.
      
      * Second round removing BatchNorm
      
      * Fixing layoutlmv{2,3} + support older Python.
      
      * Disable miss missing warning.
      
      * Removing dodgy additions.
      
      * Big pass.
      
      * mbart.
      
      * More corrections.
      
      * Fixup.
      
      * Updating test_correct_missing_keys
      
      * Add escape hatch for when the head has no extra params so doesn't need
      
      the missing keys check.
      
      * Fixing test.
      
      * Greener.
      
      * Green ! (except for weird splinter bug).
      
      * Adding a test about `named_parameters` usage.
      
      * Shorten message.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * After rebase modifications.
      
      * More explicit condition checking.
      
      * Fixing slow tests issues.
      
      * Remove extra pdb.
      
      * Remove print.
      
      * Attempt to make failure consistent + fixing roc_bert.
      
      * Removing the seed  (all tests passing with it).
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      bac2d29a
  6. 18 Oct, 2022 1 commit
  7. 11 Aug, 2022 1 commit
    • Dan Jones's avatar
      Change BartLearnedPositionalEmbedding's forward method signature to support... · 80468251
      Dan Jones authored
      
      Change BartLearnedPositionalEmbedding's forward method signature to support Opacus training (#18486)
      
      * changing BartLearnedPositionalEmbedding forward signature and references to it
      
      * removing debugging dead code (thanks style checker)
      
      * blackened modeling_bart file
      
      * removing copy inconsistencies via make fix-copies
      
      * changing references to copied signatures in Bart variants
      
      * make fix-copies once more
      
      * using expand over repeat (thanks @michaelbenayoun)
      
      * expand instead of repeat for all model copies
      Co-authored-by: default avatarDaniel Jones <jonesdaniel@microsoft.com>
      80468251
  8. 09 Aug, 2022 1 commit
  9. 20 Jun, 2022 1 commit
  10. 15 Jun, 2022 1 commit
  11. 31 May, 2022 1 commit
  12. 12 May, 2022 1 commit
  13. 12 Apr, 2022 1 commit
  14. 06 Apr, 2022 1 commit
  15. 01 Apr, 2022 1 commit
    • Rishav Chandra Varma's avatar
      Adding missing type hints for mBART model (PyTorch) (#16429) · 5fe06b9b
      Rishav Chandra Varma authored
      
      
      * added type hints for mbart tensorflow tf implementation
      
      * Adding missing type hints for mBART model 
      
      Tensorflow Implementation model added with missing type hints
      
      * Missing Type hints - correction
      
      For TF model
      
      * Code fixup using make quality tests
      
      * Hint types - typo error
      
      * make fix-copies and make fixup
      
      * type hints
      
      * updated files
      
      * type hints update
      
      * making dependent modesls coherent
      Co-authored-by: default avatarmatt <rocketknight1@gmail.com>
      5fe06b9b
  16. 25 Mar, 2022 1 commit
  17. 23 Mar, 2022 1 commit
    • Sylvain Gugger's avatar
      Reorganize file utils (#16264) · 4975002d
      Sylvain Gugger authored
      * Split file_utils in several submodules
      
      * Fixes
      
      * Add back more objects
      
      * More fixes
      
      * Who exactly decided to import that from there?
      
      * Second suggestion to code with code review
      
      * Revert wront move
      
      * Fix imports
      
      * Adapt all imports
      
      * Adapt all imports everywhere
      
      * Revert this import, will fix in a separate commit
      4975002d
  18. 21 Mar, 2022 1 commit
  19. 09 Mar, 2022 1 commit
  20. 09 Feb, 2022 1 commit
  21. 08 Feb, 2022 1 commit
  22. 18 Jan, 2022 1 commit
  23. 10 Jan, 2022 1 commit
  24. 28 Dec, 2021 1 commit
    • Sylvain Gugger's avatar
      Doc styler examples (#14953) · b5e2b183
      Sylvain Gugger authored
      * Fix bad examples
      
      * Add black formatting to style_doc
      
      * Use first nonempty line
      
      * Put it at the right place
      
      * Don't add spaces to empty lines
      
      * Better templates
      
      * Deal with triple quotes in docstrings
      
      * Result of style_doc
      
      * Enable mdx treatment and fix code examples in MDXs
      
      * Result of doc styler on doc source files
      
      * Last fixes
      
      * Break copy from
      b5e2b183
  25. 27 Dec, 2021 1 commit
    • Sylvain Gugger's avatar
      Doc styler v2 (#14950) · 87e6e4fe
      Sylvain Gugger authored
      * New doc styler
      
      * Fix issue with args at the start
      
      * Code sample fixes
      
      * Style code examples in MDX
      
      * Fix more patterns
      
      * Typo
      
      * Typo
      
      * More patterns
      
      * Do without black for now
      
      * Get more info in error
      
      * Docstring style
      
      * Re-enable check
      
      * Quality
      
      * Fix add_end_docstring decorator
      
      * Fix docstring
      87e6e4fe
  26. 21 Dec, 2021 1 commit
    • Sylvain Gugger's avatar
      Convert docstrings of modeling files (#14850) · 7af80f66
      Sylvain Gugger authored
      * Convert file_utils docstrings to Markdown
      
      * Test on BERT
      
      * Return block indent
      
      * Temporarily disable doc styler
      
      * Remove from quality checks as well
      
      * Remove doc styler mess
      
      * Remove check from circleCI
      
      * Fix typo
      
      * Convert file_utils docstrings to Markdown
      
      * Test on BERT
      
      * Return block indent
      
      * Temporarily disable doc styler
      
      * Remove from quality checks as well
      
      * Remove doc styler mess
      
      * Remove check from circleCI
      
      * Fix typo
      
      * Let's go on all other model files
      
      * Add templates too
      
      * Styling and quality
      7af80f66
  27. 13 Dec, 2021 1 commit
  28. 10 Dec, 2021 1 commit
  29. 18 Nov, 2021 1 commit
  30. 09 Nov, 2021 1 commit
  31. 29 Oct, 2021 1 commit
  32. 26 Oct, 2021 1 commit
  33. 15 Oct, 2021 1 commit
  34. 24 Sep, 2021 1 commit
    • Tommy Chiang's avatar
      Use torch.unique_consecutive to check same element (#13637) · a2ef9c54
      Tommy Chiang authored
      We use `torch.unique` here only to check whether every elements have
      the same value.
      Therefore, we can use `torch.unique_consecutive` here.
      
      This function eliminates all but the first element from every consecutive
      group of equivalent elements.
      Like, if we apply this function to `[1, 2, 2, 1]`, it will result in
      `[1, 2, 1]`.
      
      As you could see, this is enough for checking whether every elements
      have the same value.
      
      Since `torch.unique_consecutive` do less thing, it is much more faster.
      On my computer, it is 25x faster on GPU and 15x faster on CPU.
      a2ef9c54
  35. 22 Sep, 2021 1 commit
  36. 14 Jun, 2021 1 commit
  37. 07 Jun, 2021 2 commits
    • Fran莽ois Lagunas's avatar
      Fixes bug that appears when using QA bert and distilation. (#12026) · f8bd8c6c
      Fran莽ois Lagunas authored
      * Fixing bug that appears when using distilation (and potentially other uses).
      During backward pass Pytorch complains with:
      RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
      This happens because the QA model code modifies the start_positions and end_positions input tensors, using clamp_ function: as a consequence the teacher and the student both modifies the inputs, and backward pass fails.
      
      * Fixing all models QA clamp_ bug.
      f8bd8c6c
    • Suraj Patil's avatar
      fix docs of past_key_values (#12049) · 185122ef
      Suraj Patil authored
      185122ef
  38. 01 Jun, 2021 1 commit
  39. 18 May, 2021 1 commit
    • Daniel Stancl's avatar
      Fix usage of head masks by PT encoder-decoder models' `generate()` function (#11621) · 680d181c
      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
      680d181c