🚀 opus-mt-tc-big-zle-de
這是一個用於將東斯拉夫語(zle)翻譯成德語(de)的神經機器翻譯模型。本模型是 [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",
}
📚 詳細文檔
模型信息
屬性 |
詳情 |
發佈時間 |
2022 - 03 - 19 |
源語言 |
白俄羅斯語(bel)、俄語(rus)、烏克蘭語(ukr) |
目標語言 |
德語(deu) |
模型類型 |
transformer - big |
訓練數據 |
opusTCv20210807 ([來源](https://github.com/Helsinki - NLP/Tatoeba - Challenge)) |
分詞方式 |
SentencePiece (spm32k,spm32k) |
原始模型 |
[opusTCv20210807_transformer - big_2022 - 03 - 19.zip](https://object.pouta.csc.fi/Tatoeba - MT - models/zle - deu/opusTCv20210807_transformer - big_2022 - 03 - 19.zip) |
更多模型信息 |
[OPUS - MT zle - deu README](https://github.com/Helsinki - NLP/Tatoeba - Challenge/tree/master/models/zle - deu/README.md) |
支持語言
- 白俄羅斯語(be)
- 德語(de)
- 俄語(ru)
- 烏克蘭語(uk)
- 東斯拉夫語(zle)
標籤
許可證
本模型使用 CC - BY - 4.0 許可證。
模型索引
本模型在不同數據集上的翻譯任務表現如下:
任務名稱 |
數據集 |
BLEU值 |
俄語到德語翻譯(Translation rus - deu) |
flores101 - devtest |
26.1 |
烏克蘭語到德語翻譯(Translation ukr - deu) |
flores101 - devtest |
28.1 |
白俄羅斯語到德語翻譯(Translation bel - deu) |
tatoeba - test - v2021 - 08 - 07 |
44.8 |
俄語到德語翻譯(Translation rus - deu) |
tatoeba - test - v2021 - 08 - 07 |
51.8 |
烏克蘭語到德語翻譯(Translation ukr - deu) |
tatoeba - test - v2021 - 08 - 07 |
54.7 |
俄語到德語翻譯(Translation rus - deu) |
newstest2013 |
25.2 |
💻 使用示例
基礎用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"Это был по-настоящему прекрасный день.",
"Дождь кончился?"
]
model_name = "pytorch-models/opus-mt-tc-big-zle-de"
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 的管道來使用 OPUS - MT 模型,示例如下:
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-zle-de")
print(pipe("Это был по-настоящему прекрасный день."))
🔍 基準測試
- 測試集翻譯結果:[opusTCv20210807_transformer - big_2022 - 03 - 19.test.txt](https://object.pouta.csc.fi/Tatoeba - MT - models/zle - deu/opusTCv20210807_transformer - big_2022 - 03 - 19.test.txt)
- 測試集得分:[opusTCv20210807_transformer - big_2022 - 03 - 19.eval.txt](https://object.pouta.csc.fi/Tatoeba - MT - models/zle - deu/opusTCv20210807_transformer - big_2022 - 03 - 19.eval.txt)
- 基準測試結果:benchmark_results.txt
- 基準測試輸出:benchmark_translations.zip
語言對 |
測試集 |
chr - F |
BLEU |
句子數量 |
單詞數量 |
bel - deu |
tatoeba - test - v2021 - 08 - 07 |
0.63720 |
44.8 |
551 |
4182 |
rus - deu |
tatoeba - test - v2021 - 08 - 07 |
0.69768 |
51.8 |
12800 |
98842 |
ukr - deu |
tatoeba - test - v2021 - 08 - 07 |
0.70860 |
54.7 |
10319 |
64646 |
bel - deu |
flores101 - devtest |
0.47052 |
12.9 |
1012 |
25094 |
rus - deu |
flores101 - devtest |
0.56159 |
26.1 |
1012 |
25094 |
ukr - deu |
flores101 - devtest |
0.57251 |
28.1 |
1012 |
25094 |
rus - deu |
newstest2012 |
0.49257 |
19.8 |
3003 |
72886 |
rus - deu |
newstest2013 |
0.54015 |
25.2 |
3000 |
63737 |
🙏 致謝
本工作得到了以下項目和機構的支持:
- [歐洲語言網格](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 哈希值:1bdabf7
- 轉換時間:2022 年 3 月 23 日星期三 22:16:45 EET
- 轉換機器:LM0 - 400 - 22516.local