🚀 opus-mt-tc-big-tr-en
这是一个用于从土耳其语(tr)翻译成英语(en)的神经机器翻译模型。该模型能够高效准确地完成土耳其语到英语的翻译任务,为语言交流和信息传播提供了有力支持。
🚀 快速开始
模型简介
此模型是 [OPUS - MT 项目](https://github.com/Helsinki - NLP/Opus - MT) 的一部分,该项目致力于让神经机器翻译模型广泛适用于世界上多种语言。所有模型最初使用 [Marian NMT](https://marian - nmt.github.io/) 这一出色的框架进行训练,它是一个用纯 C++ 编写的高效神经机器翻译实现。这些模型通过 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",
}
✨ 主要特性
- 多语言支持:支持土耳其语到英语的翻译。
- 高效训练:基于强大的 Marian NMT 框架训练,保证了模型的性能。
- 广泛应用:可用于多种场景下的语言翻译。
📦 安装指南
文档未提及具体安装步骤,暂不提供。
💻 使用示例
基础用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"Allahsızlığı Yayma Kürsüsü başkanıydı.",
"Tom'a ne olduğunu öğrenin."
]
model_name = "pytorch - models/opus - mt - tc - big - tr - en"
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 - tr - en")
print(pipe("Allahsızlığı Yayma Kürsüsü başkanıydı."))
📚 详细文档
模型信息
属性 |
详情 |
发布日期 |
2022 - 03 - 17 |
源语言 |
土耳其语(tur) |
目标语言 |
英语(eng) |
模型类型 |
大型变压器(transformer - big) |
训练数据 |
opusTCv20210807 + bt ([源数据](https://github.com/Helsinki - NLP/Tatoeba - Challenge)) |
分词方式 |
SentencePiece(spm32k,spm32k) |
原始模型 |
[opusTCv20210807 + bt_transformer - big_2022 - 03 - 17.zip](https://object.pouta.csc.fi/Tatoeba - MT - models/tur - eng/opusTCv20210807 + bt_transformer - big_2022 - 03 - 17.zip) |
更多信息 |
[OPUS - MT tur - eng README](https://github.com/Helsinki - NLP/Tatoeba - Challenge/tree/master/models/tur - eng/README.md) |
基准测试
语言对 |
测试集 |
chr - F |
BLEU |
句子数量 |
单词数量 |
tur - eng |
tatoeba - test - v2021 - 08 - 07 |
0.71895 |
57.6 |
13907 |
109231 |
tur - eng |
flores101 - devtest |
0.64152 |
37.6 |
1012 |
24721 |
tur - eng |
newsdev2016 |
0.58658 |
32.1 |
1001 |
21988 |
tur - eng |
newstest2016 |
0.56960 |
29.3 |
3000 |
66175 |
tur - eng |
newstest2017 |
0.57455 |
29.7 |
3007 |
67703 |
tur - eng |
newstest2018 |
0.58488 |
30.7 |
3000 |
68725 |
- 测试集翻译:[opusTCv20210807 + bt_transformer - big_2022 - 03 - 17.test.txt](https://object.pouta.csc.fi/Tatoeba - MT - models/tur - eng/opusTCv20210807 + bt_transformer - big_2022 - 03 - 17.test.txt)
- 测试集分数:[opusTCv20210807 + bt_transformer - big_2022 - 03 - 17.eval.txt](https://object.pouta.csc.fi/Tatoeba - MT - models/tur - eng/opusTCv20210807 + bt_transformer - big_2022 - 03 - 17.eval.txt)
- 基准测试结果:benchmark_results.txt
- 基准测试输出:benchmark_translations.zip
🔧 技术细节
模型转换信息
- transformers 版本:4.16.2
- OPUS - MT git 哈希值:3405783
- 转换时间:2022 年 4 月 13 日星期三 20:02:48 EEST
- 转换机器:LM0 - 400 - 22516.local
📄 许可证
本模型采用 CC - BY - 4.0 许可证。
致谢
这项工作得到了以下项目的支持:
- [欧洲语言网格](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),由欧盟的“地平线 2020”研究和创新计划下的欧洲研究理事会(ERC)资助(资助协议编号 771113)。
- MeMAD 项目,由欧盟的“地平线 2020”研究和创新计划资助(资助协议编号 780069)。
同时,我们感谢 CSC -- 芬兰科学信息技术中心 提供的慷慨计算资源和 IT 基础设施。