Skip to content

Add wmt translation example#3428

Merged
patrickvonplaten merged 7 commits intohuggingface:masterfrom
patrickvonplaten:add_t5_ranslation_example
Mar 26, 2020
Merged

Add wmt translation example#3428
patrickvonplaten merged 7 commits intohuggingface:masterfrom
patrickvonplaten:add_t5_ranslation_example

Conversation

@patrickvonplaten
Copy link
Copy Markdown
Contributor

@patrickvonplaten patrickvonplaten commented Mar 25, 2020

PR adds translation example for T5.
It uses the sacrebleu BLEU scorer.

I adapted the README.md a bit so that users are aware that models in official paper were attained with finetuned T5 @craffel

@patrickvonplaten patrickvonplaten force-pushed the add_t5_ranslation_example branch from 03a688d to 66dc34e Compare March 25, 2020 12:56
@patrickvonplaten patrickvonplaten changed the title Add Translation for WMT example Add wmt translation example Mar 25, 2020
@patrickvonplaten patrickvonplaten force-pushed the add_t5_ranslation_example branch 5 times, most recently from 3bd6d51 to c8e515a Compare March 26, 2020 12:09
Copy link
Copy Markdown
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, that looks clean. I guess we don't need all the usual arguments (data parallel, fp16 and others) since this is an evaluation script and not a training script?

It doesn't seem to run on GPU, does it take a long time to compute? Shouldn't we try to cast to a GPU if there's one available?

Comment thread examples/translation/t5/evaluate_wmt.py Outdated
Comment thread examples/translation/t5/evaluate_wmt.py Outdated
@patrickvonplaten
Copy link
Copy Markdown
Contributor Author

long

Yeah we should definitely try to run it on a GPU - will take a look at that :-)

@patrickvonplaten
Copy link
Copy Markdown
Contributor Author

Not sure whether we need fp16 and multi-gpu training. I think single GPU training is enough and t5 + wmt does not take much memory. But happy to take a look into it if you guys think it's worth it :-) @thomwolf @LysandreJik @julien-c

@patrickvonplaten patrickvonplaten force-pushed the add_t5_ranslation_example branch from a5b69f7 to abdc617 Compare March 26, 2020 14:09
@patrickvonplaten
Copy link
Copy Markdown
Contributor Author

Code quality test fails because of unpinned isort library (see #3449)

Copy link
Copy Markdown
Member

@thomwolf thomwolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Comment thread examples/translation/t5/README.md Outdated
@@ -0,0 +1,51 @@
***This script evaluates the [T5 Model](https://arxiv.org/pdf/1910.10683.pdf) ``t5-base`` on the English to German WMT dataset. Please note that the results in the paper were attained using a ``t5-base`` model fine-tuned on translation, so that results will be slightly worse here***
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Suggest changing "the T5 Model t5-base" to "the multitask pre-trained checkpoint for t5-base
  2. If you want to be more specific than "slightly", it looks like they are about 1.5 BLEU points lower than they would be with fine-tuning.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 26, 2020

Codecov Report

Merging #3428 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3428   +/-   ##
=======================================
  Coverage   52.51%   52.51%           
=======================================
  Files         100      100           
  Lines       17051    17051           
=======================================
  Hits         8954     8954           
  Misses       8097     8097

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4fb94f...713524e. Read the comment docs.

@patrickvonplaten patrickvonplaten force-pushed the add_t5_ranslation_example branch 2 times, most recently from 713524e to c3bce97 Compare March 26, 2020 17:29
Copy link
Copy Markdown
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@patrickvonplaten patrickvonplaten merged commit 5ad2ea0 into huggingface:master Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants