Sylvain Gugger
cdc48ce92d
Finalize lm examples ( #8188 )
...
* Finish the cleanup of the language-modeling examples
* Update main README
* Apply suggestions from code review
Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
* Apply suggestions from code review
Co-authored-by: Thomas Wolf <thomwolf@users.noreply.github.com>
* Propagate changes
Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
Co-authored-by: Thomas Wolf <thomwolf@users.noreply.github.com>
2020-10-30 14:20:18 -04:00
wlhgtc
9a21b50614
Fix eval ref miss in Chinese WWM. ( #8115 )
...
* ADD: add whole word mask proxy for both eng and chinese
* MOD: adjust format
* MOD: reformat code
* MOD: update import
* MOD: fix bug
* MOD: add import
* MOD: fix bug
* MOD: decouple code and update readme
* MOD: reformat code
* Update examples/language-modeling/README.md
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update examples/language-modeling/README.md
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update examples/language-modeling/run_language_modeling.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update examples/language-modeling/run_language_modeling.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update examples/language-modeling/run_language_modeling.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update examples/language-modeling/run_language_modeling.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* change wwm to whole_word_mask
* reformat code
* reformat
* format
* Code quality
* ADD: update chinese ref readme
* MOD: small changes
* MOD: small changes2
* update readme
* fix eval ref file miss bug
* format file
* MOD: move ref code to contrib
* MOD: add delimeter check
* reformat code
* refomat code
* Update examples/language-modeling/README.md
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <sylvain.gugger@gmail.com>
Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
2020-10-29 17:08:39 -04:00
RafaelWO
709745927b
Transformer-XL: Remove unused parameters ( #7087 )
...
* Removed 'tgt_len' and 'ext_len' from Transfomer-XL
* Some changes are still to be done
* Removed 'tgt_len' and 'ext_len' from Transfomer-XL (2)
* Removed comments
* Fixed quality
* Changed warning to info
2020-09-17 06:10:34 -04:00
Stas Bekman
b0cbcdb05b
[logging] remove no longer needed verbosity override ( #7100 )
2020-09-15 04:01:14 -04:00
Lysandre
a75c64d80c
Black 20 release
2020-08-26 17:20:22 +02:00
Sam Shleifer
45e26125de
save_pretrained: mkdir(exist_ok=True) ( #5258 )
...
* all save_pretrained methods mkdir if not os.path.exists
2020-06-28 14:53:47 -04:00
Julien Chaumond
d4c2cb402d
Kill model archive maps ( #4636 )
...
* Kill model archive maps
* Fixup
* Also kill model_archive_map for MaskedBertPreTrainedModel
* Unhook config_archive_map
* Tokenizers: align with model id changes
* make style && make quality
* Fix CI
2020-06-02 09:39:33 -04:00
Patrick von Platen
aa925a52fa
[Tests, GPU, SLOW] fix a bunch of GPU hardcoded tests in Pytorch ( #4468 )
...
* fix gpu slow tests in pytorch
* change model to device syntax
2020-05-19 21:35:04 +02:00
Julien Chaumond
0ae96ff8a7
BIG Reorganize examples ( #4213 )
...
* Created using Colaboratory
* [examples] reorganize files
* remove run_tpu_glue.py as superseded by TPU support in Trainer
* Bugfix: int, not tuple
* move files around
2020-05-07 13:48:44 -04:00
Julien Chaumond
cf72479bf1
One last reorder of {scheduler,optimizer}.step()
2020-03-20 18:05:50 -04:00
Victor SANH
6b1ff25084
fix n_gpu count when no_cuda flag is activated ( #3077 )
...
* fix n_gpu count when no_cuda flag is activated
* someone was left behind
2020-03-02 10:20:21 -05:00
Lysandre
3bf5417258
Revert erroneous fix
2020-02-04 16:31:07 -05:00
Lysandre
239dd23f64
[Follow up 213]
...
Masked indices should have -1 and not -100. Updating documentation + scripts that were forgotten
2020-02-03 16:08:05 -05:00
alberduris
81d6841b4b
GPU text generation: mMoved the encoded_prompt to correct device
2020-01-06 15:11:12 +01:00
alberduris
dd4df80f0b
Moved the encoded_prompts to correct device
2020-01-06 15:11:12 +01:00
Aymeric Augustin
81422c4e6d
Remove unused variables in examples.
2019-12-23 22:29:02 +01:00
Aymeric Augustin
d6eaf4e6d2
Update comments mentioning Python 2.
2019-12-22 18:38:56 +01:00
Aymeric Augustin
798b3b3899
Remove sys.version_info[0] == 2 or 3.
2019-12-22 18:38:42 +01:00
Aymeric Augustin
c824d15aa1
Remove __future__ imports.
2019-12-22 17:47:54 +01:00
Aymeric Augustin
80327a13ea
Fix F401 flake8 warning (x152 / 268).
...
This change is mostly autogenerated with:
$ python -m autoflake --in-place --recursive examples templates transformers utils hubconf.py setup.py
I made minor changes in the generated diff.
2019-12-22 10:59:08 +01:00
Aymeric Augustin
fa2ccbc081
Fix E266 flake8 warning (x90).
2019-12-22 10:59:08 +01:00
Aymeric Augustin
2ab78325f0
Fix F821 flake8 warning (x47).
...
Ignore warnings related to Python 2, because it's going away soon.
2019-12-22 10:59:07 +01:00
Aymeric Augustin
631be27078
Fix E722 flake8 warnings (x26).
2019-12-22 10:59:07 +01:00
Aymeric Augustin
b0f7db73cd
Fix E741 flake8 warning (x14).
2019-12-22 10:59:07 +01:00
Aymeric Augustin
5eab3cf6bc
Fix W605 flake8 warning (x5).
2019-12-22 10:59:07 +01:00
Aymeric Augustin
f9c5317db2
Fix E265 flake8 warning (x1).
2019-12-22 10:59:07 +01:00
Aymeric Augustin
158e82e061
Sort imports with isort.
...
This is the result of:
$ isort --recursive examples templates transformers utils hubconf.py setup.py
2019-12-22 10:57:46 +01:00
Aymeric Augustin
fa84ae26d6
Reformat source code with black.
...
This is the result of:
$ black --line-length 119 examples templates transformers utils hubconf.py setup.py
There's a lot of fairly long lines in the project. As a consequence, I'm
picking the longest widely accepted line length, 119 characters.
This is also Thomas' preference, because it allows for explicit variable
names, to make the code easier to understand.
2019-12-21 17:52:29 +01:00
thomwolf
dc667ce1a7
double check cc @LysandreJik
2019-12-14 09:56:27 +01:00
Julien Chaumond
26858f27cb
[camembert] Upload to s3 + rename script
2019-11-16 00:11:07 -05:00
Louis MARTIN
3e20c2e871
Update demo_camembert.py with new classes
2019-11-16 00:11:07 -05:00
Louis MARTIN
f12e4d8da7
Move demo_camembert.py to examples/contrib
2019-11-16 00:11:07 -05:00
Rémi Louf
2276bf69b7
update the examples, docs and template
2019-11-14 20:38:02 +01:00
Julien Chaumond
30968d70af
misc doc
2019-11-05 19:06:12 -05:00
Bilal Khan
5ce8d29abe
Change tensorboard imports to use built-in tensorboard if available
2019-10-08 16:29:43 -05:00
thomwolf
31c23bd5ee
[BIG] pytorch-transformers => transformers
2019-09-26 10:15:53 +02:00
erenup
15143fbad6
move run_multiple_choice.py and utils_multiple_choice.py to examples
2019-09-18 21:18:46 +08:00
erenup
3cd6289758
Merge remote-tracking branch 'huggingface/master' into run_multiple_choice_merge
...
# Conflicts:
# examples/contrib/run_swag.py
2019-09-18 21:16:59 +08:00
thomwolf
e768f2322a
update run_openai_gpt to fix #1264
2019-09-18 10:07:47 +02:00
thomwolf
8334993915
clean up examples - updated to new keyword inputs - #1246
2019-09-18 10:01:27 +02:00