XLM:PyTorch跨语言模型预训练的原始实现

上传者: 42137028 | 上传时间: 2022-05-11 22:56:59 | 文件大小: 110KB | 文件类型: ZIP
XLM 新增:添加了模型。 PyTorch训练的原始实现。 包括: XLM支持多GPU和多节点训练,并包含以下代码: 语言模型预训练: 因果语言模型(CLM) 屏蔽语言模型(MLM) 翻译语言模型(TLM) 胶微调 XNLI微调 有监督/无监督的机器翻译培训: 去噪自动编码器 并行数据训练 在线回译 安装 使用可编辑模式安装python软件包 pip install -e . 依存关系 的Python 3 (当前在版本0.4和1.0上测试) (生成并应用BPE代码) (仅用于清理和标记文本的脚本-无需安装) (用于fp16培训) I.单语语言模型预训练(BERT) 在下面的内容中,我们将说明如何下载和使用我们的预训练的XLM(仅英语)BERT模型。 然后,我们解释了如何训练自己的单语言模型,以及如何在GLUE任务上对其进行微调。 预先训练的英语模型 我

文件下载

资源详情

[{"title":"( 48 个子文件 110KB ) XLM:PyTorch跨语言模型预训练的原始实现","children":[{"title":"XLM-master","children":[{"title":"prepare-xnli.sh <span style='color:#111;'> 2.60KB </span>","children":null,"spread":false},{"title":"glue-xnli.py <span style='color:#111;'> 4.42KB </span>","children":null,"spread":false},{"title":"xlm","children":[{"title":"model","children":[{"title":"memory","children":[{"title":"utils.py <span style='color:#111;'> 4.96KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 34B </span>","children":null,"spread":false},{"title":"query.py <span style='color:#111;'> 9.06KB </span>","children":null,"spread":false},{"title":"memory.py <span style='color:#111;'> 32.41KB </span>","children":null,"spread":false}],"spread":true},{"title":"pretrain.py <span style='color:#111;'> 2.92KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 7.78KB </span>","children":null,"spread":false},{"title":"transformer.py <span style='color:#111;'> 28.91KB </span>","children":null,"spread":false},{"title":"embedder.py <span style='color:#111;'> 4.70KB </span>","children":null,"spread":false}],"spread":true},{"title":"evaluation","children":[{"title":"xnli.py <span style='color:#111;'> 8.36KB </span>","children":null,"spread":false},{"title":"evaluator.py <span style='color:#111;'> 21.75KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"multi-bleu.perl <span style='color:#111;'> 5.11KB </span>","children":null,"spread":false},{"title":"glue.py <span style='color:#111;'> 11.15KB </span>","children":null,"spread":false}],"spread":true},{"title":"utils.py <span style='color:#111;'> 9.70KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"slurm.py <span style='color:#111;'> 6.17KB </span>","children":null,"spread":false},{"title":"optim.py <span style='color:#111;'> 10.13KB </span>","children":null,"spread":false},{"title":"data","children":[{"title":"dataset.py <span style='color:#111;'> 14.29KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"dictionary.py <span style='color:#111;'> 7.58KB </span>","children":null,"spread":false},{"title":"loader.py <span style='color:#111;'> 14.20KB </span>","children":null,"spread":false}],"spread":true},{"title":"logger.py <span style='color:#111;'> 1.83KB </span>","children":null,"spread":false},{"title":"trainer.py <span style='color:#111;'> 36.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"get-data-glue.sh <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"train.py <span style='color:#111;'> 14.60KB </span>","children":null,"spread":false},{"title":"generate-embeddings.ipynb <span style='color:#111;'> 9.39KB </span>","children":null,"spread":false},{"title":"PKM-layer.ipynb <span style='color:#111;'> 13.49KB </span>","children":null,"spread":false},{"title":"get-data-xnli.sh <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false},{"title":"src <span style='color:#111;'> 3B </span>","children":null,"spread":false},{"title":"translate.py <span style='color:#111;'> 5.43KB </span>","children":null,"spread":false},{"title":"get-data-para.sh <span style='color:#111;'> 6.92KB </span>","children":null,"spread":false},{"title":"prepare-glue.sh <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"CONTRIBUTING.md <span style='color:#111;'> 572B </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 18.88KB </span>","children":null,"spread":false},{"title":"tools","children":[{"title":"tokenize.sh <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"segment_th.py <span style='color:#111;'> 355B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 845B </span>","children":null,"spread":false},{"title":"lowercase_and_remove_accent.py <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false}],"spread":false},{"title":"setup.py <span style='color:#111;'> 280B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 38.46KB </span>","children":null,"spread":false},{"title":"get-data-nmt.sh <span style='color:#111;'> 14.66KB </span>","children":null,"spread":false},{"title":"CODE_OF_CONDUCT.md <span style='color:#111;'> 244B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"preprocess.py <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"install-tools.sh <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"get-data-wiki.sh <span style='color:#111;'> 2.07KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明