你确认删除该任务么?此任务一旦删除不可恢复。
zhangyh02 9a78171674 | 2 年前 | |
---|---|---|
.idea | 2 年前 | |
dict_dir | 2 年前 | |
examples | 2 年前 | |
fairseq | 2 年前 | |
images | 2 年前 | |
m2m_100 | 2 年前 | |
sh_dir | 2 年前 | |
user_dir | 2 年前 | |
README-zh.md | 2 年前 | |
README.md | 2 年前 | |
数据统计信息.xlsx | 2 年前 | |
通言-PPT.pptx | 2 年前 |
中文|English
PCL-tongyan is a multi-language machine translation model. The single model supports 17 minority languages translation with Chinese, it also supports translation between any two languages. PCL-Tongyan is a multilingual machine translation model improved on the structure of M2M-100 model. Through parameter reusing and incremental training, the model parameters are increased from 1.2B to 13.2B, which greatly improves the translation performance of multiple minority languages. We use a lifelong learning approach based on dynamic playback, PCL-Tongyan can continuously learn new language translation without forgetting old languages. More details are given in the PPT.
https://git.pcl.ac.cn/PCMachineTranslation/PCMT/src/branch/master/datasets
-- See Excel for data statistics
Switch from normal model to MOE model
python Change_1.2B_To_16Moe_Version.py
Convert distributed MOE model to single card deployment
python Comerge_16To1.py
Fine-tuning multilingual translation task
bash sh_dir/Train-16moe-SiLu-Inhert.sh 16 GShardGate 2
Test bleu on xx->zh and zh->xx direction
bash sh_dir/Test-16Moe-multi-silu.sh 0 xx
Data processing
bash sh_dir/process.sh
import requests
def Tongyan_Translate(sentences=None,direction=None,PyTorch_REST_API_URL = 'http://192.168.202.124:5000/predict'):
c_lgs=['Chinese (zh)', 'Italian (it)', 'German (DE)', 'Czech (cs)', 'Dutch (nl)', 'Portuguese (pt)',
'bahasa Indonesia (id)', 'Bulgarian (bg)', 'bosnia (bs)', 'Greek (el)', 'farsi (fa)', 'Croatian (hr)',
'Hungarian(hu)', 'Estonian (et)', 'Hebrew (he)' ,'Slovenia (sl)', 'polish (pl)', 'Turkish (tr)', 'Urdu (ur)']
lgs=['zh','it','de','cs','nl','pt','id','bg','bs','bs','el','fa','hr','hu','et','he','sl','pl','tr','ur']
src,tgt=direction.split("-")
if src not in lgs or tgt not in lgs:
print(f"Please enter the languages in the following collection in xx-XX format: \n{','.join(c_lgs)}")
return None
else:
payload = {'data': [direction,sentences]}
# Submit the request.
r = requests.post(PyTorch_REST_API_URL, data=payload).json()
if r['success']:
translations=[sent for sent in enumerate(r['predictions'])]
return translations
else:
return None
if __name__ == '__main__':
sentences = [
"I want to eat an apple ",
"Today is a fine day! ",
"Hello, I am THE senior engineer OF PCL XXX, please give me your advice!"
]
direction = "zh-pt"
res=Tongyan_Translate(sentences=sentences,direction=direction)
print(res)
fairseq 1.0.0a0+2fd9d8a
fastmoe 0.2.0
鹏程-通言模型 通言模型是在M2M-100模型结构上进行改进的多语种机器翻译模型,通过参数复用和增量式训练,将模型参数从1.2B提升至13.2B,在一带一路多个小语种的翻译上大幅提升。
Text Python C++ Cuda other
尊敬的启智用户
感谢您一直以来对Openl启智社区AI协作平台的支持。为了保障您的使用权益和确保网络安全,我们于2024年1月份更新了《Openl启智社区AI协作平台使用协议》。更新后的协议明确了用户禁止使用内网穿透工具的条例。您单击“同意并继续”后,便可以继续使用我们的服务。感谢您的合作与理解。
更多协议内容,请参考《Openl启智社区AI协作平台使用协议》