1. 24 Dec, 2020 5 commits
    • Ratthachat (Jung)'s avatar
      Proposed Fix : [RagSequenceForGeneration] generate "without" input_ids (#9220) · f3a3b91d
      Ratthachat (Jung) authored
      * Create modeling_tf_dpr.py
      
      * Add TFDPR
      
      * Add back TFPegasus, TFMarian, TFMBart, TFBlenderBot
      
      last commit accidentally deleted these 4 lines, so I recover them back
      
      * Add TFDPR
      
      * Add TFDPR
      
      * clean up some comments, add TF input-style doc string
      
      * Add TFDPR
      
      * Make return_dict=False as default
      
      * Fix return_dict bug (in .from_pretrained)
      
      * Add get_input_embeddings()
      
      * Create test_modeling_tf_dpr.py
      
      The current version is already passed all 27 tests!
      Please see the test run at : 
      https://colab.research.google.com/drive/1czS_m9zy5k-iSJbzA_DP1k1xAAC_sdkf?usp=sharing
      
      
      
      * fix quality
      
      * delete init weights
      
      * run fix copies
      
      * fix repo consis
      
      * del config_class, load_tf_weights
      
      They shoud be 'pytorch only'
      
      * add config_class back
      
      after removing it, test failed ... so totally only removing "use_tf_weights = None" on Lysandre suggestion
      
      * newline after .. note::
      
      * import tf, np (Necessary for ModelIntegrationTest)
      
      * slow_test from_pretrained with from_pt=True
      
      At the moment we don't have TF weights (since we don't have official official TF model)
      Previously, I did not run slow test, so I missed this bug
      
      * Add simple TFDPRModelIntegrationTest
      
      Note that this is just a test that TF and Pytorch gives approx. the same output.
      However, I could not test with the official DPR repo's output yet
      
      * upload correct tf model
      
      * remove position_ids as missing keys
      
      * fix RagSeq generate with context_input_ids
      
      fix RagSeq generate with context_input_ids
      
      * apply style
      
      * delete unused lines
      
      * Add test_rag_sequence_generate_batch_from_context_input_ids
      
      * Readability improved
      
      * stylying
      
      * Stylize
      
      * typos
      
      * add check_model_generate_from_context_input_ids
      
      * make style
      
      * Apply suggestions from code review
      
      * make style2
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarpatrickvonplaten <patrick@huggingface.co>
      f3a3b91d
    • Suraj Patil's avatar
      enable cache by default (#9296) · 2a18b709
      Suraj Patil authored
      2a18b709
    • Jungwhan's avatar
      Fix typo in file_utils.py (#9289) · 6189ae99
      Jungwhan authored
      6189ae99
    • Jethro Kuan's avatar
      allow integer device for BatchEncoding (#9271) · 222dbdb2
      Jethro Kuan authored
      
      
      Fixes #9244
      Co-authored-by: default avatarJethro Kuan <jethro.kuan@bytedance.com>
      222dbdb2
    • Patrick von Platen's avatar
      [Templates] Adapt Bert (#9284) · 6c091abe
      Patrick von Platen authored
      * adapt templates
      
      * adapt config
      
      * add test as well
      
      * fix output type
      
      * fix cache false naming
      
      * finish tests
      
      * last fix
      6c091abe
  2. 23 Dec, 2020 6 commits
    • 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
    • Sylvain Gugger's avatar
    • Connor Brinton's avatar
      Minor documentation revisions from copyediting (#9266) · bcc87c63
      Connor Brinton authored
      * typo: Revise "checkout" to "check out"
      
      * typo: Change "seemlessly" to "seamlessly"
      
      * typo: Close parentheses in "Using the tokenizer"
      
      * typo: Add closing parenthesis to supported models aside
      
      * docs: Treat ``position_ids`` as plural
      
      Alternatively, the word "argument" could be added to make the subject singular.
      
      * docs: Remove comma, making subordinate clause
      
      * docs: Remove comma separating verb and direct object
      
      * docs: Fix typo ("next" -> "text")
      
      * docs: Reverse phrase order to simplify sentence
      
      * docs: "quicktour" -> "quick tour"
      
      * docs: "to throw" -> "from throwing"
      
      * docs: Remove disruptive newline in padding/truncation section
      
      * docs: "show exemplary" -> "show examples of"
      
      * docs: "much harder as" -> "much harder than"
      
      * docs: Fix typo "seach" -> "search"
      
      * docs: Fix subject-verb disagreement in WordPiece description
      
      * docs: Fix style in preprocessing.rst
      bcc87c63
    • Patrick von Platen's avatar
      [Seq2Seq Templates] Fix check_repo.py templates file (#9277) · d5db6c37
      Patrick von Platen authored
      * add enc dec pt model to check repo
      
      * fix indent
      d5db6c37
    • Xu Song's avatar
      Fix param error (#9273) · 4bafc43b
      Xu Song authored
      TypeError: forward() got an unexpected keyword argument 'token_type_ids'
      4bafc43b
    • Xu Song's avatar
      Fix gpt2 document (#9272) · 58e8a761
      Xu Song authored
      58e8a761
  3. 22 Dec, 2020 10 commits
  4. 21 Dec, 2020 9 commits
  5. 20 Dec, 2020 1 commit
  6. 19 Dec, 2020 3 commits
  7. 18 Dec, 2020 6 commits