1. 11 May, 2021 1 commit
  2. 10 May, 2021 2 commits
    • Pavel Soriano's avatar
      Fixes NoneType exception when topk is larger than one coupled with a small... · 9120ae7d
      Pavel Soriano authored
      Fixes NoneType exception when topk is larger than one coupled with a small context in the Question-Answering pipeline (#11628)
      
      * added fix to decode function. added test to qa pipeline tests
      
      * completed topk docstring
      
      * fixed formatting with black
      
      * applied style_doc to fix line length
      9120ae7d
    • Tanmay Laud's avatar
      Big Bird Fast Tokenizer implementation (#11075) · f7f87295
      Tanmay Laud authored
      
      
      * Added Big Bird Fast Tokenizer initial file
      
      * style fixes
      
      * flake fixes
      
      * Added big bird fast tokenizer to init files
      
      * Added big bird fast to Auto tokenization
      
      * fix styles
      
      * minor quality fixes
      
      * Added initial test code
      
      * Fix SpmConverter when precompiled_charsmap doesn't exist
      
      * fixed post processor
      
      * minor style fix
      
      * minor fix input names
      
      * Actually fix identity normalization
      
      * style
      
      * Added token type ids to fast tokenizer
      
      * style
      
      * flake fix
      
      * fix copies
      Co-authored-by: default avatarAnthony MOI <m.anthony.moi@gmail.com>
      f7f87295
  3. 07 May, 2021 2 commits
  4. 06 May, 2021 1 commit
  5. 05 May, 2021 2 commits
  6. 04 May, 2021 5 commits
  7. 03 May, 2021 2 commits
    • Muktan's avatar
      [Wav2vec2] Fixed tokenization mistakes while adding single-char tokens to tokenizer (#11538) · a721a5ee
      Muktan authored
      
      
      * Fixed tokenization mistakes while adding single-char tokens to tokenizer
      
      * Added tests and Removed unnecessary comments.
      
      * finalize wav2vec2 tok
      
      * add more aggressive tests
      
      * Apply suggestions from code review
      
      * fix useless import
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      a721a5ee
    • NielsRogge's avatar
      Add LUKE (#11223) · f3cf8ae7
      NielsRogge authored
      
      
      * Rebase with master
      
      * Minor bug fix in docs
      
      * Copy files from adding_luke_v2 and improve docs
      
      * change the default value of use_entity_aware_attention to True
      
      * remove word_hidden_states
      
      * fix head models
      
      * fix tests
      
      * fix the conversion script
      
      * add integration tests for the pretrained large model
      
      * improve docstring
      
      * Improve docs, make style
      
      * fix _init_weights for pytorch 1.8
      
      * improve docs
      
      * fix tokenizer to construct entity sequence with [MASK] entity when entities=None
      
      * Make fix-copies
      
      * Make style & quality
      
      * Bug fixes
      
      * Add LukeTokenizer to init
      
      * Address most comments by @patil-suraj and @LysandreJik
      
      * rename _compute_extended_attention_mask to get_extended_attention_mask
      
      * add comments to LukeSelfAttention
      
      * fix the documentation of the tokenizer
      
      * address comments by @patil-suraj, @LysandreJik, and @sgugger
      
      * improve docs
      
      * Make style, quality and fix-copies
      
      * Improve docs
      
      * fix docs
      
      * add "entity_span_classification" task
      
      * update example code for LukeForEntitySpanClassification
      
      * improve docs
      
      * improve docs
      
      * improve the code example in luke.rst
      
      * rename the classification layer in LukeForEntityClassification from typing to classifier
      
      * add bias to the classifier in LukeForEntitySpanClassification
      
      * update docs to use fine-tuned hub models in code examples of the head models
      
      * update the example sentences
      
      * Make style & quality
      
      * Add require_torch to tokenizer tests
      
      * Add require_torch to tokenizer tests
      
      * Address comments by @sgugger and add community notebooks
      
      * Make fix-copies
      Co-authored-by: default avatarIkuya Yamada <ikuya@ikuya.net>
      f3cf8ae7
  8. 30 Apr, 2021 5 commits
    • Stas Bekman's avatar
      [DeepSpeed] fp32 support (#11499) · 4e7bf94e
      Stas Bekman authored
      * prep for deepspeed==0.3.16
      
      * new version
      
      * too soon
      
      * support and test fp32 mode
      
      * troubleshooting doc start
      
      * workaround no longer needed
      
      * add fp32 doc
      
      * style
      
      * cleanup, add tf32 note
      
      * clarify
      
      * release was made
      4e7bf94e
    • Takuya Makino's avatar
      c2cd02ac
    • Shubham Sanghavi's avatar
      30ede899
    • Nicolas Patry's avatar
      Adding `AutomaticSpeechRecognitionPipeline`. (#11337) · db9dd09c
      Nicolas Patry authored
      
      
      * Adding `AutomaticSpeechRecognitionPipeline`.
      
      - Because we added everything to enable this pipeline, we probably
      should add it to `transformers`.
      - This PR tries to limit the scope and focuses only on the pipeline part
      (what should go in, and out).
      - The tests are very specific for S2T and Wav2vec2 to make sure both
      architectures are supported by the pipeline. We don't use the mixin for
      tests right now, because that requires more work in the `pipeline`
      function (will be done in a follow up PR).
      - Unsure about the "helper" function `ffmpeg_read`. It makes a lot of
        sense from a user perspective, it does not add any additional
      dependencies (as in hard dependency, because users can always use their
      own load mechanism). Meanwhile, it feels slightly clunky to have so much
      optional preprocessing.
      - The pipeline is not done to support streaming audio right now.
      
      Future work:
      
      - Add `automatic-speech-recognition` as a `task`. And add the
      FeatureExtractor.from_pretrained within `pipeline` function.
      - Add small models within tests
      - Add the Mixin to tests.
      - Make the logic between ForCTC vs ForConditionalGeneration better.
      
      * Update tests/test_pipelines_automatic_speech_recognition.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Adding docs + main import + type checking + LICENSE.
      
      * Doc style !.
      
      * Fixing TYPE_HINT.
      
      * Specifying waveform shape in the docs.
      
      * Adding asserts + specify in the documentation the shape of the input
      np.ndarray.
      
      * Update src/transformers/pipelines/automatic_speech_recognition.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Adding require to tests + move the `feature_extractor` doc.
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      db9dd09c
    • Philip May's avatar
      add sp_model_kwargs to unpickle of xlm roberta tok (#11430) · e0db8276
      Philip May authored
      add test for pickle
      
      simplify test
      
      fix test code style
      
      add missing pickle import
      
      fix test
      
      fix test
      
      fix test
      e0db8276
  9. 29 Apr, 2021 1 commit
  10. 26 Apr, 2021 6 commits
  11. 25 Apr, 2021 2 commits
    • cronoik's avatar
      EncoderDecoderConfigs should not create new objects (#11300) · 35cd8eed
      cronoik authored
      
      
      * removes the creation of separate config objects and uses the existing ones instead+overwrite resize_token_embeddings from parent class because it is not working for the EncoderDecoderModel
      
      * rollback to current version of the huggingface master branch
      
      * reworked version that ties the encoder and decoder config of the parent encoderdecoder instance
      
      * overwrite of resize_token_embeddings throws an error now
      
      * review comment suggestion
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * implemented warning in case encoderdecoder is created with differing configs of encoderdecoderconfig and decoderconfig or encoderconfig
      
      * added test to avoid diverging configs of wrapper class and wrapped classes
      
      * Update src/transformers/models/encoder_decoder/modeling_encoder_decoder.py
      
      * make style
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      35cd8eed
    • Daniel Stancl's avatar
      Add head_mask, decoder_head_mask, cross_head_mask to ProphetNet (#9964) · f45cb66b
      Daniel Stancl authored
      * Add head_mask & decoder_head_mask + some corrections
      
      * Fix head masking for N-grams
      
      * Enable test_headmasking for encoder and decod
      
      * Fix one typo regarding in modeling_propgetnet.py
      
      * Enable test_headmasking for ProphetNetStandaloneDecoderModelTest
      and ProphetNetStandaloneEncoderModelTest in test_modeling_prophetnet.py
      
      * make style
      
      * Fix cross_head_mask
      
      * Fix attention head mask naming
      
      * `cross_head_mask` -> `cross_attn_head_mask`
      
      * `cross_layer_head_mask` -> `cross_attn_layer_head_mask`
      
      * Still need to merge #10605 to master to pass the tests
      f45cb66b
  12. 23 Apr, 2021 5 commits
    • Philip May's avatar
      Enable option for subword regularization in `XLMRobertaTokenizer` (#11149) · 195bfd11
      Philip May authored
      
      
      * enable subword regularization.
      
      * fix tokenizer storage
      
      * fix docstring formatting
      
      * Update src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      
      * fix docstring formatting
      
      * add test for subword regularization tokenizer
      
      * improve comments of test
      
      * add sp_model_kwargs
      
      * reformat docstring to match the style
      
      * add some more documentation
      
      * Update src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * improve docstring
      
      * empty commit to trigger CI
      
      * Update src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * fix docstring formatting for sphinx
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      195bfd11
    • Daniel Stancl's avatar
      Fix cross-attention head mask for Torch encoder-decoder models (#10605) · e3ff165a
      Daniel Stancl authored
      * Fix cross-attention head mask for Torch BART models
      
      * Fix head masking for cross-attention module for the following
      models: BART, Blenderbot, Blenderbot_small, M2M_100, Marian, MBart,
      Pegasus
      
      * Enable test_headmasking for M2M_100 model
      
      * Fix cross_head_mask for FSMT, LED and T5
      
      * This commit fixes `head_mask` for cross-attention modules
      in the following models: FSMT, LED, T5
      
      * It also contains some smaller changes in doc so that
      it is be perfectly clear the shape of `cross_head_mask`
      is the same as of `decoder_head_mask`
      
      * Update template
      
      * Fix template for BartForCausalLM
      
      * Fix cross_head_mask for Speech2Text models
      
      * Fix cross_head_mask in templates
      
      * Fix args order in BartForCausalLM template
      
      * Fix doc in BART templates
      
      * Make more explicit naming
      
      * `cross_head_mask` -> `cross_attn_head_mask`
      
      * `cross_layer_head_mask` -> `cross_attn_layer_head_mask`
      
      * Fix doc
      
      * make style quality
      
      * Fix speech2text docstring
      e3ff165a
    • Sylvain Gugger's avatar
      Trainer push to hub (#11328) · bf2e0cf7
      Sylvain Gugger authored
      
      
      * Initial support for upload to hub
      
      * push -> upload
      
      * Fixes + examples
      
      * Fix torchhub test
      
      * Torchhub test I hate you
      
      * push_model_to_hub -> push_to_hub
      
      * Apply mixin to other pretrained models
      
      * Remove ABC inheritance
      
      * Add tests
      
      * Typo
      
      * Run tests
      
      * Install git-lfs
      
      * Change approach
      
      * Add push_to_hub to all
      
      * Staging test suite
      
      * Typo
      
      * Maybe like this?
      
      * More deps
      
      * Cache
      
      * Adapt name
      
      * Quality
      
      * MOAR tests
      
      * Put it in testing_utils
      
      * Docs + torchhub last hope
      
      * Styling
      
      * Wrong method
      
      * Typos
      
      * Update src/transformers/file_utils.py
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      
      * Address review comments
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      bf2e0cf7
    • Patrick von Platen's avatar
      make blenderbot test slow (#11395) · 74e84f1f
      Patrick von Platen authored
      74e84f1f
    • Patrick von Platen's avatar
      [Flax] Big FlaxBert Refactor (#11364) · 8c9b5fcb
      Patrick von Platen authored
      * improve flax
      
      * refactor
      
      * typos
      
      * Update src/transformers/modeling_flax_utils.py
      
      * Apply suggestions from code review
      
      * Update src/transformers/modeling_flax_utils.py
      
      * fix typo
      
      * improve error tolerance
      
      * typo
      
      * correct nasty saving bug
      
      * fix from pretrained
      
      * correct tree map
      
      * add note
      
      * correct weight tying
      8c9b5fcb
  13. 22 Apr, 2021 1 commit
  14. 21 Apr, 2021 2 commits
    • Sylvain Gugger's avatar
      Examples reorg (#11350) · dabeb152
      Sylvain Gugger authored
      
      
      * Base move
      
      * Examples reorganization
      
      * Update references
      
      * Put back test data
      
      * Move conftest
      
      * More fixes
      
      * Move test data to test fixtures
      
      * Update path
      
      * Apply suggestions from code review
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Address review comments and clean
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      dabeb152
    • Nicolas Patry's avatar
      Removed `max_length` from being mandatory within `generate`. (#11314) · aad95c7c
      Nicolas Patry authored
      * Removed `max_length` from being mandatory within `generate`.
      
      - Moving on to fully using `StoppingCriteria` for `greedy` and `sample`
      modes.
      - `max_length` still used for `beam_search` and `group_beam_search`
      (Follow up PR)
      - Fixes a bug with MaxLengthStoppingCriteria (we should stop as soon a
      we hit the max_length, the comparison needs to be or equal, that affects
      the tests).
      - Added options to use `logits_processor` and `stopping_criteria`
      directly within `generate` function (so some users can define their own
      `logits_processor` and `stopping_criteria`).
      - Modified the backward compat tests to make sure we issue a warning.
      
      * Fix `max_length` argument in `generate`.
      
      * Moving validate to being functional.
      
      - Renamed `smax_length` to `stoppping_max_length`.
      
      * Removing `logits_processor` and `stopping_criteria` from `generate`
      arguments.
      
      * Deepcopy.
      
      * Fix global variable name.
      aad95c7c
  15. 20 Apr, 2021 2 commits
  16. 16 Apr, 2021 1 commit