Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
5759761
updated all tests
patrickvonplaten Mar 8, 2020
314bdc7
fix typo in test
patrickvonplaten Mar 8, 2020
66c8276
fix typo in test gpt2
patrickvonplaten Mar 8, 2020
b29fed7
Updated `Tokenw ise` in print statement to `Token wise`
param087 Mar 8, 2020
b4a3a64
fix xlnet & transfotests
patrickvonplaten Mar 8, 2020
fbd02d4
fixed all tests, still need to check ctrl tf and pt and xlm tf
patrickvonplaten Mar 8, 2020
4620caa
fix if use lang embeddings in tf xlm
patrickvonplaten Mar 9, 2020
b73dd1a
fix typo in test xlm tf
patrickvonplaten Mar 9, 2020
3e624c6
fix repetition penalty mask in tf
patrickvonplaten Mar 9, 2020
b12541c
test ctrl
patrickvonplaten Mar 9, 2020
efb6192
add print statement to avoid code quality problem
patrickvonplaten Mar 9, 2020
9050ffe
delete w! -> need to be more careful with vim
patrickvonplaten Mar 9, 2020
eb3e6cb
cased -> uncased in BERT SQuAD example
LysandreJik Mar 9, 2020
847d370
fix typo
patrickvonplaten Mar 9, 2020
49debe6
Merge pull request #3190 from patrickvonplaten/fix_repetition_penalty…
patrickvonplaten Mar 9, 2020
5164ea9
Skipping outputs (#3116)
LysandreJik Mar 9, 2020
3aca02e
Bart example: model.to(device) (#3194)
sshleifer Mar 9, 2020
525b6b1
TFQA pipeline marked as slow test
LysandreJik Mar 9, 2020
cbf8f5d
[model upload] Support for organizations
julien-c Mar 9, 2020
f51ba05
Model card for albert-base-v2-squad2
traviemcg Mar 9, 2020
5ca356a
NER - pl example (#3180)
shubhamagarwal92 Mar 10, 2020
31f2437
Merge pull request #3191 from patrickvonplaten/add_integration_tests_…
patrickvonplaten Mar 10, 2020
e57533c
Create README.md
mrm8488 Mar 9, 2020
6a13448
Update README.md
mrm8488 Mar 10, 2020
2661d80
Update README.md
mrm8488 Mar 10, 2020
270dfa1
[dialogpt] conversion script
julien-c Mar 10, 2020
0e56dc3
[doc] Document the new --organization flag of CLI
julien-c Mar 10, 2020
d6de642
[doc] --organization tweak
julien-c Mar 10, 2020
d8e2b3c
fix conflicts
patrickvonplaten Mar 6, 2020
c0d9dd3
refactored code a bit and made more generic
patrickvonplaten Mar 5, 2020
ff64822
fix conflicts
patrickvonplaten Mar 6, 2020
7cba11f
better naming
patrickvonplaten Mar 5, 2020
aceb3fb
only do output_past=True for language generation in bart
patrickvonplaten Mar 5, 2020
5b3000d
renamed min_len to min_length
patrickvonplaten Mar 5, 2020
7a11e92
work in progress
patrickvonplaten Mar 6, 2020
4212169
comment out stuff
patrickvonplaten Mar 6, 2020
333affc
add current changes
patrickvonplaten Mar 6, 2020
77e6775
add current changes
patrickvonplaten Mar 6, 2020
c62444d
fix conflicts
patrickvonplaten Mar 8, 2020
2acfe63
best current version and make style
patrickvonplaten Mar 6, 2020
d880a5f
finalized PR
patrickvonplaten Mar 7, 2020
629aac9
do not allow do_sample and weird force bos token things
patrickvonplaten Mar 7, 2020
a5751f7
fix bug with attention_mask as optional input argument
patrickvonplaten Mar 8, 2020
41b437e
add draft version of propsoed changes for ROGUE score
patrickvonplaten Mar 8, 2020
ca2047b
refactor variable naming and improve tf generate in line with torch g…
patrickvonplaten Mar 9, 2020
a2c8e51
fix torch to tf translation
patrickvonplaten Mar 9, 2020
374deef
fixed typo
patrickvonplaten Mar 9, 2020
cf06290
remove ipdb
patrickvonplaten Mar 9, 2020
1098971
rename variable
patrickvonplaten Mar 9, 2020
ca1330f
do not mess with the negative sign
patrickvonplaten Mar 10, 2020
9b8ee8c
delete print and make style
patrickvonplaten Mar 10, 2020
7351a8d
re-add scoring filtering
patrickvonplaten Mar 10, 2020
d997ac7
fix typo
patrickvonplaten Mar 10, 2020
1ba21f9
fix bug in tf no_repeat_ngram_size
patrickvonplaten Mar 10, 2020
a332cc9
finalize generation merge
patrickvonplaten Mar 11, 2020
bc9d5d9
make all tensors half precision
patrickvonplaten Mar 11, 2020
ac303ea
fix problem with half
patrickvonplaten Mar 11, 2020
db29ffc
Merge pull request #3140 from patrickvonplaten/merge_bart_generate_in…
thomwolf Mar 11, 2020
1b9e765
Update README.md
mrm8488 Mar 10, 2020
601e424
Update README.md
mrm8488 Mar 10, 2020
5bb00c8
Update README.md
mrm8488 Mar 10, 2020
2356166
Update README.md
mrm8488 Mar 10, 2020
6c61c08
Create README.md
mrm8488 Mar 10, 2020
735180a
Create README.md
dreasysnail Mar 10, 2020
6ad221d
Create README.md
dreasysnail Mar 11, 2020
dc848c2
Create README.md
dreasysnail Mar 10, 2020
19a63d8
Create Readme.md model card (#3221)
kldarek Mar 11, 2020
5085df9
[model_cards] PolBERT tweaks
julien-c Mar 11, 2020
e43afb1
[model_cards] DialoGPT: How to use + thumbnail + conversational tag
julien-c Mar 11, 2020
324292c
Add Bio+ Clinical BERT model card (#3229)
EmilyAlsentzer Mar 11, 2020
f65f74b
Create README.md (#3230)
EmilyAlsentzer Mar 11, 2020
14e455b
[model_cards] 🇹🇷 Add new (cased) DistilBERTurk model
stefan-it Mar 11, 2020
c6cf925
[ci] last resort
julien-c Mar 11, 2020
824e320
[ci] Fixup c6cf925
julien-c Mar 11, 2020
a4c75f1
[ci] last resort
julien-c Mar 11, 2020
72768b6
[model_cards] polbert: simplify usage example with pipelines
julien-c Mar 12, 2020
2e81b9d
Bart: update example for #3140 compatibility (#3233)
sshleifer Mar 12, 2020
c111601
small clean-up
patrickvonplaten Mar 11, 2020
6047f46
re-add eos token to get good bart results
patrickvonplaten Mar 12, 2020
f1c71da
fix eos_token_ids in test
patrickvonplaten Mar 12, 2020
6a82f77
fix typo
patrickvonplaten Mar 12, 2020
087465b
add BART to README (#3255)
sshleifer Mar 12, 2020
afea70c
Bump psutil from 5.6.3 to 5.6.6 in /examples/distillation
dependabot[bot] Mar 12, 2020
cc4c379
Create camembert-base-README.md
benjamin-mlr Mar 13, 2020
c2ee384
update file to new starting token logic
patrickvonplaten Mar 13, 2020
4f75d38
make style
patrickvonplaten Mar 13, 2020
ab756f7
add gpt2-xl for tf
patrickvonplaten Mar 13, 2020
8320fee
[model_cards] CodeBERTa
julien-c Mar 13, 2020
2bd79e2
[BART] FP16 testing fixes (#3266)
sshleifer Mar 13, 2020
3814e16
Merge pull request #3225 from patrickvonplaten/finalize_merge_bart_ge…
thomwolf Mar 14, 2020
5ea8ba6
[BART] Remove unused kwargs (#3279)
sshleifer Mar 16, 2020
af471ce
Improved Error message when loading config/model with .from_pretraine…
patrickvonplaten Mar 16, 2020
879e1d3
Add TF2 version of FlauBERT (#2700)
Mar 16, 2020
3ddd202
Create CodeBERTaJS model card
mrm8488 Mar 16, 2020
de69793
Create model card for spanbert-finetuned-squadv2
mrm8488 Mar 16, 2020
1157323
[BART] generation_mode as a kwarg not a class attribute (#3278)
sshleifer Mar 16, 2020
4759176
add camembert for Question answering for examples
patrickvonplaten Mar 16, 2020
b2028cc
Add model card for Google AI's BERT Miniatures (#3301)
iuliaturc-google Mar 17, 2020
b2c1a44
[BART] Delete redundant unit test (#3302)
sshleifer Mar 17, 2020
68ef0a1
[model_cards] Symlink all Google AI's BERT Miniatures to source model…
julien-c Mar 17, 2020
bd3fedd
Create README.md (#3306)
jannesgg Mar 17, 2020
2187c49
CPU/GPU memory benchmarking utilities - Remove support for python 3.5…
thomwolf Mar 17, 2020
e8f44af
[generate] do_sample default back to False (#3298)
patrickvonplaten Mar 17, 2020
930c941
[WIP] Lightning glue example (#3290)
nateraw Mar 17, 2020
0f1bc0d
[model_cards] Add google thumbnail
julien-c Mar 17, 2020
e41212c
Create model card for CodeBERTaPy (#3309)
mrm8488 Mar 17, 2020
2b60a26
Update examples/ner/run_ner.py to use AutoModel (#3305)
lifefeel Mar 17, 2020
38a555a
Add Summarization to Pipelines (#3128)
sshleifer Mar 17, 2020
d7f98cd
Init card for model
DukeEnglish Mar 18, 2020
ddb10c6
improve doctstring (#3327)
patrickvonplaten Mar 18, 2020
efdb46b
add link to blog post (#3326)
patrickvonplaten Mar 18, 2020
292186a
Adding LM Head to Transfo-XL and first step to fixing problem with Ad…
patrickvonplaten Mar 18, 2020
d6afbd3
XLM-R Tokenizer now passes common tests + Integration tests (#3198)
LysandreJik Mar 18, 2020
4b1970b
Create README.md
brandenchan Mar 18, 2020
cae334c
Improve fill-mask pipeline example in 03-pipelines notebook.
mfuntowicz Mar 18, 2020
20139b7
Added model cards for SciBERT models uploaded under AllenAI org (#3330)
kyleclo Mar 18, 2020
29442d2
Create README.md
DukeEnglish Mar 19, 2020
9393281
Create README.md
DukeEnglish Mar 19, 2020
f6d813a
Create README.md
DukeEnglish Mar 19, 2020
cec3cdd
Fix input ids can be none attn mask (#3345)
patrickvonplaten Mar 19, 2020
8d3e218
fix typo in docstring demonstrating usage (#3213)
mgoldey Mar 19, 2020
cd21d8b
Typo in warning message (#3219)
elgeish Mar 19, 2020
ad7233f
[BART] cleanup: remove redundant kwargs, improve docstrings (#3319)
sshleifer Mar 19, 2020
c44a17d
[FIX] not training when epoch is small (#3006)
mataney Mar 19, 2020
4e4403c
[BART] torch 1.0 compatibility (#3322)
sshleifer Mar 19, 2020
b2c2c31
Minor Bug Fix for Running Roberta on Glue (#3240)
skarakulak Mar 19, 2020
3bedfd3
Fix wrong link for the notebook file (#3344)
Mar 19, 2020
f049be7
Export ALBERT main layer in TensorFlow (#3354)
LysandreJik Mar 19, 2020
11d8bcc
Add model cards for FinBERT. (#3331)
haamis Mar 19, 2020
676adf8
Created card for spanbert-finetuned-squadv1
mrm8488 Mar 19, 2020
dedc7a8
Create card for BERT-Tiny fine-tuned on SQuAD v2
mrm8488 Mar 19, 2020
39db055
Merge pull request #3348 from mrm8488/patch-28
mrm8488 Mar 19, 2020
e99af3b
Create model card for bert-small-finetuned-squadv2
mrm8488 Mar 19, 2020
0c44b11
add bert bahasa readme
huseinzol05 Mar 19, 2020
656e138
Fix #3305: run_ner only possible on ModelForTokenClassification models
julien-c Mar 19, 2020
bbf26c4
Support T5 Generation (#3228)
patrickvonplaten Mar 19, 2020
8eeefcb
Update 01-training-tokenizers.ipynb (typo issue) (#3343)
Mar 19, 2020
ecfd336
Simpler Error message when loading config/model with .from_pretrained…
julien-c Mar 19, 2020
8becb73
removing torch.cuda.empty_cache() from TF function (#3267)
keskarnitish Mar 19, 2020
95e00d0
Clean special token init in modeling_....py (#3264)
patrickvonplaten Mar 20, 2020
115abd2
Handle pinned version of isort
Mar 19, 2020
265709f
New model, new model cards
traviemcg Mar 20, 2020
634bf6c
fixes lr_scheduler warning
erip Mar 20, 2020
cf72479
One last reorder of {scheduler,optimizer}.step()
julien-c Mar 20, 2020
18eec3a
[ci] simpler way to load correct version of isort
julien-c Mar 23, 2020
2842490
Added scibert-nli model card
gsarti Mar 22, 2020
e524829
Correct order for dev/quality dependencies
LysandreJik Mar 23, 2020
f740177
Add comparison table with new models
mrm8488 Mar 23, 2020
b7aa077
Create card for the model
mrm8488 Mar 23, 2020
85b324b
Add comparison table with older brother in family
mrm8488 Mar 23, 2020
e25c4f4
[ALBERT] move things around for more consistent naming
julien-c Mar 23, 2020
f7dcf8f
[BertAbs] Move files around for more consistent naming
julien-c Mar 23, 2020
ec6766a
[deps] scikit-learn's transient issue was fixed
julien-c Mar 23, 2020
a8e3336
[examples] Use AutoModels in more examples
julien-c Mar 23, 2020
e392ba6
Add camembert integration tests (#3375)
patrickvonplaten Mar 24, 2020
471cce2
Release: v2.6.0
LysandreJik Mar 24, 2020
7372e62
Added precisions in SciBERT-NLI model card (#3410)
gsarti Mar 24, 2020
e279a31
Model cards for CS224n SQuAD2.0 models (#3406)
elgeish Mar 24, 2020
d328349
[model_cards] 🇹🇷 Add new (uncased) BERTurk model
stefan-it Mar 24, 2020
b4009cb
[model_cards] 🇹🇷 Add new (cased, 128k) BERTurk model
stefan-it Mar 24, 2020
b31ef22
[model_cards] 🇹🇷 Add new (uncased, 128k) BERTurk model
stefan-it Mar 24, 2020
b88bda6
Add right model and tokenizer path in example
mrm8488 Mar 24, 2020
fbc5bf1
v2.6.0 release: isort un-pinned
LysandreJik Mar 24, 2020
d0c36a7
[ci] Partial revert of 18eec3a9847 due to fbc5bf10cfe
julien-c Mar 24, 2020
f8823ba
Expose missing mappings (see #3415)
julien-c Mar 24, 2020
eaabaaf
[run_language_modeling] Fix: initialize a new model from a config object
julien-c Mar 24, 2020
3d76df3
BART for summarization training with CNN/DM using pytorch-lightning
andr-ec Mar 25, 2020
ccbe839
Added BioBERT-NLI model card (#3421)
gsarti Mar 25, 2020
83272a3
Experiment w/ dataclasses (including Py36) (#3423)
julien-c Mar 25, 2020
ffa17fe
Extend config with task specific configs. (#3433)
patrickvonplaten Mar 25, 2020
010e046
Updated/added model cards (#3435)
traviemcg Mar 25, 2020
ffcffeb
Force the return of token type IDs (#3439)
LysandreJik Mar 26, 2020
9c683ef
Add t5 to pipeline(task='summarization') (#3413)
patrickvonplaten Mar 26, 2020
3c5c567
Update model card huseinzol05/bert-base-bahasa-cased (#3425)
huseinzol05 Mar 26, 2020
022e8fa
Adds translation pipeline (#3419)
patrickvonplaten Mar 26, 2020
7420a6a
Create card for model GPT-2-finetuned-CORD19
mrm8488 Mar 26, 2020
3119705
rename string in pipeline
patrickvonplaten Mar 26, 2020
1a6c546
Add missing token classification for XLM (#3277)
sakares Mar 26, 2020
e703e92
Add t5 summarization example (#3411)
patrickvonplaten Mar 26, 2020
b4fb94f
revert unpin isort commit
patrickvonplaten Mar 26, 2020
5ad2ea0
Add wmt translation example (#3428)
patrickvonplaten Mar 26, 2020
39371ee
[Bart/Memory] don't create lm_head (#3323)
sshleifer Mar 26, 2020
1a5aefc
[Seq2Seq Generation] Call encoder before expanding input_ids (#3370)
sshleifer Mar 26, 2020
2b2a2f8
[Bart] Fix: put dummy_inputs on correct device (#3398)
sshleifer Mar 26, 2020
63f4d8c
[Bart/Memory] SelfAttention only returns weights if config.outp… (#3369)
sshleifer Mar 26, 2020
c10decf
[Bart: example] drop columns that are exclusively pad_token_id… (#3400)
sshleifer Mar 26, 2020
53fe733
Model Cards: Fix grammar error (#3467)
mrm8488 Mar 27, 2020
3ee431d
[Bart/Memory] Two separate, smaller decoder attention masks (#3371)
sshleifer Mar 27, 2020
e2c05f0
Correct indentation in docstring
LysandreJik Mar 27, 2020
ff80b73
Add option to choose T5 model size. (#3480)
LysandreJik Mar 27, 2020
fa9af24
Add T5 to docs (#3461)
patrickvonplaten Mar 27, 2020
f4f4946
Rename `t5-large` to `t5-base` in README.md
patrickvonplaten Mar 27, 2020
b08259a
run_ner.py / bert-base-multilingual-cased can output empty tokens (#2…
mfuntowicz Mar 27, 2020
00ea100
add summarization and translation to notebook (#3478)
patrickvonplaten Mar 27, 2020
17dceae
Fix circle ci flaky fail of wmt example (#3485)
patrickvonplaten Mar 27, 2020
601ac5b
[model_cards]: use MIT license for all dbmdz models
stefan-it Mar 27, 2020
f6a23d1
[BART] add bart-large-xsum weights (#3422)
sshleifer Mar 29, 2020
33ef700
[Docs] examples/summarization/bart: Simplify CNN/DM preprocessi… (#3516)
sshleifer Mar 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
run_tests_torch_and_tf:
working_directory: ~/transformers
docker:
- image: circleci/python:3.5
- image: circleci/python:3.6
environment:
OMP_NUM_THREADS: 1
resource_class: xlarge
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
run_tests_custom_tokenizers:
working_directory: ~/transformers
docker:
- image: circleci/python:3.5
- image: circleci/python:3.6
environment:
RUN_CUSTOM_TOKENIZERS: yes
steps:
Expand All @@ -56,7 +56,7 @@ jobs:
run_examples_torch:
working_directory: ~/transformers
docker:
- image: circleci/python:3.5
- image: circleci/python:3.6
environment:
OMP_NUM_THREADS: 1
resource_class: xlarge
Expand All @@ -69,7 +69,7 @@ jobs:
deploy_doc:
working_directory: ~/transformers
docker:
- image: circleci/python:3.5
- image: circleci/python:3.6
steps:
- add_ssh_keys:
fingerprints:
Expand All @@ -94,7 +94,7 @@ jobs:
check_repository_consistency:
working_directory: ~/transformers
docker:
- image: circleci/python:3.5
- image: circleci/python:3.6
resource_class: small
parallelism: 1
steps:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/self-push.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Self-hosted runner (push)

on:
push:
branches:
- master
pull_request:
# push:
# branches:
# - master
# pull_request:
repository_dispatch:


jobs:
Expand All @@ -31,12 +32,12 @@ jobs:
run: |
source .env/bin/activate
pip install .[sklearn,tf,torch,testing]
pip uninstall -y tensorflow

- name: Are GPUs recognized by our DL frameworks
run: |
source .env/bin/activate
python -c "import torch; print(torch.cuda.is_available())"
python -c "import tensorflow as tf; print(tf.test.is_built_with_cuda(), tf.config.list_physical_devices('GPU'))"

- name: Run all non-slow tests on GPU
env:
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Choose the right framework for every part of a model's lifetime

## Installation

This repo is tested on Python 3.5+, PyTorch 1.0.0+ and TensorFlow 2.0.0-rc1
This repo is tested on Python 3.6+, PyTorch 1.0.0+ and TensorFlow 2.0.0-rc1

You should install 🤗 Transformers in a [virtual environment](https://docs.python.org/3/library/venv.html). If you're unfamiliar with Python virtual environments, check out the [user guide](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).

Expand Down Expand Up @@ -163,8 +163,9 @@ At some point in the future, you'll be able to seamlessly move from pre-training
13. **[XLM-RoBERTa](https://github.com/pytorch/fairseq/tree/master/examples/xlmr)** (from Facebook AI), released together with the paper [Unsupervised Cross-lingual Representation Learning at Scale](https://arxiv.org/abs/1911.02116) by Alexis Conneau*, Kartikay Khandelwal*, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer and Veselin Stoyanov.
14. **[MMBT](https://github.com/facebookresearch/mmbt/)** (from Facebook), released together with the paper a [Supervised Multimodal Bitransformers for Classifying Images and Text](https://arxiv.org/pdf/1909.02950.pdf) by Douwe Kiela, Suvrat Bhooshan, Hamed Firooz, Davide Testuggine.
15. **[FlauBERT](https://github.com/getalp/Flaubert)** (from CNRS) released with the paper [FlauBERT: Unsupervised Language Model Pre-training for French](https://arxiv.org/abs/1912.05372) by Hang Le, Loïc Vial, Jibril Frej, Vincent Segonne, Maximin Coavoux, Benjamin Lecouteux, Alexandre Allauzen, Benoît Crabbé, Laurent Besacier, Didier Schwab.
16. **[Other community models](https://huggingface.co/models)**, contributed by the [community](https://huggingface.co/users).
17. Want to contribute a new model? We have added a **detailed guide and templates** to guide you in the process of adding a new model. You can find them in the [`templates`](./templates) folder of the repository. Be sure to check the [contributing guidelines](./CONTRIBUTING.md) and contact the maintainers or open an issue to collect feedbacks before starting your PR.
16. **[BART](https://github.com/pytorch/fairseq/tree/master/examples/bart)** (from Facebook) released with the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/pdf/1910.13461.pdf) by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer.
17. **[Other community models](https://huggingface.co/models)**, contributed by the [community](https://huggingface.co/users).
18. Want to contribute a new model? We have added a **detailed guide and templates** to guide you in the process of adding a new model. You can find them in the [`templates`](./templates) folder of the repository. Be sure to check the [contributing guidelines](./CONTRIBUTING.md) and contact the maintainers or open an issue to collect feedbacks before starting your PR.

These implementations have been tested on several datasets (see the example scripts) and should match the performances of the original implementations (e.g. ~93 F1 on SQuAD for BERT Whole-Word-Masking, ~88 F1 on RocStories for OpenAI GPT, ~18.3 perplexity on WikiText 103 for Transformer-XL, ~0.916 Peason R coefficient on STS-B for XLNet). You can find more details on the performances in the Examples section of the [documentation](https://huggingface.co/transformers/examples.html).

Expand Down Expand Up @@ -471,7 +472,7 @@ python ./examples/run_generation.py \

Starting with `v2.2.2`, you can now upload and share your fine-tuned models with the community, using the <abbr title="Command-line interface">CLI</abbr> that's built-in to the library.

**First, create an account on [https://huggingface.co/join](https://huggingface.co/join)**. Then:
**First, create an account on [https://huggingface.co/join](https://huggingface.co/join)**. Optionally, join an existing organization or create a new one. Then:

```shell
transformers-cli login
Expand All @@ -490,19 +491,26 @@ transformers-cli upload ./config.json [--filename folder/foobar.json]
# (you can optionally override its filename, which can be nested inside a folder)
```

Your model will then be accessible through its identifier, a concatenation of your username and the folder name above:
If you want your model to be namespaced by your organization name rather than your username, add the following flag to any command:
```shell
--organization organization_name
```

Your model will then be accessible through its identifier, a concatenation of your username (or organization name) and the folder name above:
```python
"username/pretrained_model"
# or if an org:
"organization_name/pretrained_model"
```

**Please add a README.md model card** to the repo under `model_cards/` with: model description, training params (dataset, preprocessing, hyperparameters), evaluation results, intended uses & limitations, etc.
**Please add a README.md model card** to the repo under `model_cards/` with: model description, training params (dataset, preprocessing, hardware used, hyperparameters), evaluation results, intended uses & limitations, etc.

Your model now has a page on huggingface.co/models 🔥

Anyone can load it from code:
```python
tokenizer = AutoTokenizer.from_pretrained("username/pretrained_model")
model = AutoModel.from_pretrained("username/pretrained_model")
tokenizer = AutoTokenizer.from_pretrained("namespace/pretrained_model")
model = AutoModel.from_pretrained("namespace/pretrained_model")
```

List all your files on S3:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u'2.5.1'
release = u'2.6.0'


# -- General configuration ---------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,4 @@ The library currently contains PyTorch and Tensorflow implementations, pre-train
model_doc/xlmroberta
model_doc/flaubert
model_doc/bart
model_doc/t5
2 changes: 1 addition & 1 deletion docs/source/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

Transformers is tested on Python 3.5+ and PyTorch 1.1.0
Transformers is tested on Python 3.6+ and PyTorch 1.1.0

## With pip

Expand Down
5 changes: 5 additions & 0 deletions docs/source/main_classes/pipelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@ QuestionAnsweringPipeline

.. autoclass:: transformers.QuestionAnsweringPipeline


SummarizationPipeline
==========================================

.. autoclass:: transformers.SummarizationPipeline
69 changes: 69 additions & 0 deletions docs/source/model_doc/t5.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
T5
----------------------------------------------------
**DISCLAIMER:** This model is still a work in progress, if you see something strange,
file a `Github Issue <https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title>`_

Overview
~~~~~
The T5 model was presented in `Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer <https://arxiv.org/pdf/1910.10683.pdf>`_ by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu in
Here the abstract:

*Transfer learning, where a model is first pre-trained on a data-rich task before being fine-tuned on a downstream task, has emerged as a powerful technique in natural language processing (NLP). The effectiveness of transfer learning has given rise to a diversity of approaches, methodology, and practice.
In this paper, we explore the landscape of transfer learning techniques for NLP by introducing a unified framework that converts every language problem into a text-to-text format.
Our systematic study compares pre-training objectives, architectures, unlabeled datasets, transfer approaches, and other factors on dozens of language understanding tasks.
By combining the insights from our exploration with scale and our new "Colossal Clean Crawled Corpus", we achieve state-of-the-art results on many benchmarks covering summarization, question answering, text classification, and more.
To facilitate future work on transfer learning for NLP, we release our dataset, pre-trained models, and code.*

The Authors' code can be found `here <https://github.com/google-research/text-to-text-transfer-transformer>`_ .

Tips
~~~~~~~~~~~~~~~~~~~~
- T5 is an encoder-decoder model pre-trained on a multi-task mixture of unsupervised
and supervised tasks and which each task is cast as a sequence to sequence task.
Therefore T5 works well on a variety of tasks out-of-the-box by prepending a different prefix to the input corresponding to each task, e.g.: for translation: *translate English to German: ..., summarize: ...*.
For more information about the which prefix to use, it is easiest to look into Appendix D of the `paper <https://arxiv.org/pdf/1910.10683.pdf>`_ .
- For sequence to sequence generation, it is recommended to use ``T5ForConditionalGeneration.generate()``. The method takes care of feeding the encoded input via cross-attention layers to the decoder and auto-regressively generating the decoder output.
- T5 uses relative scalar embeddings. Encoder input padding can be done on the left and on the right.


T5Config
~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.T5Config
:members:


T5Tokenizer
~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.T5Tokenizer
:members: build_inputs_with_special_tokens, get_special_tokens_mask,
create_token_type_ids_from_sequences, save_vocabulary


T5Model
~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.T5Model
:members:


T5ForConditionalGeneration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.T5ForConditionalGeneration
:members:


TFT5Model
~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.TFT5Model
:members:


TFT5ForConditionalGeneration
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.TFT5ForConditionalGeneration
:members:
19 changes: 13 additions & 6 deletions docs/source/model_sharing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Starting with `v2.2.2`, you can now upload and share your fine-tuned models with the community, using the <abbr title="Command-line interface">CLI</abbr> that's built-in to the library.

**First, create an account on [https://huggingface.co/join](https://huggingface.co/join)**. Then:
**First, create an account on [https://huggingface.co/join](https://huggingface.co/join)**. Optionally, join an existing organization or create a new one. Then:

```shell
transformers-cli login
Expand All @@ -21,19 +21,26 @@ transformers-cli upload ./config.json [--filename folder/foobar.json]
# (you can optionally override its filename, which can be nested inside a folder)
```

Your model will then be accessible through its identifier, a concatenation of your username and the folder name above:
If you want your model to be namespaced by your organization name rather than your username, add the following flag to any command:
```shell
--organization organization_name
```

Your model will then be accessible through its identifier, a concatenation of your username (or organization name) and the folder name above:
```python
"username/pretrained_model"
# or if an org:
"organization_name/pretrained_model"
```

**Please add a README.md model card** to the repo under `model_cards/` with: model description, training params (dataset, preprocessing, hyperparameters), evaluation results, intended uses & limitations, etc.
**Please add a README.md model card** to the repo under `model_cards/` with: model description, training params (dataset, preprocessing, hardware used, hyperparameters), evaluation results, intended uses & limitations, etc.

Your model now has a page on huggingface.co/models 🔥

Anyone can load it from code:
```python
tokenizer = AutoTokenizer.from_pretrained("username/pretrained_model")
model = AutoModel.from_pretrained("username/pretrained_model")
tokenizer = AutoTokenizer.from_pretrained("namespace/pretrained_model")
model = AutoModel.from_pretrained("namespace/pretrained_model")
```

List all your files on S3:
Expand All @@ -45,4 +52,4 @@ You can also delete unneeded files:

```shell
transformers-cli s3 rm …
```
```
4 changes: 0 additions & 4 deletions docs/source/pretrained_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ For a list that includes community-uploaded models, refer to `https://huggingfac
| | | | FlauBERT large architecture |
| | | (see `details <https://github.com/getalp/Flaubert>`__) |
+-------------------+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
+-------------------+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| Bart | ``bart-large`` | | 12-layer, 1024-hidden, 16-heads, 406M parameters |
| | | (see `details <https://github.com/pytorch/fairseq/tree/master/examples/bart>`_) |
| +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
Expand All @@ -285,6 +284,3 @@ For a list that includes community-uploaded models, refer to `https://huggingfac
| | ``bart-large-cnn`` | | 12-layer, 1024-hidden, 16-heads, 406M parameters (same as base) |
| | | | bart-large base architecture finetuned on cnn summarization task |
+-------------------+------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+


.. <https://huggingface.co/transformers/examples.html>`__
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export SQUAD_DIR=/path/to/SQUAD

python run_squad.py \
--model_type bert \
--model_name_or_path bert-base-cased \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_lower_case \
Expand Down
Loading