Home

Awesome

t5-pegasus pytorch

最新更新

模型效果对比

数据集:LCSTS_new 训练集取前一万条,验证集取前一千条

modelbleurouge-1rouge-2rouge-l
t5-pegasus-base0.12760.34900.21230.3155
t5-copy0.09380.33690.19550.3086
Pegasus-238M-Chinese0.12000.32520.19570.2924
Pegasus-523M-Chinese0.12330.33130.20320.2996
cpt-large0.13660.35500.22420.3220
prophet-zh0.12400.34190.21090.3107

数据格式

样例数据

huggingface模型

model_typemodel_type
t5-pegasusimxly/t5-pegasus
t5copyimxly/t5-copy
PegasusIDEA-CCNL/Randeng-Pegasus-238M-Chinese
PegasusIDEA-CCNL/Randeng-Pegasus-523M-Chinese
cptfnlp/cpt-large
prophetimxly/prophetnet-zh

训练命令

requirements

环境可以参考这个issue

torch >=1.10.0
transformers
pytorch_lightning==1.4.9
torchmetrics==0.5.0

model_type见上方表格

python train.py \
--train_file train.json \
--dev_file dev.json \
--batch_size 6 \
--max_epochs 10 \
--max_source_length 512 \
--max_target_length 300 \
--model_path  imxly/t5-pegasus \
--gpus 4 \
--lr 5e-5 \
--model_type t5-pegasus

参考

https://github.com/ZhuiyiTechnology/t5-pegasus
https://github.com/fastnlp/CPT
https://github.com/IDEA-CCNL/Fengshenbang-LM
https://github.com/microsoft/ProphetNet