🚀 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