-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine api docs and readme and fix baseline bug (#912)
* fix unified transformer dtype problem * fix win dtype bug * Fix plato-2 and plato-mini dtype bug * Fix plato-2 tokenization * Refine some doc * Add general k support for topk sampling * fix seed * minor fix * Fix unitransformer readme * topk kernel optimization * add unimo model and fix generate api * add 3 datasets for unimo-text * fix tokenizer bug * paddlenlp+lightseq sample * Refine api docs and readme and fix baseline bug * add shell srcipt * remove lightseq samples * minor fix * minor fix Co-authored-by: Jiaqi Liu <[email protected]> Co-authored-by: liu zhengxi <[email protected]>
- Loading branch information
1 parent
9602532
commit fe8c2d6
Showing
12 changed files
with
201 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
examples/text_generation/unimo-text/scripts/lcsts_train.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# GPU启动,参数`--gpus`指定训练所用的GPU卡号,可以是单卡,也可以多卡 | ||
unset CUDA_VISIBLE_DEVICES | ||
|
||
log_dir=./lcsts-log | ||
rm -rf ${log_dir} | ||
mkdir -p ${log_dir} | ||
|
||
python -m paddle.distributed.launch --gpus "0,1,2,3" --log_dir ${log_dir} run_gen.py \ | ||
--dataset_name=lcsts_new \ | ||
--model_name_or_path=unimo-text-1.0 \ | ||
--save_dir=${log_dir}/checkpoints \ | ||
--logging_steps=100 \ | ||
--save_steps=10000 \ | ||
--epochs=6 \ | ||
--batch_size=64 \ | ||
--learning_rate=5e-5 \ | ||
--warmup_propotion=0.02 \ | ||
--weight_decay=0.01 \ | ||
--max_seq_len=320 \ | ||
--max_target_len=30 \ | ||
--max_dec_len=20 \ | ||
--min_dec_len=3 \ | ||
--do_train \ | ||
--do_predict \ | ||
--device=gpu >> ${log_dir}/lanch.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# GPU启动,参数`--gpus`指定训练所用的GPU卡号,可以是单卡,也可以多卡 | ||
unset CUDA_VISIBLE_DEVICES | ||
|
||
log_dir=./qg-log | ||
rm -rf ${log_dir} | ||
mkdir -p ${log_dir} | ||
|
||
python -m paddle.distributed.launch --gpus "0,1,2,3" --log_dir ${log_dir} run_gen.py \ | ||
--dataset_name=dureader_qg \ | ||
--model_name_or_path=unimo-text-1.0 \ | ||
--save_dir=${log_dir}/checkpoints \ | ||
--logging_steps=10 \ | ||
--save_steps=1000 \ | ||
--epochs=6 \ | ||
--batch_size=8 \ | ||
--learning_rate=5e-5 \ | ||
--warmup_propotion=0.02 \ | ||
--weight_decay=0.01 \ | ||
--max_seq_len=320 \ | ||
--max_target_len=30 \ | ||
--max_dec_len=20 \ | ||
--min_dec_len=3 \ | ||
--do_train \ | ||
--do_predict \ | ||
--device=gpu >> ${log_dir}/lanch.log 2>&1 |
25 changes: 25 additions & 0 deletions
25
examples/text_generation/unimo-text/scripts/table_train.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# GPU启动,参数`--gpus`指定训练所用的GPU卡号,可以是单卡,也可以多卡 | ||
unset CUDA_VISIBLE_DEVICES | ||
|
||
log_dir=./table-log | ||
rm -rf ${log_dir} | ||
mkdir -p ${log_dir} | ||
|
||
python -m paddle.distributed.launch --gpus "0,1,2,3" --log_dir ${log_dir} run_gen.py \ | ||
--dataset_name=advertisegen \ | ||
--model_name_or_path=unimo-text-1.0 \ | ||
--save_dir=${log_dir}/checkpoints \ | ||
--logging_steps=100 \ | ||
--save_steps=1000 \ | ||
--epochs=6 \ | ||
--batch_size=8 \ | ||
--learning_rate=5e-5 \ | ||
--warmup_propotion=0.02 \ | ||
--weight_decay=0.01 \ | ||
--max_seq_len=500 \ | ||
--max_target_len=200 \ | ||
--max_dec_len=200 \ | ||
--min_dec_len=10 \ | ||
--do_train \ | ||
--do_predict \ | ||
--device=gpu >> ${log_dir}/lanch.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.