1. 24 Aug, 2020 2 commits
  2. 20 Aug, 2020 1 commit
    • Sylvain Gugger's avatar
      Add tests to Trainer (#6605) · 573bdb0a
      Sylvain Gugger authored
      * Add tests to Trainer
      
      * Test if removing long breaks everything
      
      * Remove ugly hack
      
      * Fix distributed test
      
      * Use float for number of epochs
      573bdb0a
  3. 18 Aug, 2020 1 commit
  4. 12 Aug, 2020 1 commit
    • Sylvain Gugger's avatar
      Adding PaddingDataCollator (#6442) · d2370e1b
      Sylvain Gugger authored
      * Data collator with padding
      
      * Add type annotation
      
      * Support tensors as well
      
      * Add comment
      
      * Fix for labels wrong shape
      
      * Data collator with padding
      
      * Add type annotation
      
      * Support tensors as well
      
      * Add comment
      
      * Fix for labels wrong shape
      
      * Remove changes rendered unnecessary
      d2370e1b
  5. 11 Aug, 2020 1 commit
    • guillaume-be's avatar
      [Performance improvement] "Bad tokens ids" optimization (#6064) · 40478291
      guillaume-be authored
      * Optimized banned token masking
      
      * Avoid duplicate EOS masking if in bad_words_id
      
      * Updated mask generation to handle empty banned token list
      
      * Addition of unit tests for the updated bad_words_ids masking
      
      * Updated timeout handling in `test_postprocess_next_token_scores_large_bad_words_list` unit test
      
      * Updated timeout handling in `test_postprocess_next_token_scores_large_bad_words_list` unit test (timeout does not work on Windows)
      
      * Moving Marian import to the test context to allow TF only environments to run
      
      * Moving imports to torch_available test
      
      * Updated operations device and test
      
      * Updated operations device and test
      
      * Added docstring and comment for in-place scores modification
      
      * Moving test to own test_generation_utils, use of lighter models for testing
      
      * removed unneded imports in test_modeling_common
      
      * revert formatting change for ModelTesterMixin
      
      * Updated caching, simplified eos token id test, removed unnecessary @require_torch
      
      * formatting compliance
      40478291
  6. 03 Aug, 2020 2 commits
  7. 28 Jul, 2020 2 commits
  8. 22 Jul, 2020 1 commit
  9. 20 Jul, 2020 1 commit
  10. 10 Jul, 2020 1 commit
  11. 09 Jul, 2020 1 commit
  12. 07 Jul, 2020 2 commits
    • Suraj Patil's avatar
      [examples] Add trainer support for question-answering (#4829) · e49393c3
      Suraj Patil authored
      
      
      * add SquadDataset
      
      * add DataCollatorForQuestionAnswering
      
      * update __init__
      
      * add run_squad with  trainer
      
      * add DataCollatorForQuestionAnswering in __init__
      
      * pass data_collator to trainer
      
      * doc tweak
      
      * Update run_squad_trainer.py
      
      * Update __init__.py
      
      * Update __init__.py
      Co-authored-by: default avatarJulien Chaumond <chaumond@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      e49393c3
    • Shashank Gupta's avatar
      Added data collator for permutation (XLNet) language modeling and related calls (#5522) · 3dcb748e
      Shashank Gupta authored
      * Added data collator for XLNet language modeling and related calls
      
      Added DataCollatorForXLNetLanguageModeling in data/data_collator.py
      to generate necessary inputs for language modeling training with
      XLNetLMHeadModel. Also added related arguments, logic and calls in
      examples/language-modeling/run_language_modeling.py.
      
      Resolves: #4739, #2008 (partially)
      
      * Changed name to `DataCollatorForPermutationLanguageModeling`
      
      Changed the name of `DataCollatorForXLNetLanguageModeling` to the more general `DataCollatorForPermutationLanguageModelling`.
      Removed the `--mlm` flag requirement for the new collator and defined a separate `--plm_probability` flag for its use.
      CTRL uses a CLM loss just like GPT and GPT-2, so should work out of the box with this script (provided `past` is taken care of
      similar to `mems` for XLNet).
      Changed calls and imports appropriately.
      
      * Added detailed comments, changed variable names
      
      Added more detailed comments to `DataCollatorForPermutationLanguageModeling` in `data/data_collator.py` to explain working. Also cleaned up variable names and made them more informative.
      
      * Added tests for new data collator
      
      Added tests in `tests/test_trainer.py` for DataCollatorForPermutationLanguageModeling based on those in DataCollatorForLanguageModeling. A specific test has been added to check for odd-length sequences.
      
      * Fixed styling issues
      3dcb748e
  13. 01 Jul, 2020 1 commit
  14. 30 Jun, 2020 1 commit
    • Julien Plu's avatar
      Fix TensorFlow dataset generator (#4881) · fcf06524
      Julien Plu authored
      * fix TensorFlow generator
      
      * Better features handling
      
      * Apply style
      
      * Apply style
      
      * Fix squad as well
      
      * Apply style
      
      * Better factorization of TF Tensors creation
      fcf06524
  15. 26 Jun, 2020 1 commit
  16. 25 Jun, 2020 1 commit
  17. 24 Jun, 2020 1 commit
  18. 19 Jun, 2020 1 commit
  19. 18 Jun, 2020 1 commit
  20. 17 Jun, 2020 1 commit
  21. 16 Jun, 2020 1 commit
  22. 15 Jun, 2020 1 commit
  23. 05 Jun, 2020 1 commit
  24. 04 Jun, 2020 1 commit
    • Julien Plu's avatar
      Tensorflow improvements (#4530) · f9414f75
      Julien Plu authored
      
      
      * Better None gradients handling
      
      * Apply Style
      
      * Apply Style
      
      * Create a loss class per task to compute its respective loss
      
      * Add loss classes to the ALBERT TF models
      
      * Add loss classes to the BERT TF models
      
      * Add question answering and multiple choice to TF Camembert
      
      * Remove prints
      
      * Add multiple choice model to TF DistilBERT + loss computation
      
      * Add question answering model to TF Electra + loss computation
      
      * Add token classification, question answering and multiple choice models to TF Flaubert
      
      * Add multiple choice model to TF Roberta + loss computation
      
      * Add multiple choice model to TF XLM + loss computation
      
      * Add multiple choice and question answering models to TF XLM-Roberta
      
      * Add multiple choice model to TF XLNet + loss computation
      
      * Remove unused parameters
      
      * Add task loss classes
      
      * Reorder TF imports + add new model classes
      
      * Add new model classes
      
      * Bugfix in TF T5 model
      
      * Bugfix for TF T5 tests
      
      * Bugfix in TF T5 model
      
      * Fix TF T5 model tests
      
      * Fix T5 tests + some renaming
      
      * Fix inheritance issue in the AutoX tests
      
      * Add tests for TF Flaubert and TF XLM Roberta
      
      * Add tests for TF Flaubert and TF XLM Roberta
      
      * Remove unused piece of code in the TF trainer
      
      * bugfix and remove unused code
      
      * Bugfix for TF 2.2
      
      * Apply Style
      
      * Divide TFSequenceClassificationAndMultipleChoiceLoss into their two respective name
      
      * Apply style
      
      * Mirror the PT Trainer in the TF one: fp16, optimizers and tb_writer as class parameter and better dataset handling
      
      * Fix TF optimizations tests and apply style
      
      * Remove useless parameter
      
      * Bugfix and apply style
      
      * Fix TF Trainer prediction
      
      * Now the TF models return the loss such as their PyTorch couterparts
      
      * Apply Style
      
      * Ignore some tests output
      
      * Take into account the SQuAD cls_index, p_mask and is_impossible parameters for the QuestionAnswering task models.
      
      * Fix names for SQuAD data
      
      * Apply Style
      
      * Fix conflicts with 2.11 release
      
      * Fix conflicts with 2.11
      
      * Fix wrongname
      
      * Add better documentation on the new create_optimizer function
      
      * Fix isort
      
      * logging_dir: use same default as PyTorch
      Co-authored-by: default avatarJulien Chaumond <chaumond@gmail.com>
      f9414f75
  25. 02 Jun, 2020 1 commit
  26. 29 May, 2020 1 commit
  27. 21 May, 2020 1 commit
  28. 14 May, 2020 3 commits
  29. 08 May, 2020 1 commit
  30. 23 Apr, 2020 1 commit
  31. 22 Apr, 2020 1 commit
    • Julien Chaumond's avatar
      Trainer (#3800) · dd9d483d
      Julien Chaumond authored
      * doc
      
      * [tests] Add sample files for a regression task
      
      * [HUGE] Trainer
      
      * Feedback from @sshleifer
      
      * Feedback from @thomwolf + logging tweak
      
      * [file_utils] when downloading concurrently, get_from_cache will use the cached file for subsequent processes
      
      * [glue] Use default max_seq_length of 128 like before
      
      * [glue] move DataTrainingArguments around
      
      * [ner] Change interface of InputExample, and align run_{tf,pl}
      
      * Re-align the pl scripts a little bit
      
      * ner
      
      * [ner] Add integration test
      
      * Fix language_modeling with API tweak
      
      * [ci] Tweak loss target
      
      * Don't break console output
      
      * amp.initialize: model must be on right device before
      
      * [multiple-choice] update for Trainer
      
      * Re-align to 827d6d6e
      dd9d483d
  32. 20 Apr, 2020 2 commits
  33. 10 Apr, 2020 1 commit