1. 05 Jun, 2020 1 commit
  2. 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
  3. 03 Jun, 2020 1 commit
  4. 02 Jun, 2020 4 commits
  5. 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
  6. 29 May, 2020 3 commits
  7. 28 May, 2020 2 commits
  8. 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
  9. 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
  10. 22 May, 2020 2 commits
  11. 21 May, 2020 1 commit
  12. 20 May, 2020 3 commits
  13. 19 May, 2020 7 commits
  14. 18 May, 2020 3 commits
  15. 17 May, 2020 1 commit
    • Lorenzo Ampil's avatar
      Allow the creation of "entity groups" for NerPipeline #3548 (#3957) · 18d233d5
      Lorenzo Ampil authored
      * Add index to be returned by NerPipeline to allow for the creation of
      
      * Add entity groups
      
      * Convert entity list to dict
      
      * Add entity to entity_group_disagg atfter updating entity gorups
      
      * Change 'group' parameter to 'grouped_entities'
      
      * Add unit tests for grouped NER pipeline case
      
      * Correct variable name typo for NER_FINETUNED_MODELS
      
      * Sync grouped tests to recent test updates
      18d233d5
  16. 14 May, 2020 3 commits
    • Funtowicz Morgan's avatar
      Conversion script to export transformers models to ONNX IR. (#4253) · db0076a9
      Funtowicz Morgan authored
      * Added generic ONNX conversion script for PyTorch model.
      
      * WIP initial TF support.
      
      * TensorFlow/Keras ONNX export working.
      
      * Print framework version info
      
      * Add possibility to check the model is correctly loading on ONNX runtime.
      
      * Remove quantization option.
      
      * Specify ONNX opset version when exporting.
      
      * Formatting.
      
      * Remove unused imports.
      
      * Make functions more generally reusable from other part of the code.
      
      * isort happy.
      
      * flake happy
      
      * Export only feature-extraction for now
      
      * Correctly check inputs order / filter before export.
      
      * Removed task variable
      
      * Fix invalid args call in load_graph_from_args.
      
      * Fix invalid args call in convert.
      
      * Fix invalid args call in infer_shapes.
      
      * Raise exception and catch in caller function instead of exit.
      
      * Add 04-onnx-export.ipynb notebook
      
      * More WIP on the notebook
      
      * Remove unused imports
      
      * Simplify & remove unused constants.
      
      * Export with constant_folding in PyTorch
      
      * Let's try to put function args in the right order this time ...
      
      * Disable external_data_format temporary
      
      * ONNX notebook draft ready.
      
      * Updated notebooks charts + wording
      
      * Correct error while exporting last chart in notebook.
      
      * Adressing @LysandreJik comment.
      
      * Set ONNX opset to 11 as default value.
      
      * Set opset param mandatory
      
      * Added ONNX export unittests
      
      * Quality.
      
      * flake8 happy
      
      * Add keras2onnx dependency on extras["tf"]
      
      * Pin keras2onnx on github master to v1.6.5
      
      * Second attempt.
      
      * Third attempt.
      
      * Use the right repo URL this time ...
      
      * Do the same for onnxconverter-common
      
      * Added keras2onnx and onnxconveter-common to 1.7.0 to supports TF2.2
      
      * Correct commit hash.
      
      * Addressing PR review: Optimization are enabled by default.
      
      * Addressing PR review: small changes in the notebook
      
      * setup.py comment about keras2onnx versioning.
      db0076a9
    • Sam Shleifer's avatar
      [tests] make pipelines tests faster with smaller models (#4238) · 7822cd38
      Sam Shleifer authored
      covers torch and tf. Also fixes a failing @slow test
      7822cd38
    • Julien Chaumond's avatar
      Fix: unpin flake8 and fix cs errors (#4367) · 448c4672
      Julien Chaumond authored
      * Fix: unpin flake8 and fix cs errors
      
      * Ok we still need to quote those
      448c4672
  17. 13 May, 2020 1 commit