Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
dad5e12e
Unverified
Commit
dad5e12e
authored
Jul 18, 2020
by
Sam Shleifer
Committed by
GitHub
Jul 18, 2020
Browse files
[seq2seq] distillation.py accepts trainer arguments (#5865)
parent
ba240018
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
examples/seq2seq/README.md
examples/seq2seq/README.md
+1
-1
examples/seq2seq/distillation.py
examples/seq2seq/distillation.py
+1
-0
No files found.
examples/seq2seq/README.md
View file @
dad5e12e
...
@@ -149,7 +149,7 @@ If 'translation' is in your task name, the computed metric will be BLEU. Otherwi
...
@@ -149,7 +149,7 @@ If 'translation' is in your task name, the computed metric will be BLEU. Otherwi
For t5, you need to specify --task translation_{src}_to_{tgt} as follows:
For t5, you need to specify --task translation_{src}_to_{tgt} as follows:
```
bash
```
bash
export
DATA_DIR
=
wmt_en_ro
export
DATA_DIR
=
wmt_en_ro
python run_eval.py t5
_
base
\
python run_eval.py t5
-
base
\
$DATA_DIR
/val.source t5_val_generations.txt
\
$DATA_DIR
/val.source t5_val_generations.txt
\
--reference_path
$DATA_DIR
/val.target
\
--reference_path
$DATA_DIR
/val.target
\
--score_path
enro_bleu.json
\
--score_path
enro_bleu.json
\
...
...
examples/seq2seq/distillation.py
View file @
dad5e12e
...
@@ -446,6 +446,7 @@ def distill_main(args):
...
@@ -446,6 +446,7 @@ def distill_main(args):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
=
pl
.
Trainer
.
add_argparse_args
(
parser
)
parser
=
BartSummarizationDistiller
.
add_model_specific_args
(
parser
,
os
.
getcwd
())
parser
=
BartSummarizationDistiller
.
add_model_specific_args
(
parser
,
os
.
getcwd
())
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment