🚀 opus-mt-tc-big-lt-en
这是一个用于从立陶宛语(lt)翻译到英语(en)的神经机器翻译模型。该模型是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",
}
🚀 快速开始
模型信息
许可证
本模型使用的许可证为cc - by - 4.0。
支持语言
本模型支持立陶宛语(lt)和英语(en)的翻译。
标签
本模型的标签包括:translation、opus - mt - tc。
💻 使用示例
基础用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"Katė sedėjo ant kėdės.",
"Jukiko mėgsta bulves."
]
model_name = "pytorch-models/opus-mt-tc-big-lt-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) )
高级用法
你也可以使用transformers的pipeline来使用OPUS - MT模型,例如:
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-lt-en")
print(pipe("Katė sedėjo ant kėdės."))
📊 基准测试
语言对 |
测试集 |
chr - F |
BLEU |
句子数量 |
单词数量 |
lit - eng |
tatoeba - test - v2021 - 08 - 07 |
0.74881 |
61.6 |
2528 |
17855 |
lit - eng |
flores101 - devtest |
0.60662 |
34.3 |
1012 |
24721 |
lit - eng |
newsdev2019 |
0.59995 |
32.9 |
2000 |
49312 |
lit - eng |
newstest2019 |
0.61742 |
32.3 |
1000 |
25878 |
🙏 致谢
这项工作得到了以下项目的支持:
- [欧洲语言网格](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”研究和创新计划(资助协议编号771113)下的欧洲研究理事会(ERC)资助。
- MeMAD项目,由欧盟的“地平线2020”研究和创新计划资助(资助协议编号780069)。
我们也感谢芬兰科学信息技术中心(CSC)提供的慷慨计算资源和IT基础设施。
🔧 模型转换信息
- transformers版本:4.16.2
- OPUS - MT的git哈希值:3405783
- 转换时间:2022年4月13日星期三19:55:51 EEST
- 转换机器:LM0 - 400 - 22516.local