1. 13 Jan, 2021 2 commits
  2. 12 Jan, 2021 5 commits
    • Sylvain Gugger's avatar
      Refactor `prepare_seq2seq_batch` (#9524) · 063d8d27
      Sylvain Gugger authored
      * Add target contextmanager and rework prepare_seq2seq_batch
      
      * Fix tests, treat BART and Barthez
      
      * Add last tokenizers
      
      * Fix test
      
      * Set src token before calling the superclass
      
      * Remove special behavior for T5
      
      * Remove needless imports
      
      * Remove needless asserts
      063d8d27
    • Lysandre Debut's avatar
      topk -> top_k (#9541) · dfbf0f55
      Lysandre Debut authored
      dfbf0f55
    • Lysandre Debut's avatar
      LayoutLM Config (#9539) · a1100fac
      Lysandre Debut authored
      a1100fac
    • NielsRogge's avatar
      Improve LayoutLM (#9476) · e45eba3b
      NielsRogge authored
      
      
      * Add LayoutLMForSequenceClassification and integration tests
      
      Improve docs
      
      Add LayoutLM notebook to list of community notebooks
      
      * Make style & quality
      
      * Address comments by @sgugger, @patrickvonplaten and @LysandreJik
      
      * Fix rebase with master
      
      * Reformat in one line
      
      * Improve code examples as requested by @patrickvonplaten
      Co-authored-by: default avatarLysandre <lysandre.debut@reseau.eseo.fr>
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      e45eba3b
    • Patrick von Platen's avatar
      [TFBart] Split TF-Bart (#9497) · 7f286132
      Patrick von Platen authored
      * make templates ready
      
      * make add_new_model_command_ready
      
      * finish tf bart
      
      * prepare tf mbart
      
      * finish tf bart
      
      * add tf mbart
      
      * add marian
      
      * prep pegasus
      
      * add tf pegasus
      
      * push blenderbot tf
      
      * add blenderbot
      
      * add blenderbot small
      
      * clean-up
      
      * make fix copy
      
      * define blend bot tok
      
      * fix
      
      * up
      
      * make style
      
      * add to docs
      
      * add copy statements
      
      * overwrite changes
      
      * improve
      
      * fix docs
      
      * finish
      
      * fix last slow test
      
      * fix missing git conflict line
      
      * fix blenderbot
      
      * up
      
      * fix blenderbot small
      
      * load changes
      
      * finish copied from
      
      * upload fix
      7f286132
  3. 11 Jan, 2021 4 commits
    • Nicolas Patry's avatar
      Enable TruncationStrategy override for pipelines (#9432) · d20e9c72
      Nicolas Patry authored
      * Enable TruncationStrategy override for pipelines
      
      * Update isort.
      
      * Fixing test
      
      * Fixing text_generation pipeline.
      
      * Using same DummyTok as other PR  for easier merge later.
      
      * Some more import guards.
      
      * Remove bogus file.
      
      * Do not pass `generate_kwargs` to `_parse_and_tokenize`.
      @patrickvonplaten
      
      * Removed DummyTok.
      
      * Doc quality.
      d20e9c72
    • Patrick von Platen's avatar
      fix tf led pt test (#9513) · 6c8ec2a9
      Patrick von Platen authored
      6c8ec2a9
    • Lysandre Debut's avatar
      Remove tolerance + drop_rows_to_fit by default (#9507) · d415882b
      Lysandre Debut authored
      * Remove tolerance + drop_rows_to_fit by default
      
      * remove drop_rows_to_fit
      d415882b
    • Julien Plu's avatar
      Full rework of the TF input/output embeddings and bias resizing (#9193) · 1243ee7d
      Julien Plu authored
      * Start rework resizing
      
      * Rework bias/decoder resizing
      
      * Full resizing rework
      
      * Full resizing rework
      
      * Start to update the models with the new approach
      
      * Finish to update the models
      
      * Update all the tests
      
      * Update the template
      
      * Fix tests
      
      * Fix tests
      
      * Test a new approach
      
      * Refactoring
      
      * Refactoring
      
      * Refactoring
      
      * New rework
      
      * Rework BART
      
      * Rework bert+blenderbot
      
      * Rework CTRL
      
      * Rework Distilbert
      
      * Rework DPR
      
      * Rework Electra
      
      * Rework Flaubert
      
      * Rework Funnel
      
      * Rework GPT2
      
      * Rework Longformer
      
      * Rework Lxmert
      
      * Rework marian+mbart
      
      * Rework mobilebert
      
      * Rework mpnet
      
      * Rework openai
      
      * Rework pegasus
      
      * Rework Roberta
      
      * Rework T5
      
      * Rework xlm+xlnet
      
      * Rework template
      
      * Fix TFT5EncoderOnly + DPRs
      
      * Restore previous methods
      
      * Fix Funnel
      
      * Fix CTRL and TransforXL
      
      * Apply style
      
      * Apply Sylvain's comments
      
      * Restore a test in DPR
      
      * Address the comments
      
      * Fix bug
      
      * Apply style
      
      * remove unused import
      
      * Fix test
      
      * Forgot a method
      
      * missing test
      
      * Trigger CI
      
      * naming update
      
      * Rebase
      
      * Trigger CI
      1243ee7d
  4. 10 Jan, 2021 1 commit
  5. 08 Jan, 2021 2 commits
  6. 07 Jan, 2021 3 commits
    • Patrick von Platen's avatar
      [TFGPT2] - Fix flaky past_key_values test (#9460) · f33a6f34
      Patrick von Platen authored
      * fix tf flakey
      
      * remove test files
      f33a6f34
    • Patrick von Platen's avatar
      [LED Test] fix common inputs pt for flaky pt-tf led test (#9459) · a400fe89
      Patrick von Platen authored
      * fix common inputs pt flakey led
      
      * fix other tests correspondingly
      a400fe89
    • Julien Plu's avatar
      New serving (#9419) · 812045ad
      Julien Plu authored
      * Add a serving method
      
      * Add albert
      
      * Add serving for BERT and BART
      
      * Add more models
      
      * Finish the serving addition
      
      * Temp fix
      
      * Restore DPR
      
      * Fix funnel attribute
      
      * Fix attributes GPT2
      
      * Fix OpenAIGPT attribute
      
      * Fix T5 attributes
      
      * Fix Bart attributes
      
      * Fix TransfoXL attributes
      
      * Add versioning
      
      * better test
      
      * Update template
      
      * Fix Flaubert
      
      * Fix T5
      
      * Apply style
      
      * Remove unused imports
      
      * Deactivate extra parameters
      
      * Remove too long test + saved_model default to False
      
      * Ignore the saved model test for some models
      
      * Fix some inputs
      
      * Fix mpnet serving
      
      * Trigger CI
      
      * Address all comments
      812045ad
  7. 06 Jan, 2021 4 commits
    • Patrick von Platen's avatar
      [GenerationOutputs] Fix GenerationOutputs Tests (#9443) · b8462b5b
      Patrick von Platen authored
      * fix generation models
      
      * fix led
      
      * fix docs
      
      * add is_decoder
      
      * fix last docstrings
      
      * make style
      
      * fix t5 cross attentions
      
      * correct t5
      b8462b5b
    • Sylvain Gugger's avatar
      Fast transformers import part 1 (#9441) · 0c96262f
      Sylvain Gugger authored
      * Don't import libs to check they are available
      
      * Don't import integrations at init
      
      * Add importlib_metdata to deps
      
      * Remove old vars references
      
      * Avoid syntax error
      
      * Adapt testing utils
      
      * Try to appease torchhub
      
      * Add dependency
      
      * Remove more private variables
      
      * Fix typo
      
      * Another typo
      
      * Refine the tf availability test
      0c96262f
    • Simon Brandeis's avatar
      Add flags to return scores, hidden states and / or attention weights in GenerationMixin (#9150) · c89f1bc9
      Simon Brandeis authored
      
      
      * Define new output dataclasses for greedy generation
      
      * Add output_[...] flags in greedy generation methods
      
      Added output_attentions, output_hidden_states, output_scores flags in
      generate and greedy_search methods in GenerationMixin.
      
      * [WIP] Implement logic and tests for output flags in generation
      
      * Update GreedySearchOutput classes & docstring
      
      * Implement greedy search output accumulation logic
      
      Update greedy_search unittests
      
      Fix generate method return value docstring
      
      Properly init flags with the default config
      
      * Update configuration to add output_scores flag
      
      * Fix test_generation_utils
      
      Sort imports and fix isinstance tests for GreedySearchOutputs
      
      * Fix typo in generation_utils
      
      * Add return_dict_in_generate for backwards compatibility
      
      * Add return_dict_in_generate flag in config
      
      * Fix tyPo in configuration
      
      * Fix handling of attentions and hidden_states flags
      
      * Make style & quality
      
      * first attempt attentions
      
      * some corrections
      
      * improve tests
      
      * special models requires special test
      
      * disable xlm test for now
      
      * clean tests
      
      * fix for tf
      
      * isort
      
      * Add output dataclasses for other generation methods
      
      * Add logic to return dict in sample generation
      
      * Complete test for sample generation
      
      - Pass output_attentions and output_hidden_states flags to encoder in
      encoder-decoder models
      - Fix import satements order in test_generation_utils file
      
      * Add logic to return dict in sample generation
      
      - Refactor tests to avoid using self.assertTrue, which provides
      scarce information when the test fails
      - Add tests for the three beam_search methods: vanilla, sample and
      grouped
      
      * Style doc
      
      * Fix copy-paste error in generation tests
      
      * Rename logits to scores and refactor
      
      * Refactor group_beam_search for consistency
      
      * make style
      
      * add sequences_scores
      
      * fix all tests
      
      * add docs
      
      * fix beam search finalize test
      
      * correct docstring
      
      * clean some files
      
      * Made suggested changes to the documentation
      
      * Style doc ?
      
      * Style doc using the Python util
      
      * Update src/transformers/generation_utils.py
      
      * fix empty lines
      
      * fix all test
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      c89f1bc9
    • Stas Bekman's avatar
      [trainer] self.model_wrapped + _model_unwrap (#9390) · 9f675b05
      Stas Bekman authored
      
      
      * model wrapped + model_unwrap
      
      * cleanup
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * style
      
      * deprecation warning
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      9f675b05
  8. 05 Jan, 2021 3 commits
    • Patrick von Platen's avatar
      [PyTorch Bart] Split Bart into different models (#9343) · eef66035
      Patrick von Platen authored
      * first try
      
      * remove old template
      
      * finish bart
      
      * finish mbart
      
      * delete unnecessary line
      
      * init pegasus
      
      * save intermediate
      
      * correct pegasus
      
      * finish pegasus
      
      * remove cookie cutter leftover
      
      * add marian
      
      * finish blenderbot
      
      * replace in file
      
      * correctly split blenderbot
      
      * delete "old" folder
      
      * correct "add statement"
      
      * adapt config for tf comp
      
      * correct configs for tf
      
      * remove ipdb
      
      * fix more stuff
      
      * fix mbart
      
      * push pegasus fix
      
      * fix mbart
      
      * more fixes
      
      * fix research projects code
      
      * finish docs for bart, mbart, and marian
      
      * delete unnecessary file
      
      * correct attn typo
      
      * correct configs
      
      * remove pegasus for seq class
      
      * correct peg docs
      
      * correct peg docs
      
      * finish configs
      
      * further improve docs
      
      * add copied from statements to mbart
      
      * fix copied from in mbart
      
      * add copy statements to marian
      
      * add copied from to marian
      
      * add pegasus copied from
      
      * finish pegasus
      
      * finish copied from
      
      * Apply suggestions from code review
      
      * make style
      
      * backward comp blenderbot
      
      * apply lysandres and sylvains suggestions
      
      * apply suggestions
      
      * push last fixes
      
      * fix docs
      
      * fix tok tests
      
      * fix imports code style
      
      * fix doc
      eef66035
    • Patrick von Platen's avatar
      LED (#9278) · 189387e9
      Patrick von Platen authored
      * create model
      
      * add integration
      
      * save current state
      
      * make integration tests pass
      
      * add one more test
      
      * add explanation to tests
      
      * remove from bart
      
      * add padding
      
      * remove unnecessary test
      
      * make all tests pass
      
      * re-add cookie cutter tests
      
      * finish PyTorch
      
      * fix attention test
      
      * Update tests/test_modeling_common.py
      
      * revert change
      
      * remove unused file
      
      * add string to doc
      
      * save intermediate
      
      * make tf integration tests pass
      
      * finish tf
      
      * fix doc
      
      * fix docs again
      
      * add led to doctree
      
      * add to auto tokenizer
      
      * added tips for led
      
      * make style
      
      * apply jplus statements
      
      * correct tf longformer
      
      * apply lysandres suggestions
      
      * apply sylvains suggestions
      
      * Apply suggestions from code review
      189387e9
    • Julien Plu's avatar
      Use stable functions (#9369) · 4225740a
      Julien Plu authored
      4225740a
  9. 04 Jan, 2021 1 commit
  10. 25 Dec, 2020 1 commit
  11. 24 Dec, 2020 1 commit
    • 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
  12. 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
  13. 22 Dec, 2020 3 commits
  14. 21 Dec, 2020 3 commits
  15. 19 Dec, 2020 1 commit
    • sandip's avatar
      Added TF TransfoXL Sequence Classification (#9169) · e0e255be
      sandip authored
      * TF Transfoxl seq classification
      
      * Update test_modeling_tf_transfo_xl.py
      
      Added num_labels to config level
      
      * TF Transfoxl seq classification
      
      * Update test_modeling_tf_transfo_xl.py
      
      Added num_labels to config level
      
      * code refactor
      
      * code refactor
      
      * code refator
      e0e255be
  16. 18 Dec, 2020 2 commits
  17. 17 Dec, 2020 1 commit
  18. 16 Dec, 2020 2 commits