Manuel Romero
0c55a384f8
Add reference to NLP dataset ( #5028 )
...
* Add reference to NLP dataset
* Update README.md
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
2020-06-16 04:19:09 -04:00
Manuel Romero
0946d1209d
Add reference to NLP (package) dataset ( #5029 )
...
* Add reference to NLP (package) dataset
* Update README.md
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
2020-06-16 04:17:46 -04:00
Boris Dayma
edcb3ac59a
refactor(wandb): consolidate import ( #5044 )
2020-06-16 03:40:43 -04:00
Funtowicz Morgan
9e03364999
Ability to pickle/unpickle BatchEncoding pickle (reimport) ( #5039 )
...
* Added is_fast property on BatchEncoding to indicate if the object comes from a Fast Tokenizer.
* Added __get_state__() & __set_state__() to be pickable.
* Correct tokens() return type from List[int] to List[str]
* Added unittest for BatchEncoding pickle/unpickle
* Added unittest for BatchEncoding is_fast
* More careful checking on BatchEncoding unpickle tests.
* Formatting.
* is_fast should assertTrue on Rust tokenizers.
* Ensure tensorflow has correct way of checking array_equal
* More formatting.
2020-06-16 09:25:25 +02:00
Sylvain Gugger
f9f8a5312e
Add DistilBertForMultipleChoice ( #5032 )
...
* Add `DistilBertForMultipleChoice`
2020-06-15 18:31:41 -04:00
Anthony MOI
36434220fc
[HUGE] Refactoring tokenizers backend - padding - truncation - pre-tokenized pipeline - fast tokenizers - tests ( #4510 )
...
* Use tokenizers pre-tokenized pipeline
* failing pretrokenized test
* Fix is_pretokenized in python
* add pretokenized tests
* style and quality
* better tests for batched pretokenized inputs
* tokenizers clean up - new padding_strategy - split the files
* [HUGE] refactoring tokenizers - padding - truncation - tests
* style and quality
* bump up requied tokenizers version to 0.8.0-rc1
* switched padding/truncation API - simpler better backward compat
* updating tests for custom tokenizers
* style and quality - tests on pad
* fix QA pipeline
* fix backward compatibility for max_length only
* style and quality
* Various cleans up - add verbose
* fix tests
* update docstrings
* Fix tests
* Docs reformatted
* __call__ method documented
Co-authored-by: Thomas Wolf <thomwolf@users.noreply.github.com>
Co-authored-by: Lysandre <lysandre.debut@reseau.eseo.fr>
2020-06-15 17:12:51 -04:00
Patrick von Platen
ebba39e4e1
[Bart] Question Answering Model is added to tests ( #5024 )
...
* fix test
* Update tests/test_modeling_common.py
* Update tests/test_modeling_common.py
2020-06-15 22:50:09 +02:00
Sylvain Gugger
bbad4c6989
Add position_ids ( #5021 )
2020-06-15 15:50:17 -04:00
Boris Dayma
1bf4098e03
feat(TFTrainer): improve logging ( #4946 )
...
* feat(tftrainer): improve logging
* fix(trainer): consider case with evaluation only
* refactor(tftrainer): address comments
* refactor(tftrainer): move self.epoch_logging to __init__
2020-06-15 14:06:17 -04:00
Funtowicz Morgan
7b5a1e7d51
Fix importing transformers on Windows ( #4997 )
2020-06-15 19:36:57 +02:00
Sam Shleifer
a9f1fc6c94
Add bart-base ( #5014 )
2020-06-15 13:29:26 -04:00
Funtowicz Morgan
7b685f5229
Increase pipeline support for ONNX export. ( #5005 )
...
* Increase pipeline support for ONNX export.
* Style.
2020-06-15 19:13:58 +02:00
Sylvain Gugger
1affde2f10
Make DataCollator a callable ( #5015 )
...
* Make DataCollator a callable
* Update src/transformers/data/data_collator.py
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
2020-06-15 11:58:33 -04:00
Bram Vanroy
f7c93b3cee
Possible fix to make AMP work with DDP in the trainer ( #4728 )
...
* manually set device in trainer args
* check if current device is cuda before set_device
* Explicitly set GPU ID when using single GPU
This addresses https://github.com/huggingface/transformers/issues/4657#issuecomment-642228099
2020-06-15 10:10:26 -04:00
ipuneetrathore
66bcfbb130
Create README.md ( #4975 )
...
* Create README.md
* Update model_cards/ipuneetrathore/bert-base-cased-finetuned-finBERT/README.md
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
2020-06-15 08:43:50 -04:00
Stefan Schweter
d812e6d76e
NER: fix construction of input examples for RoBERTa ( #4943 )
...
* utils_ner: do not add extra sep token for RoBERTa model
* run_pl_ner: do not add extra sep token for RoBERTa model
2020-06-15 08:30:40 -04:00
Suraj Patil
ebab096e86
[model card] model card for bart-large-finetuned-squadv1 ( #4977 )
...
* [model card] model card for bart-large-finetuned-squadv1
* add metadata link to the dataset
2020-06-15 05:39:41 -04:00
Funtowicz Morgan
9ad36ad57f
Improve ONNX logging ( #4999 )
...
* Improve ONNX export logging to give more information about the generated graph.
* Correctly handle input and output in the logging.
2020-06-15 11:04:51 +02:00
ZhuBaohe
9931f817b7
fix ( #4976 )
2020-06-14 21:36:14 +02:00
Suraj Patil
9208f57b16
BartTokenizerFast ( #4878 )
2020-06-14 13:04:49 -04:00
Sylvain Gugger
403d309857
Hans data ( #4854 )
...
* Update hans data to be able to use Trainer
* Fixes
* Deal with tokenizer that don't have token_ids
* Clean up things
* Simplify data use
* Fix the input dict
* Formatting + proper path in README
2020-06-13 09:35:13 -04:00
Julien Chaumond
ca5e1cdf8e
model_cards: we can now tag datasets
...
see corresponding model pages to see how it's rendered
2020-06-12 23:19:07 +02:00
Suraj Patil
e93ccb3290
BartForQuestionAnswering ( #4908 )
2020-06-12 15:47:57 -04:00
Sylvain Gugger
538531cde5
Add AlbertForMultipleChoice ( #4959 )
...
* Add AlbertForMultipleChoice
* Make up to date and add all models to common tests
2020-06-12 14:20:19 -04:00
Manuel Romero
fe24139702
Create README.md ( #4865 )
2020-06-12 09:03:43 -04:00
Yannis Papanikolaou
9aa219a1fe
Create README.md ( #4872 )
2020-06-12 09:03:13 -04:00
Patrick von Platen
86578bb04c
[AutoModel] Split AutoModelWithLMHead into clm, mlm, encoder-decoder ( #4933 )
...
* first commit
* add new auto models
* better naming
* fix bert automodel
* fix automodel for pretraining
* add models to init
* fix name typo
* fix typo
* better naming
* future warning instead of depreciation warning
2020-06-12 10:01:49 +02:00
Sam Shleifer
5620033115
[mbart] Fix fp16 testing logic ( #4949 )
2020-06-11 22:11:34 -04:00
VictorSanh
473808da0d
update `mvmt-pruning/saving_prunebert` (updating torch to 1.5)
2020-06-11 19:42:45 +00:00
Patrick von Platen
caf3746678
fix indentation issue ( #4941 )
2020-06-11 21:28:01 +02:00
Suraj Patil
6293eb04df
[Model card] model card for electra-base QA model ( #4936 )
2020-06-11 13:16:34 -04:00
Sam Shleifer
08b59d10e5
MBartTokenizer:add language codes ( #3776 )
2020-06-11 13:02:33 -04:00
Sylvain Gugger
20451195f0
Support multiple choice in tf common model tests ( #4920 )
...
* Support multiple choice in tf common model tests
* Add the input_embeds test
2020-06-11 10:31:26 -04:00
Setu Shah
699541c4b3
TFTrainer: Add dataloader_drop_last ( #4925 )
2020-06-11 02:11:22 -04:00
RafaelWO
e80d6c689b
Fix resize_token_embeddings for Transformer-XL ( #4759 )
...
* Fixed resize_token_embeddings for transfo_xl model
* Fixed resize_token_embeddings for transfo_xl.
Added custom methods to TransfoXLPreTrainedModel for resizing layers of
the AdaptiveEmbedding.
* Updated docstring
* Fixed resizinhg cutoffs; added check for new size of embedding layer.
* Added test for resize_token_embeddings
* Fixed code quality
* Fixed unchanged cutoffs in model.config
Co-authored-by: Rafael Weingartner <rweingartner.its-b2015@fh-salzburg.ac.at>
2020-06-10 19:03:06 -04:00
Sylvain Gugger
d541938c48
Make multiple choice models work with input_embeds ( #4921 )
2020-06-10 18:38:34 -04:00
Sylvain Gugger
1e2631d6f8
Split LMBert model in two ( #4874 )
...
* Split LMBert model in two
* Fix example
* Remove lm_labels
* Adapt tests, refactor prepare_for_generation
* Fix merge
* Hide BeartLMHeadModel
2020-06-10 18:26:42 -04:00
Matthew Goldey
f6da8b2200
check type before logging in trainer to ensure values are scalars ( #4883 )
...
* check type before logging to ensure it's a scalar
* log when Trainer attempts to add a non-scalar value using TensorboardX's writer.add_scalar so we know what kinds of fixes are appropriate
* black it
* rephrase log message to clarify attribute was dropped
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
2020-06-10 18:25:55 -04:00
Yannis Papanikolaou
1c986f42ff
Create README.md ( #4871 )
2020-06-10 17:29:41 -04:00
Lysandre Debut
3ae2e86baf
Run a single wandb instance per TPU run ( #4851 )
...
* Run a single wandb instance per TPU run
* wandb: self.is_world_master
* make style
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
2020-06-10 16:28:18 -04:00
Lysandre Debut
466aa57a45
Don't init TPU device twice ( #4916 )
2020-06-10 15:53:15 -04:00
Suraj Patil
ef2dcdccaa
ElectraForQuestionAnswering ( #4913 )
...
* ElectraForQuestionAnswering
* udate __init__
* add test for electra qa model
* add ElectraForQuestionAnswering in auto models
* add ElectraForQuestionAnswering in all_model_classes
* fix outputs, input_ids defaults to None
* add ElectraForQuestionAnswering in docs
* remove commented line
2020-06-10 15:17:52 -04:00
Amil Khare
5d63ca6c38
[ctrl] fix pruning of MultiHeadAttention ( #4904 )
2020-06-10 14:06:55 -04:00
Sylvain Gugger
4e10acb3e5
Add more models to common tests ( #4910 )
2020-06-10 13:19:53 -04:00
Patrick von Platen
3b3619a327
[All models] fix docs after adding output attentions to all forward functions ( #4909 )
...
* fix doc
* add format file
* add output attentions to all docs
* add also for bart
* fix naming
* re-add doc to config
2020-06-10 18:10:59 +02:00
Sylvain Gugger
ac99217e92
Fix the CI ( #4903 )
...
* Fix CI
2020-06-10 09:26:06 -04:00
Sylvain Gugger
0a375f5abd
Deal with multiple choice in common tests ( #4886 )
...
* Deal with multiple choice in common tests
2020-06-10 08:10:20 -04:00
Sylvain Gugger
e8db8b845a
Remove unused arguments in Multiple Choice example ( #4853 )
...
* Remove unused arguments
* Formatting
* Remove second todo comment
2020-06-09 20:05:09 -04:00
songyouwei
29c36e9f36
run_pplm.py bug fix ( #4867 )
...
`is_leaf` may become `False` after `.to(device=device)` function call.
2020-06-09 19:14:27 -04:00
Lysandre
13aa174112
uninstalled wandb raises AttributeError
2020-06-09 18:50:56 -04:00