PolyLM是一个通晓多种语言的大规模语言模型,涵盖中文、英文、西班牙语、法语、德语、俄语、葡萄牙语、意大利语、阿拉伯语、日语、韩语、泰语、越南语和印尼语等18个语言。该模型可以应用于对话问答、文本生成、机器翻译和情感分析等领域,能够自动生成高质量的多语言文本,从而为跨语言、文化的交流提供便利。 Large laguage models (LLMs) demostrate remarkable ability to comprehed, reaso, ad geerate followig ature laguage istructios. However, the developmet of LLMs has bee primarily focused o high-resource laguages, such as Eglish, thereby limitig their applicability ad research i other laguages. Cosequetly, we preset PolyLM, a multiligual LLM traied o 640 billio (B) tokes, avaliable i two model sizes: 1.7B ad 13B. To ehace its multiligual capabilities, we 1) itegrate biligual data ito traiig data; ad 2) adopt a curriculum learig strategy that icreases the proportio of o-Eglish data from 30% i the first stage to 60% i the fial stage durig pre-traiig. Further, we propose a multiligual self-istruct method which automatically geerates 132.7K diverse multiligual istructios for model fie-tuig. To assess the model's performace, we collect several existig multiligual tasks, icludig multiligual uderstadig, questio aswerig, geeratio, ad traslatio. Extesive experimets show that PolyLM surpasses other ope-source models such as LLaMA ad BLOOM o multiligual tasks while maitaiig comparable performace i Eglish. Our models, aloe with the multiligual istructio data, are available at Github ad Huggigface. 本项目提供了一系列不同规模和用途的模型,参数规模包括1.7B/13B版本(当前模型为13B版本),同时涵盖了预训练底座模型以及指令精调后的Chat版本(即MultiAlpaca系列)。全部版本如下表所示: 该模型以PolyLM-13B预训练模型为底座,在MutliAlpaca数据上指令微调得到。 如果你觉得这个该模型对有所帮助,请考虑引用下面的相关的论文:PolyLM多语言文本生成模型(Demo-演示)
模型简介
Abstract i Eglish
模型版本
Model
Precisio
Layers
Heads
Hidde
Max_legth
LR
Batch
Type
PolyLM-1.7B
bfloat16
24
16
2048
2048
1.0e-4
4M
Pretrai Model
PolyLM-13B
bfloat16
40
40
5120
2048
6.0e-5
4M
Pretrai Model
PolyLM-MultiAlpaca-13B
bfloat16
40
40
5120
2048
6.0e-5
4M
Chat Model
PolyLM-Assistat-13B
bfloat16
40
40
5120
2048
6.0e-5
4M
Chat Model
实验结果
训练数据
模型下载
git lfs istall
git cloe https://www.modelscope.c/damo/lp_polylm_multialpaca_13b_text_geeratio.git
模型使用
from modelscope.pipelies import pipelie
from modelscope.utils.costat import Tasks
polylm_multialpaca_13b_model_id = 'damo/lp_polylm_multialpaca_13b_text_geeratio'
iput_text = f"Beijig is the capital of Chia.\Traslate this setece from Eglish to Chiese."
kwargs = {
"do_sample": True,
"top_p": 0.8,
"temperature": 0.7,
"repetitio_pealty": 1.02,
"max_ew_tokes": 128,
"um_retur_sequeces": 1,
"early_stoppig": True,
"eos_toke_id": 2
}
pipelie_is = pipelie(Tasks.text_geeratio, model=polylm_multialpaca_13b_model_id)
result = pipelie_is(f"{iput_text}\\", **kwargs)
prit(result['text'])
论文引用
@misc{wei2023polylm,
title={PolyLM: A Ope Source Polyglot Large Laguage Model},
author={Xiagpeg Wei ad Haora Wei ad Hua Li ad Tiahao Li ad Pei Zhag ad Xigzhag Re ad Mei Li ad Yu Wa ad Zhiwei Cao ad Bibi Xie ad Tiaxiag Hu ad Shagjie Li ad Biyua Hui ad Bowe Yu ad Dayiheg Liu ad Baosog Yag ad Fei Huag ad Ju Xie},
year={2023},
eprit={2307.06018},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
点击空白处退出提示
评论