Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
bc3a0c06
Unverified
Commit
bc3a0c06
authored
Jun 21, 2020
by
Ilya Boytsov
Committed by
GitHub
Jun 21, 2020
Browse files
[examples] fixes arguments for summarization finetune scripts (#5157)
Authored-by:
i.boytsov
<
i.boytsov@MAC867.local
>
parent
68e19f1c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
7 deletions
+2
-7
examples/summarization/finetune.sh
examples/summarization/finetune.sh
+1
-4
examples/summarization/finetune_bart_tiny.sh
examples/summarization/finetune_bart_tiny.sh
+1
-2
examples/summarization/finetune_t5.sh
examples/summarization/finetune_t5.sh
+0
-1
No files found.
examples/summarization/finetune.sh
View file @
bc3a0c06
export
OUTPUT_DIR
=
bart_cnn_finetune
# Make output directory if it doesn't exist
mkdir
-p
$OUTPUT_DIR
# Add parent directory to python path to access lightning_base.py
# Add parent directory to python path to access lightning_base.py
export
PYTHONPATH
=
"../"
:
"
${
PYTHONPATH
}
"
export
PYTHONPATH
=
"../"
:
"
${
PYTHONPATH
}
"
...
@@ -9,6 +5,7 @@ export PYTHONPATH="../":"${PYTHONPATH}"
...
@@ -9,6 +5,7 @@ export PYTHONPATH="../":"${PYTHONPATH}"
# --model_name_or_path=t5-base for t5
# --model_name_or_path=t5-base for t5
# the proper usage is documented in the README
python finetune.py
\
python finetune.py
\
--model_name_or_path
=
facebook/bart-large
\
--model_name_or_path
=
facebook/bart-large
\
--learning_rate
=
3e-5
\
--learning_rate
=
3e-5
\
...
...
examples/summarization/finetune_bart_tiny.sh
View file @
bc3a0c06
...
@@ -16,14 +16,13 @@ mkdir -p $OUTPUT_DIR
...
@@ -16,14 +16,13 @@ mkdir -p $OUTPUT_DIR
export
PYTHONPATH
=
"../"
:
"
${
PYTHONPATH
}
"
export
PYTHONPATH
=
"../"
:
"
${
PYTHONPATH
}
"
python finetune.py
\
python finetune.py
\
--data_dir
=
cnn_tiny/
\
--data_dir
=
cnn_tiny/
\
--model_type
=
bart
\
--model_name_or_path
=
sshleifer/bart-tiny-random
\
--model_name_or_path
=
sshleifer/bart-tiny-random
\
--learning_rate
=
3e-5
\
--learning_rate
=
3e-5
\
--train_batch_size
=
2
\
--train_batch_size
=
2
\
--eval_batch_size
=
2
\
--eval_batch_size
=
2
\
--output_dir
=
$OUTPUT_DIR
\
--output_dir
=
$OUTPUT_DIR
\
--num_train_epochs
=
1
\
--num_train_epochs
=
1
\
--
n_
gpu
=
0
\
--gpu
s
=
0
\
--do_train
$@
--do_train
$@
rm
-rf
cnn_tiny
rm
-rf
cnn_tiny
...
...
examples/summarization/finetune_t5.sh
View file @
bc3a0c06
...
@@ -11,7 +11,6 @@ export PYTHONPATH="../":"${PYTHONPATH}"
...
@@ -11,7 +11,6 @@ export PYTHONPATH="../":"${PYTHONPATH}"
python finetune.py
\
python finetune.py
\
--data_dir
=
./cnn-dailymail/cnn_dm
\
--data_dir
=
./cnn-dailymail/cnn_dm
\
--model_name_or_path
=
t5-large
\
--model_name_or_path
=
t5-large
\
--model_type
=
t5
--learning_rate
=
3e-5
\
--learning_rate
=
3e-5
\
--train_batch_size
=
4
\
--train_batch_size
=
4
\
--eval_batch_size
=
4
\
--eval_batch_size
=
4
\
...
...
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