🚀 opus-mt-tc-big-en-lt
这是一个用于将英语(en)翻译成立陶宛语(lt)的神经机器翻译模型。该模型属于 OPUS - MT 项目 的一部分,此项目致力于让神经机器翻译模型广泛适用于世界上多种语言。所有模型最初都使用 Marian NMT 这一出色的框架进行训练,它是一个用纯 C++ 编写的高效 NMT 实现。这些模型已通过 huggingface 的 transformers 库转换为 pyTorch 格式。训练数据来自 OPUS,训练流程采用 OPUS - MT - train 的程序。
@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 格式。
📦 安装指南
文档未提及安装步骤,暂不提供。
💻 使用示例
基础用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"A cat was sitting on the chair.",
"Yukiko likes potatoes."
]
model_name = "pytorch-models/opus-mt-tc-big-en-lt"
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-lt")
print(pipe("A cat was sitting on the chair."))
📚 详细文档
模型信息
基准测试
语言对 |
测试集 |
chr - F |
BLEU |
句子数量 |
单词数量 |
eng - lit |
tatoeba - test - v2021 - 08 - 07 |
0.67434 |
39.5 |
2528 |
14942 |
eng - lit |
flores101 - devtest |
0.59593 |
28.0 |
1012 |
20695 |
eng - lit |
newsdev2019 |
0.58444 |
26.6 |
2000 |
39627 |
eng - lit |
newstest2019 |
0.51559 |
17.5 |
998 |
19711 |
🔧 技术细节
文档未提及技术实现细节,暂不提供。
📄 许可证
本模型使用的许可证为 cc - by - 4.0。
致谢
这项工作得到了以下机构的支持:
我们也感谢 CSC -- 芬兰科学信息技术中心 提供的慷慨计算资源和 IT 基础设施。
模型转换信息
- transformers 版本:4.16.2
- OPUS - MT git 哈希值:3405783
- 转换时间:2022 年 4 月 13 日星期三 17:42:39 EEST
- 转换机器:LM0 - 400 - 22516.local