🚀 opus-mt-tc-big-en-et
这是一个用于将英语(en)翻译成爱沙尼亚语(et)的神经机器翻译模型。该模型属于[OPUS - MT项目](https://github.com/Helsinki - NLP/Opus - MT)的一部分,此项目致力于让神经机器翻译模型广泛适用于世界上多种语言。所有模型最初都使用[Marian NMT](https://marian - nmt.github.io/)这一出色的框架进行训练,它是一个用纯C++编写的高效NMT实现。这些模型通过huggingface的transformers库转换为pyTorch格式。训练数据来自OPUS,训练流程采用[OPUS - MT - train](https://github.com/Helsinki - NLP/Opus - MT - train)的程序。
- 相关出版物:[OPUS - MT – Building open translation services for the World](https://aclanthology.org/2020.eamt - 1.61/) 和 [The Tatoeba Translation Challenge – Realistic Data Sets for Low Resource and Multilingual MT](https://aclanthology.org/2020.wmt - 1.139/)(如果使用此模型,请引用)
@inproceedings{tiedemann - thottingal - 2020 - opus,
title = "{OPUS}-{MT} {--} Building open translation services for the World",
author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
month = nov,
year = "2020",
address = "Lisboa, Portugal",
publisher = "European Association for Machine Translation",
url = "https://aclanthology.org/2020.eamt - 1.61",
pages = "479--480",
}
@inproceedings{tiedemann - 2020 - tatoeba,
title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
author = {Tiedemann, J{\"o}rg},
booktitle = "Proceedings of the Fifth Conference on Machine Translation",
month = nov,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2020.wmt - 1.139",
pages = "1174--1182",
}
🚀 快速开始
本模型可用于将英语翻译成爱沙尼亚语,下面为你展示使用示例。
✨ 主要特性
- 属于OPUS - MT项目,致力于提供多语言的机器翻译服务。
- 基于Marian NMT框架训练,转换为pyTorch格式。
- 使用来自OPUS的训练数据和OPUS - MT - train的训练流程。
📦 安装指南
文档未提及具体安装步骤,故跳过此章节。
💻 使用示例
基础用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
">>est<< A cab is waiting.",
">>vro<< Where do you live?"
]
model_name = "pytorch - models/opus - mt - tc - big - en - et"
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = MarianMTModel.from_pretrained(model_name)
translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
for t in translated:
print( tokenizer.decode(t, skip_special_tokens=True) )
高级用法
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki - NLP/opus - mt - tc - big - en - et")
print(pipe(">>est<< A cab is waiting."))
📚 详细文档
模型信息
属性 |
详情 |
发布时间 |
2022 - 03 - 13 |
源语言 |
英语(eng) |
目标语言 |
爱沙尼亚语(est) |
模型类型 |
transformer - big |
训练数据 |
opusTCv20210807 + bt ([数据来源](https://github.com/Helsinki - NLP/Tatoeba - Challenge)) |
分词方式 |
SentencePiece (spm32k,spm32k) |
原始模型 |
[opusTCv20210807 + bt_transformer - big_2022 - 03 - 13.zip](https://object.pouta.csc.fi/Tatoeba - MT - models/eng - est/opusTCv20210807 + bt_transformer - big_2022 - 03 - 13.zip) |
更多模型信息 |
[OPUS - MT eng - est README](https://github.com/Helsinki - NLP/Tatoeba - Challenge/tree/master/models/eng - est/README.md) |
基准测试
语言对 |
测试集 |
chr - F |
BLEU |
句子数量 |
单词数量 |
eng - est |
tatoeba - test - v2021 - 08 - 07 |
0.71255 |
53.4 |
1359 |
7992 |
eng - est |
flores101 - devtest |
0.61306 |
28.3 |
1012 |
19788 |
eng - est |
newsdev2018 |
0.57225 |
25.2 |
2000 |
34492 |
eng - est |
newstest2018 |
0.58540 |
26.7 |
2000 |
36269 |
- 测试集翻译结果:[opusTCv20210807 + bt_transformer - big_2022 - 03 - 13.test.txt](https://object.pouta.csc.fi/Tatoeba - MT - models/eng - est/opusTCv20210807 + bt_transformer - big_2022 - 03 - 13.test.txt)
- 测试集得分:[opusTCv20210807 + bt_transformer - big_2022 - 03 - 13.eval.txt](https://object.pouta.csc.fi/Tatoeba - MT - models/eng - est/opusTCv20210807 + bt_transformer - big_2022 - 03 - 13.eval.txt)
- 基准测试结果:benchmark_results.txt
- 基准测试输出:benchmark_translations.zip
致谢
本工作得到了以下项目和机构的支持:
- [欧洲语言网格](https://www.european - language - grid.eu/)的[试点项目2866](https://live.european - language - grid.eu/catalogue/#/resource/projects/2866)。
- [FoTran项目](https://www.helsinki.fi/en/researchgroups/natural - language - understanding - with - cross - lingual - grounding),由欧洲研究理事会(ERC)在欧盟的“地平线2020”研究与创新计划(资助协议编号771113)下资助。
- MeMAD项目,由欧盟的“地平线2020”研究与创新计划(资助协议编号780069)资助。
同时,感谢芬兰CSC - 科学信息技术中心提供的慷慨计算资源和IT基础设施。
模型转换信息
属性 |
详情 |
transformers版本 |
4.16.2 |
OPUS - MT git哈希值 |
3405783 |
转换时间 |
Wed Apr 13 17:00:19 EEST 2022 |
转换机器 |
LM0 - 400 - 22516.local |
🔧 技术细节
文档未提及具体技术实现细节,故跳过此章节。
📄 许可证
本模型使用CC - BY - 4.0许可证。