1. 23 Jun, 2022 1 commit
  2. 03 May, 2022 1 commit
  3. 12 Apr, 2022 1 commit
    • Anmol Joshi's avatar
      Moved functions to pytorch_utils.py (#16625) · a315988b
      Anmol Joshi authored
      * Moved functions to pytorch_utils.py
      
      * isort formatting
      
      * Reverted tf changes
      
      * isort, make fix-copies
      
      * documentation fix
      
      * Fixed Conv1D import
      
      * Reverted research examples file
      
      * backward compatibility for pytorch_utils
      
      * missing import
      
      * isort fix
      a315988b
  4. 25 Mar, 2022 1 commit
  5. 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
  6. 22 Mar, 2022 1 commit
  7. 15 Mar, 2022 1 commit
  8. 09 Feb, 2022 1 commit
  9. 26 Jan, 2022 1 commit
  10. 24 Jan, 2022 1 commit
  11. 11 Jan, 2022 1 commit
  12. 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
  13. 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
  14. 18 Nov, 2021 2 commits
  15. 15 Oct, 2021 1 commit
  16. 22 Sep, 2021 1 commit
  17. 01 Sep, 2021 1 commit
    • Hamid Shojanazeri's avatar
      Fix for the issue of device-id getting hardcoded for token_type_ids during... · 53ee995a
      Hamid Shojanazeri authored
      Fix for the issue of device-id getting hardcoded for token_type_ids during Tracing for ConvBert (#12287)
      
      * added token_type_ids buffer to fix the issue #5664
      
      * Handling the case that position_id buffer is not registered
      
      * added token_type_ids buffer to fix the issue #5664
      
      * modified to support device conversion when the model is traced
      53ee995a
  18. 03 Aug, 2021 1 commit
  19. 26 Jul, 2021 1 commit
  20. 14 Jun, 2021 1 commit
  21. 08 Jun, 2021 1 commit
  22. 07 Jun, 2021 1 commit
    • 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
  23. 01 Jun, 2021 1 commit
  24. 20 May, 2021 1 commit
  25. 04 May, 2021 1 commit
  26. 26 Apr, 2021 1 commit
  27. 31 Mar, 2021 1 commit
  28. 05 Mar, 2021 2 commits
    • Daniel Hug's avatar
      Refactoring checkpoint names for multiple models (#10527) · 90ecc296
      Daniel Hug authored
      * Refactor checkpoint name in ALBERT and ALBERT_tf
      
      * Refactor checkpoint name in BART and BART_tf
      
      * Refactor checkpoint name in BERT generation
      
      * Refactor checkpoint name in Blenderbot_tf
      
      * Refactor checkpoint name in Blenderbot_small_tf
      
      * Refactor checkpoint name in ConvBERT AND CONVBERT_TF
      
      * Refactor checkpoint name in CTRL AND CTRL_TF
      
      * Refactor checkpoint name in DistilBERT AND DistilBERT_TF
      
      * Refactor checkpoint name in DistilBERT redo
      
      * Refactor checkpoint name in Electra and Electra_tf
      
      * Refactor checkpoint name in FlauBERT and FlauBERT_tf
      
      * Refactor checkpoint name in FSMT
      
      * Refactor checkpoint name in GPT2 and GPT2_tf
      
      * Refactor checkpoint name in IBERT
      
      * Refactor checkpoint name in LED and LED_tf
      
      * Refactor checkpoint name in Longformer and Longformer_tf
      
      * Refactor checkpoint name in Lxmert and Lxmert_tf
      
      * Refactor checkpoint name in Marian_tf
      
      * Refactor checkpoint name in MBART and MBART_tf
      
      * Refactor checkpoint name in MobileBERT and MobileBERT_tf
      
      * Refactor checkpoint name in mpnet and mpnet_tf
      
      * Refactor checkpoint name in openai and openai_tf
      
      * Refactor checkpoint name in pegasus_tf
      
      * Refactor checkpoint name in reformer
      
      * Refactor checkpoint name in Roberta and Roberta_tf
      
      * Refactor checkpoint name in SqueezeBert
      
      * Refactor checkpoint name in Transformer_xl and Transformer_xl_tf
      
      * Refactor checkpoint name in XLM and XLM_tf
      
      * Refactor checkpoint name in XLNET and XLNET_tf
      
      * Refactor checkpoint name in BERT_tf
      
      * run make tests, style, quality, fixup
      90ecc296
    • Sylvain Gugger's avatar
      Fix embeddings for PyTorch 1.8 (#10549) · 7da995c0
      Sylvain Gugger authored
      * Fix embeddings for PyTorch 1.8
      
      * Try with PyTorch 1.8.0
      
      * Fix embeddings init
      
      * Fix copies
      
      * Typo
      
      * More typos
      7da995c0
  29. 27 Jan, 2021 1 commit
  30. 19 Jan, 2021 2 commits
  31. 18 Jan, 2021 1 commit
  32. 23 Dec, 2020 1 commit
    • Suraj Patil's avatar
      Add caching mechanism to BERT, RoBERTa (#9183) · 88ef8893
      Suraj Patil authored
      * add past_key_values
      
      * add use_cache option
      
      * make mask before cutting ids
      
      * adjust position_ids according to past_key_values
      
      * flatten past_key_values
      
      * fix positional embeds
      
      * fix _reorder_cache
      
      * set use_cache to false when not decoder, fix attention mask init
      
      * add test for caching
      
      * add past_key_values for Roberta
      
      * fix position embeds
      
      * add caching test for roberta
      
      * add doc
      
      * make style
      
      * doc, fix attention mask, test
      
      * small fixes
      
      * adress patrick's comments
      
      * input_ids shouldn't start with pad token
      
      * use_cache only when decoder
      
      * make consistent with bert
      
      * make copies consistent
      
      * add use_cache to encoder
      
      * add past_key_values to tapas attention
      
      * apply suggestions from code review
      
      * make coppies consistent
      
      * add attn mask in tests
      
      * remove copied from longformer
      
      * apply suggestions from code review
      
      * fix bart test
      
      * nit
      
      * simplify model outputs
      
      * fix doc
      
      * fix output ordering
      88ef8893
  33. 02 Dec, 2020 1 commit
    • Patrick von Platen's avatar
      [PyTorch] Refactor Resize Token Embeddings (#8880) · 443f67e8
      Patrick von Platen authored
      * fix resize tokens
      
      * correct mobile_bert
      
      * move embedding fix into modeling_utils.py
      
      * refactor
      
      * fix lm head resize
      
      * refactor
      
      * break lines to make sylvain happy
      
      * add news tests
      
      * fix typo
      
      * improve test
      
      * skip bart-like for now
      
      * check if base_model = get(...) is necessary
      
      * clean files
      
      * improve test
      
      * fix tests
      
      * revert style templates
      
      * Update templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_{{cookiecutter.lowercase_modelname}}.py
      443f67e8
  34. 27 Nov, 2020 1 commit
  35. 25 Nov, 2020 1 commit
    • Patrick von Platen's avatar
      [XLNet] Fix mems behavior (#8567) · 2a6fbe6a
      Patrick von Platen authored
      * fix mems in xlnet
      
      * fix use_mems
      
      * fix use_mem_len
      
      * fix use mems
      
      * clean docs
      
      * fix tf typo
      
      * make xlnet tf for generation work
      
      * fix tf test
      
      * refactor use cache
      
      * add use cache for missing models
      
      * correct use_cache in generate
      
      * correct use cache in tf generate
      
      * fix tf
      
      * correct getattr typo
      
      * make sylvain happy
      
      * change in docs as well
      
      * do not apply to cookie cutter statements
      
      * fix tf test
      
      * make pytorch model fully backward compatible
      2a6fbe6a
  36. 24 Nov, 2020 1 commit
    • zhiheng-huang's avatar
      Support various BERT relative position embeddings (2nd) (#8276) · 2c83b3c3
      zhiheng-huang authored
      
      
      * Support BERT relative position embeddings
      
      * Fix typo in README.md
      
      * Address review comment
      
      * Fix failing tests
      
      * [tiny] Fix style_doc.py check by adding an empty line to configuration_bert.py
      
      * make fix copies
      
      * fix configs of electra and albert and fix longformer
      
      * remove copy statement from longformer
      
      * fix albert
      
      * fix electra
      
      * Add bert variants forward tests for various position embeddings
      
      * [tiny] Fix style for test_modeling_bert.py
      
      * improve docstring
      
      * [tiny] improve docstring and remove unnecessary dependency
      
      * [tiny] Remove unused import
      
      * re-add to ALBERT
      
      * make embeddings work for ALBERT
      
      * add test for albert
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      2c83b3c3
  37. 23 Nov, 2020 1 commit
    • Stas Bekman's avatar
      consistent ignore keys + make private (#8737) · e84786aa
      Stas Bekman authored
      * consistent ignore keys + make private
      
      * style
      
      * - authorized_missing_keys    => _keys_to_ignore_on_load_missing
        - authorized_unexpected_keys => _keys_to_ignore_on_load_unexpected
      
      * move public doc of private attributes to private comment
      e84786aa