Skip to content

Use BERT as the encoder and GPT2 as the decoder for machine translation.

Notifications You must be signed in to change notification settings

rjk-git/Bert2Gpt2_for_MachineTranslation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

BERT2GPT2

描述

  • 基于huggingface的Transformers库实现。在编码器端与解码器端分别借助BERT和GPT2预训练成果,以期待模型能够更好的热启动,在使用小规模平行语料进行机器翻译训练任务中能够提供帮助。同时借助GPT2的单向语言模型能力,使生成句子更加顺畅。

支持

  • huggingface/models中支持的BERT模型和GPT2模型作为源语言,目标语言的编码器解码器。

使用

  1. 准备训练文件和验证文件,每行为一对平行语料,默认以“\t”分隔。
  2. 参考run_example.sh设置训练文件路径、模型保存路径、训练参数等。

About

Use BERT as the encoder and GPT2 as the decoder for machine translation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published