Patrick von Platen
ae6834e028
[Examples] Clean summarization and translation example testing files for T5 and Bart ( #3514 )
...
* fix conflicts
* add model size argument to summarization
* correct wrong import
* fix isort
* correct imports
* other isort make style
* make style
2020-03-31 17:54:13 +02:00
Sam Shleifer
8deff3acf2
[bart-tiny-random] Put a 5MB model on S3 to allow faster exampl… ( #3488 )
2020-03-30 12:28:27 -04:00
Sam Shleifer
33ef7002e1
[Docs] examples/summarization/bart: Simplify CNN/DM preprocessi… ( #3516 )
2020-03-29 13:25:42 -04:00
Patrick von Platen
17dceae7a1
Fix circle ci flaky fail of wmt example ( #3485 )
...
* force bleu
* fix wrong file name
* rename file
* different filenames for each example test
* test files should clean up after themselves
* test files should clean up after themselves
* do not force bleu
* correct typo
* fix isort
2020-03-27 13:01:28 -04:00
Patrick von Platen
f4f4946836
Rename t5-large
to t5-base
in README.md
2020-03-27 15:57:58 +01:00
Lysandre Debut
ff80b73157
Add option to choose T5 model size. ( #3480 )
...
T5-small in test
isort
2020-03-27 15:56:59 +01:00
Patrick von Platen
e703e923ca
Add t5 summarization example ( #3411 )
...
* rebase to master
* change tf to pytorch
* change to pytorch
* small fix
* renaming
* add gpu training possibility
* renaming
* improve README
* incoorporate collins feedback
* better Readme
* better README.md
2020-03-26 18:17:55 +01:00
Andre Carrera
3d76df3a12
BART for summarization training with CNN/DM using pytorch-lightning
2020-03-24 21:00:24 -04:00
Julien Chaumond
f7dcf8fcea
[BertAbs] Move files around for more consistent naming
2020-03-23 13:58:49 -04:00
Patrick von Platen
95e00d0808
Clean special token init in modeling_....py ( #3264 )
...
* make style
* fix conflicts
2020-03-20 21:41:04 +01:00
Patrick von Platen
e8f44af5bf
[generate] do_sample default back to False ( #3298 )
...
* change do_samples back
* None better default as boolean
* adapt do_sample to True in test example
* make style
2020-03-17 10:52:37 -04:00
Sam Shleifer
5ea8ba67b4
[BART] Remove unused kwargs ( #3279 )
...
* Remove unused kwargs
* dont call forward in tests
2020-03-15 23:00:44 -04:00
Patrick von Platen
4f75d380a4
make style
2020-03-13 16:35:52 +01:00
Patrick von Platen
c2ee3840ae
update file to new starting token logic
2020-03-13 16:34:44 +01:00
Sam Shleifer
2e81b9d8d7
Bart: update example for #3140 compatibility ( #3233 )
...
* Update bart example docs
2020-03-12 10:36:37 -04:00
Patrick von Platen
5b3000d933
renamed min_len to min_length
2020-03-11 11:06:56 +01:00
Sam Shleifer
3aca02efb3
Bart example: model.to(device) ( #3194 )
2020-03-09 15:09:35 -04:00
Sam Shleifer
857e0a0d3b
Rename BartForMaskedLM -> BartForConditionalGeneration ( #3114 )
...
* improved documentation
2020-03-05 17:41:18 -05:00
Sam Shleifer
5b396457e5
Summarization Examples: add Bart CNN Evaluation ( #3082 )
...
* Rename and improve example
* Add test
* slightly faster test
* style
* This breaks remy prolly
* shorter test string
* no slow
* newdir structure
* New tree
* Style
* shorter
* docs
* clean
* Attempt future import
* more import hax
2020-03-03 15:29:59 -05:00
Sam Shleifer
53ce3854a1
New BartModel ( #2745 )
...
* Results same as fairseq
* Wrote a ton of tests
* Struggled with api signatures
* added some docs
2020-02-20 18:11:13 -05:00
Julien Chaumond
83a41d39b3
💄 super
2020-01-15 18:33:50 -05:00
Julien Chaumond
b803b067bf
Config to Model mapping
2020-01-13 20:05:20 +00: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
Thomas Wolf
0412f3d929
Merge pull request #2291 from aaugustin/fix-flake8-F841
...
Fix F841 flake8 warning
2019-12-25 22:37:42 +01:00
Aymeric Augustin
a8d34e534e
Remove [--editable] in install instructions.
...
Use -e only in docs targeted at contributors.
If a user copy-pastes command line with [--editable], they will hit
an error. If they don't know the --editable option, we're giving them
a choice to make before they can move forwards, but this isn't a choice
they need to make right now.
2019-12-24 08:46:08 +01:00
Aymeric Augustin
81422c4e6d
Remove unused variables in examples.
2019-12-23 22:29:02 +01:00
Aymeric Augustin
c3783399db
Remove redundant requirements with transformers.
2019-12-23 19:17:27 +01:00
Aymeric Augustin
6b2200fc88
Remove u-prefixes.
2019-12-22 17:47:54 +01:00
Aymeric Augustin
7e98e211f0
Remove unittest.main() in test modules.
...
This construct isn't used anymore these days.
Running python tests/test_foo.py puts the tests/ directory on
PYTHONPATH, which isn't representative of how we run tests.
Use python -m unittest tests/test_foo.py instead.
2019-12-22 14:42:03 +01:00
Aymeric Augustin
ced0a94204
Switch test files to the standard test_*.py scheme.
2019-12-22 14:15:13 +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
fd2f17a7a1
Fix E714 flake8 warning (x8).
2019-12-22 10:59:07 +01:00
Aymeric Augustin
7dce8dc7ac
Fix E731 flake8 warning (x3).
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
7140363e09
update bertabs
2019-12-14 09:44:53 +01:00
Thomas Wolf
a52d56c8d9
Merge branch 'master' into cleanup-configs
2019-12-14 09:43:07 +01:00
Pierric Cistac
5a5c4349e8
Fix summarization to_cpu
doc
2019-12-13 10:02:33 -05:00
thomwolf
47f0e3cfb7
cleaning up configuration classes
2019-12-13 14:33:24 +01:00
Julien Chaumond
1d18930462
Harmonize no_cuda
flag with other scripts
2019-12-09 20:37:55 -05:00
Rémi Louf
f7eba09007
clean for release
2019-12-09 20:37:55 -05:00
Rémi Louf
2a64107e44
improve device usage
2019-12-09 20:37:55 -05:00
Rémi Louf
c0707a85d2
add README
2019-12-09 20:37:55 -05:00
Rémi Louf
ade3cdf5ad
integrate ROUGE
2019-12-09 20:37:55 -05:00
Rémi Louf
076602bdc4
prevent BERT weights from being downloaded twice
2019-12-09 20:37:55 -05:00
Rémi Louf
a1994a71ee
simplified model and configuration
2019-12-09 20:37:55 -05:00
Rémi Louf
3a9a9f7861
default output dir to documents dir
2019-12-09 20:37:55 -05:00
Rémi Louf
2403a66598
give transformers API to BertAbs
2019-12-09 20:37:55 -05:00