1. 16 Dec, 2021 1 commit
  2. 15 Dec, 2021 1 commit
  3. 13 Dec, 2021 1 commit
  4. 07 Dec, 2021 1 commit
    • Ryokan RI's avatar
      Add mLUKE (#14640) · 30646a0a
      Ryokan RI authored
      * implement MLukeTokenizer and LukeForMaskedLM
      
      * update tests
      
      * update docs
      
      * add LukeForMaskedLM to check_repo.py
      
      * update README
      
      * fix test and specify the entity pad id in tokenization_(m)luke
      
      * fix EntityPredictionHeadTransform
      30646a0a
  5. 03 Dec, 2021 1 commit
    • Matt's avatar
      Make DefaultDataCollator importable from root (#14588) · 73ec4340
      Matt authored
      * Make DefaultDataCollator importable from root
      
      * Add documentation for DefaultDataCollator and add return_tensors argument to all class docstrings
      
      * make style
      
      * Add DefaultDataCollator to data_collator.rst
      
      * Add DefaultDataCollator to data_collator.rst
      73ec4340
  6. 28 Nov, 2021 1 commit
  7. 23 Nov, 2021 1 commit
  8. 10 Nov, 2021 1 commit
  9. 29 Oct, 2021 1 commit
  10. 12 Oct, 2021 1 commit
    • Yih-Dar's avatar
      Add TFEncoderDecoderModel + Add cross-attention to some TF models (#13222) · 8b240a06
      Yih-Dar authored
      
      
      * Add cross attentions to TFGPT2Model
      
      * Add TFEncoderDecoderModel
      
      * Add TFBaseModelOutputWithPoolingAndCrossAttentions
      
      * Add cross attentions to TFBertModel
      
      * Fix past or past_key_values argument issue
      
      * Fix generation
      
      * Fix save and load
      
      * Add some checks and comments
      
      * Clean the code that deals with past keys/values
      
      * Add kwargs to processing_inputs
      
      * Add serving_output to TFEncoderDecoderModel
      
      * Some cleaning + fix use_cache value issue
      
      * Fix tests + add bert2bert/bert2gpt2 tests
      
      * Fix more tests
      
      * Ignore crossattention.bias when loading GPT2 weights into TFGPT2
      
      * Fix return_dict_in_generate in tf generation
      
      * Fix is_token_logit_eos_token bug in tf generation
      
      * Finalize the tests after fixing some bugs
      
      * Fix another is_token_logit_eos_token bug in tf generation
      
      * Add/Update docs
      
      * Add TFBertEncoderDecoderModelTest
      
      * Clean test script
      
      * Add TFEncoderDecoderModel to the library
      
      * Add cross attentions to TFRobertaModel
      
      * Add TFRobertaEncoderDecoderModelTest
      
      * make style
      
      * Change the way of position_ids computation
      
      * bug fix
      
      * Fix copies in tf_albert
      
      * Remove some copied from and apply some fix-copies
      
      * Remove some copied
      
      * Add cross attentions to some other TF models
      
      * Remove encoder_hidden_states from TFLayoutLMModel.call for now
      
      * Make style
      
      * Fix TFRemBertForCausalLM
      
      * Revert the change to longformer + Remove copies
      
      * Revert the change to albert and convbert + Remove copies
      
      * make quality
      
      * make style
      
      * Add TFRembertEncoderDecoderModelTest
      
      * make quality and fix-copies
      
      * test TFRobertaForCausalLM
      
      * Fixes for failed tests
      
      * Fixes for failed tests
      
      * fix more tests
      
      * Fixes for failed tests
      
      * Fix Auto mapping order
      
      * Fix TFRemBertEncoder return value
      
      * fix tf_rembert
      
      * Check copies are OK
      
      * Fix missing TFBaseModelOutputWithPastAndCrossAttentions is not defined
      
      * Add TFEncoderDecoderModelSaveLoadTests
      
      * fix tf weight loading
      
      * check the change of use_cache
      
      * Revert the change
      
      * Add missing test_for_causal_lm for TFRobertaModelTest
      
      * Try cleaning past
      
      * fix _reorder_cache
      
      * Revert some files to original versions
      
      * Keep as many copies as possible
      
      * Apply suggested changes - Use raise ValueError instead of assert
      
      * Move import to top
      
      * Fix wrong require_torch
      
      * Replace more assert by raise ValueError
      
      * Add test_pt_tf_model_equivalence (the test won't pass for now)
      
      * add test for loading/saving
      
      * finish
      
      * finish
      
      * Remove test_pt_tf_model_equivalence
      
      * Update tf modeling template
      
      * Remove pooling, added in the prev. commit, from MainLayer
      
      * Update tf modeling test template
      
      * Move inputs["use_cache"] = False to modeling_tf_utils.py
      
      * Fix torch.Tensor in the comment
      
      * fix use_cache
      
      * Fix missing use_cache in ElectraConfig
      
      * Add a note to from_pretrained
      
      * Fix style
      
      * Change test_encoder_decoder_save_load_from_encoder_decoder_from_pt
      
      * Fix TFMLP (in TFGPT2) activation issue
      
      * Fix None past_key_values value in serving_output
      
      * Don't call get_encoderdecoder_model in TFEncoderDecoderModelTest.test_configuration_tie until we have a TF checkpoint on Hub
      
      * Apply review suggestions - style for cross_attns in serving_output
      
      * Apply review suggestions - change assert + docstrings
      
      * break the error message to respect the char limit
      
      * deprecate the argument past
      
      * fix docstring style
      
      * Update the encoder-decoder rst file
      
      * fix Unknown interpreted text role "method"
      
      * fix typo
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      8b240a06
  11. 08 Oct, 2021 1 commit
  12. 29 Sep, 2021 1 commit
  13. 14 Sep, 2021 1 commit
    • Sylvain Gugger's avatar
      Push to hub when saving checkpoints (#13503) · 3081d386
      Sylvain Gugger authored
      * Push to hub when saving checkpoints
      
      * Add model card
      
      * Revert partial model card
      
      * Small fix for checkpoint
      
      * Add tests
      
      * Add documentation
      
      * Fix tests
      
      * Bump huggingface_hub
      
      * Fix test
      3081d386
  14. 10 Sep, 2021 1 commit
    • Nicolas Patry's avatar
      [Large PR] Entire rework of pipelines. (#13308) · c63fcabf
      Nicolas Patry authored
      
      
      * Enabling dataset iteration on pipelines.
      
      Enabling dataset iteration on pipelines.
      
      Unifying parameters under `set_parameters` function.
      
      Small fix.
      
      Last fixes after rebase
      
      Remove print.
      
      Fixing text2text `generate_kwargs`
      
      No more `self.max_length`.
      
      Fixing tf only conversational.
      
      Consistency in start/stop index over TF/PT.
      
      Speeding up drastically on TF (nasty bug where max_length would increase
      a ton.)
      
      Adding test for support for non fast tokenizers.
      
      Fixign GPU usage on zero-shot.
      
      Fix working on Tf.
      
      Update src/transformers/pipelines/base.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      Update src/transformers/pipelines/base.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      Small cleanup.
      
      Remove all asserts + simple format.
      
      * Fixing audio-classification for large PR.
      
      * Overly explicity null checking.
      
      * Encapsulating GPU/CPU pytorch manipulation directly within `base.py`.
      
      * Removed internal state for parameters of the  pipeline.
      
      Instead of overriding implicitly internal state, we moved
      to real named arguments on every `preprocess`, `_forward`,
      `postprocess` function.
      
      Instead `_sanitize_parameters` will be used to split all kwargs
      of both __init__ and __call__ into the 3 kinds of named parameters.
      
      * Move import warnings.
      
      * Small fixes.
      
      * Quality.
      
      * Another small fix, using the CI to debug faster.
      
      * Last fixes.
      
      * Last fix.
      
      * Small cleanup of tensor moving.
      
      * is not None.
      
      * Adding a bunch of docs + a iteration test.
      
      * Fixing doc style.
      
      * KeyDataset = None guard.
      
      * RRemoving the Cuda test for pipelines (was testing).
      
      * Even more simple iteration test.
      
      * Correct import .
      
      * Long day.
      
      * Fixes in docs.
      
      * [WIP] migrating object detection.
      
      * Fixed the target_size bug.
      
      * Fixup.
      
      * Bad variable name.
      
      * Fixing `ensure_on_device` respects original ModelOutput.
      c63fcabf
  15. 08 Sep, 2021 3 commits
  16. 06 Sep, 2021 1 commit
    • Nils Reimers's avatar
      Update model configs - Allow setters for common properties (#13026) · c8be8a9a
      Nils Reimers authored
      * refactor GPT Config to allow dyn. properties
      
      * make attribute_map a class attribute
      
      * remove old code
      
      * update unit test to test config: Add test for common properties setter
      
      * update unit test to test config: Add test for common properties passed as parameters to __init__
      
      * update to black code format
      
      * Allow that setters are not defined for certain config classes
      
      * update config classes to implement attribute_map
      
      * bugfix lxmert config - id2labels was not defined when num_labels was set
      
      * update broken configs - add attribute_maps
      
      * update bart config
      
      * update black codestyle
      
      * update documentation on common config attributes
      
      * update GPTJ config to new attribute map
      
      * update docs on common attributes
      
      * gptj config: add max_position_embeddings
      
      * gptj config: format with black
      
      * update speech to text 2 config
      
      * format doc file to max_len 119
      
      * update config template
      c8be8a9a
  17. 01 Sep, 2021 1 commit
  18. 31 Aug, 2021 2 commits
    • Matt's avatar
      TF/Numpy variants for all DataCollator classes (#13105) · 854260ca
      Matt authored
      
      
      * Adding a TF variant of the DataCollatorForTokenClassification to get feedback
      
      * Added a Numpy variant and a post_init check to fail early if a missing import is found
      
      * Fixed call to Numpy variant
      
      * Added a couple more of the collators
      
      * Update src/transformers/data/data_collator.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Fixes, style pass, finished DataCollatorForSeqToSeq
      
      * Added all the LanguageModeling DataCollators, except SOP and PermutationLanguageModeling
      
      * Adding DataCollatorForPermutationLanguageModeling
      
      * Style pass
      
      * Add missing `__call__` for PLM
      
      * Remove `post_init` checks for frameworks because the imports inside them were making us fail code quality checks
      
      * Remove unused imports
      
      * First attempt at some TF tests
      
      * A second attempt to make any of those tests actually work
      
      * TF tests, round three
      
      * TF tests, round four
      
      * TF tests, round five
      
      * TF tests, all enabled!
      
      * Style pass
      
      * Merging tests into `test_data_collator.py`
      
      * Merging tests into `test_data_collator.py`
      
      * Fixing up test imports
      
      * Fixing up test imports
      
      * Trying shuffling the conditionals around
      
      * Commenting out non-functional old tests
      
      * Completed all tests for all three frameworks
      
      * Style pass
      
      * Fixed test typo
      
      * Style pass
      
      * Move standard `__call__` method to mixin
      
      * Rearranged imports for `test_data_collator`
      
      * Fix data collator typo "torch" -> "pt"
      
      * Fixed the most embarrassingly obvious bug
      
      * Update src/transformers/data/data_collator.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Renaming mixin
      
      * Updating docs
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarDalton Walker <dalton_walker@icloud.com>
      Co-authored-by: default avatarAndrew Romans <andrew.romans@hotmail.com>
      854260ca
    • Serhiy-Shekhovtsov's avatar
  19. 30 Aug, 2021 1 commit
  20. 04 Aug, 2021 1 commit
    • Patrick von Platen's avatar
      [Flax] Correct flax docs (#12782) · fbf468b0
      Patrick von Platen authored
      * fix_torch_device_generate_test
      
      * remove @
      
      * fix flax docs
      
      * correct more docs in flax
      
      * another correction
      
      * fix flax docs
      
      * Apply suggestions from code review
      fbf468b0
  21. 21 Jul, 2021 1 commit
  22. 17 Jul, 2021 1 commit
  23. 14 Jul, 2021 1 commit
  24. 13 Jul, 2021 1 commit
  25. 29 Jun, 2021 1 commit
  26. 25 Jun, 2021 1 commit
  27. 23 Jun, 2021 1 commit
  28. 22 Jun, 2021 2 commits
  29. 14 Jun, 2021 1 commit
  30. 08 Jun, 2021 2 commits
  31. 04 Jun, 2021 1 commit
  32. 02 Jun, 2021 1 commit
  33. 01 Jun, 2021 2 commits
  34. 26 May, 2021 1 commit
    • Patrick von Platen's avatar
      Flax Generate (#11777) · 996a315e
      Patrick von Platen authored
      
      
      * fix_torch_device_generate_test
      
      * remove @
      
      * add
      
      * indexing
      
      * correct a couple of tests
      
      * fix tests
      
      * add logits processor
      
      * finish top_k, top_p, temp
      
      * add docs
      
      * correct flax prng key default
      
      * improve generate
      
      * add generation docs
      
      * add docs
      
      * make style
      
      * revert model outputs change
      
      * make style
      
      * correct typo
      
      * fix tests
      
      * fix slow test
      
      * add raise
      
      * finish generation
      Co-authored-by: default avatarPatrick von Platen <patrick@huggingface.co>
      996a315e