1. 10 Jun, 2020 3 commits
  2. 09 Jun, 2020 2 commits
    • Bharat Raghunathan's avatar
      [All models] Extend config.output_attentions with output_attentions function arguments (#4538) · 6e603cb7
      Bharat Raghunathan authored
      
      
      * DOC: Replace instances of ``config.output_attentions`` with function argument ``output_attentions``
      
      * DOC: Apply Black Formatting
      
      * Fix errors where output_attentions was undefined
      
      * Remove output_attentions in classes per review
      
      * Fix regressions on tests having `output_attention`
      
      * Fix further regressions in tests relating to `output_attentions`
      
      Ensure proper propagation of `output_attentions` as a function parameter
      to all model subclasses
      
      * Fix more regressions in `test_output_attentions`
      
      * Fix issues with BertEncoder
      
      * Rename related variables to `output_attentions`
      
      * fix pytorch tests
      
      * fix bert and gpt2 tf
      
      * Fix most TF tests for `test_output_attentions`
      
      * Fix linter errors and more TF tests
      
      * fix conflicts
      
      * DOC: Apply Black Formatting
      
      * Fix errors where output_attentions was undefined
      
      * Remove output_attentions in classes per review
      
      * Fix regressions on tests having `output_attention`
      
      * fix conflicts
      
      * fix conflicts
      
      * fix conflicts
      
      * fix conflicts
      
      * fix pytorch tests
      
      * fix conflicts
      
      * fix conflicts
      
      * Fix linter errors and more TF tests
      
      * fix tf tests
      
      * make style
      
      * fix isort
      
      * improve output_attentions
      
      * improve tensorflow
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      6e603cb7
    • Patrick von Platen's avatar
      [Benchmark] add tpu and torchscipt for benchmark (#4850) · 2cfb947f
      Patrick von Platen authored
      
      
      * add tpu and torchscipt for benchmark
      
      * fix name in tests
      
      * "fix email"
      
      * make style
      
      * better log message for tpu
      
      * add more print and info for tpu
      
      * allow possibility to print tpu metrics
      
      * correct cpu usage
      
      * fix test for non-install
      
      * remove bugus file
      
      * include psutil in testing
      
      * run a couple of times before tracing in torchscript
      
      * do not allow tpu memory tracing for now
      
      * make style
      
      * add torchscript to env
      
      * better name for torch tpu
      Co-authored-by: default avatarPatrick von Platen <patrick@huggingface.co>
      2cfb947f
  3. 08 Jun, 2020 1 commit
  4. 06 Jun, 2020 1 commit
  5. 05 Jun, 2020 4 commits
  6. 04 Jun, 2020 2 commits
    • 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
    • Funtowicz Morgan's avatar
      Introduce a new tensor type for return_tensors on tokenizer for NumPy (#4585) · 5bf9afbf
      Funtowicz Morgan authored
      * Refactor tensor creation in tokenizers.
      
      * Make sure to convert string to TensorType
      
      * Refactor convert_to_tensors_
      
      * Introduce numpy tensor creation
      
      * Format
      
      * Add unittest for TensorType creation from str
      
      * sorting imports
      
      * Added unittests for numpy tensor conversion.
      
      * Do not use in-place version for squeeze as numpy doesn't provide such feature.
      
      * Added extra parameter prepend_batch_axis: bool on prepare_for_model.
      
      * Ensure test_np_encode_plus_sent_to_model is not executed if encoder/decoder model.
      
      * style.
      
      * numpy tests require_torch for now while flax not merged.
      
      * Hopefully will make flake8 happy.
      
      * One more time 馃幎
      5bf9afbf
  7. 03 Jun, 2020 1 commit
  8. 02 Jun, 2020 4 commits
  9. 01 Jun, 2020 1 commit
    • Rens's avatar
      Fix onnx export input names order (#4641) · ec62b7d9
      Rens authored
      * pass on tokenizer to pipeline
      
      * order input names when convert to onnx
      
      * update style
      
      * remove unused imports
      
      * make ordered inputs list needs to be mutable
      
      * add test custom bert model
      
      * remove unused imports
      ec62b7d9
  10. 29 May, 2020 3 commits
  11. 28 May, 2020 2 commits
  12. 27 May, 2020 3 commits
    • Patrick von Platen's avatar
      [Benchmark] Memory benchmark utils (#4198) · 96f57c9c
      Patrick von Platen authored
      
      
      * improve memory benchmarking
      
      * correct typo
      
      * fix current memory
      
      * check torch memory allocated
      
      * better pytorch function
      
      * add total cached gpu memory
      
      * add total gpu required
      
      * improve torch gpu usage
      
      * update memory usage
      
      * finalize memory tracing
      
      * save intermediate benchmark class
      
      * fix conflict
      
      * improve benchmark
      
      * improve benchmark
      
      * finalize
      
      * make style
      
      * improve benchmarking
      
      * correct typo
      
      * make train function more flexible
      
      * fix csv save
      
      * better repr of bytes
      
      * better print
      
      * fix __repr__ bug
      
      * finish plot script
      
      * rename plot file
      
      * delete csv and small improvements
      
      * fix in plot
      
      * fix in plot
      
      * correct usage of timeit
      
      * remove redundant line
      
      * remove redundant line
      
      * fix bug
      
      * add hf parser tests
      
      * add versioning and platform info
      
      * make style
      
      * add gpu information
      
      * ensure backward compatibility
      
      * finish adding all tests
      
      * Update src/transformers/benchmark/benchmark_args.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Update src/transformers/benchmark/benchmark_args_utils.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * delete csv files
      
      * fix isort ordering
      
      * add out of memory handling
      
      * add better train memory handling
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      96f57c9c
    • Suraj Patil's avatar
      LongformerForSequenceClassification (#4580) · ec4cdfdd
      Suraj Patil authored
      
      
      * LongformerForSequenceClassification
      
      * better naming x=>hidden_states, fix typo in doc
      
      * Update src/transformers/modeling_longformer.py
      
      * Update src/transformers/modeling_longformer.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      ec4cdfdd
    • Sam Shleifer's avatar
  13. 25 May, 2020 2 commits
    • Sam Shleifer's avatar
      b86e42e0
    • Suraj Patil's avatar
      Longformer for question answering (#4500) · 03d8527d
      Suraj Patil authored
      * added LongformerForQuestionAnswering
      
      * add LongformerForQuestionAnswering
      
      * fix import for LongformerForMaskedLM
      
      * add LongformerForQuestionAnswering
      
      * hardcoded sep_token_id
      
      * compute attention_mask if not provided
      
      * combine global_attention_mask with attention_mask when provided
      
      * update example in  docstring
      
      * add assert error messages, better attention combine
      
      * add test for longformerForQuestionAnswering
      
      * typo
      
      * cast gloabl_attention_mask to long
      
      * make style
      
      * Update src/transformers/configuration_longformer.py
      
      * Update src/transformers/configuration_longformer.py
      
      * fix the code quality
      
      * Merge branch 'longformer-for-question-answering' of https://github.com/patil-suraj/transformers
      
       into longformer-for-question-answering
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      03d8527d
  14. 22 May, 2020 2 commits
  15. 21 May, 2020 1 commit
  16. 20 May, 2020 3 commits
  17. 19 May, 2020 5 commits