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
28d5700a
Unverified
Commit
28d5700a
authored
Sep 21, 2021
by
Lowin
Committed by
GitHub
Sep 20, 2021
Browse files
fix research_projects/mlm_wwm readme.md examples (#13646)
the variables of run example is not correct
parent
002a078a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
examples/research_projects/mlm_wwm/README.md
examples/research_projects/mlm_wwm/README.md
+17
-11
No files found.
examples/research_projects/mlm_wwm/README.md
View file @
28d5700a
...
@@ -60,31 +60,37 @@ You could run the following:
...
@@ -60,31 +60,37 @@ You could run the following:
```
bash
```
bash
export
TRAIN_FILE
=
/path/to/
dataset/wiki.train.raw
export
TRAIN_FILE
=
/path/to/
train/file
export
LTP_RESOURCE
=
/path/to/ltp/tokenizer
export
LTP_RESOURCE
=
/path/to/ltp/tokenizer
export
BERT_RESOURCE
=
/path/to/bert/tokenizer
export
BERT_RESOURCE
=
/path/to/bert/tokenizer
export
SAVE_PATH
=
/path/to/data/ref.txt
export
SAVE_PATH
=
/path/to/data/ref.txt
python run_chinese_ref.py
\
python run_chinese_ref.py
\
--file_name
=
path_to_train_or_eval_file
\
--file_name
=
$TRAIN_FILE
\
--ltp
=
path_to_ltp_tokenizer
\
--ltp
=
$LTP_RESOURCE
\
--bert
=
path_to_bert_tokenizer
\
--bert
=
$BERT_RESOURCE
\
--save_path
=
path_to_reference_file
--save_path
=
$SAVE_PATH
```
```
Then you can run the script like this:
Then you can run the script like this:
```
bash
```
bash
export
TRAIN_FILE
=
/path/to/train/file
export
VALIDATION_FILE
=
/path/to/validation/file
export
TRAIN_REF_FILE
=
/path/to/train/chinese_ref/file
export
VALIDATION_REF_FILE
=
/path/to/validation/chinese_ref/file
export
OUTPUT_DIR
=
/tmp/test-mlm-wwm
python run_mlm_wwm.py
\
python run_mlm_wwm.py
\
--model_name_or_path
roberta-base
\
--model_name_or_path
roberta-base
\
--train_file
path_to_train_file
\
--train_file
$TRAIN_FILE
\
--validation_file
path_to_validation_file
\
--validation_file
$VALIDATION_FILE
\
--train_ref_file
path_to_train_chinese_ref_file
\
--train_ref_file
$TRAIN_REF_FILE
\
--validation_ref_file
path_to_validation_chinese_ref_file
\
--validation_ref_file
$VALIDATION_REF_FILE
\
--do_train
\
--do_train
\
--do_eval
\
--do_eval
\
--output_dir
/tmp/test-mlm-wwm
--output_dir
$OUTPUT_DIR
```
```
**Note1:**
On TPU, you should the flag
`--pad_to_max_length`
to make sure all your batches have the same length.
**Note1:**
On TPU, you should the flag
`--pad_to_max_length`
to make sure all your batches have the same length.
...
...
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