🚀 opus-mt-tc-big-en-zle
このモデルは、英語(en)から東スラブ諸語(zle)への翻訳を行うニューラル機械翻訳モデルです。世界中の多くの言語に対してニューラル機械翻訳モデルを広く利用可能にする取り組みである[OPUS - MTプロジェクト](https://github.com/Helsinki - NLP/Opus - MT)の一部です。すべてのモデルは、純粋なC++で書かれた効率的なNMT実装である[Marian NMT](https://marian - nmt.github.io/)の素晴らしいフレームワークを使用して最初にトレーニングされています。これらのモデルは、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",
}
🚀 クイックスタート
このモデルを使用するには、以下の手順でコードを実行することができます。
基本的な使用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
">>rus<< Are they coming as well?",
">>rus<< I didn't let Tom do what he wanted to do."
]
model_name = "pytorch-models/opus-mt-tc-big-en-zle"
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-zle")
print(pipe(">>rus<< Are they coming as well?"))
✨ 主な機能
- 英語から東スラブ諸語(ベラルーシ語、ロシア語、ウクライナ語)への翻訳が可能です。
- 複数のターゲット言語に対応した多言語翻訳モデルです。
📦 インストール
このモデルを使用するには、transformers
ライブラリが必要です。以下のコマンドでインストールできます。
pip install transformers
📚 ドキュメント
モデル情報
属性 |
詳情 |
リリース日 |
2022 - 03 - 13 |
ソース言語 |
英語 (eng) |
ターゲット言語 |
ベラルーシ語 (bel), ロシア語 (rus), ウクライナ語 (ukr) |
有効なターゲット言語ラベル |
>>bel<< >>rus<< >>ukr<< |
モデルタイプ |
transformer - big |
トレーニングデータ |
opusTCv20210807+bt ([ソース](https://github.com/Helsinki - NLP/Tatoeba - Challenge)) |
トークナイゼーション |
SentencePiece (spm32k,spm32k) |
オリジナルモデル |
[opusTCv20210807+bt_transformer - big_2022 - 03 - 13.zip](https://object.pouta.csc.fi/Tatoeba - MT - models/eng - zle/opusTCv20210807+bt_transformer - big_2022 - 03 - 13.zip) |
リリースされたモデルの詳細情報 |
[OPUS - MT eng - zle README](https://github.com/Helsinki - NLP/Tatoeba - Challenge/tree/master/models/eng - zle/README.md) |
モデルに関する詳細情報 |
MarianMT |
これは複数のターゲット言語を持つ多言語翻訳モデルです。>>id<<
(id = 有効なターゲット言語ID)の形式で文頭に言語トークンが必要です。例えば、>>bel<<
です。
ベンチマーク
言語ペア |
テストセット |
chr - F |
BLEU |
文数 |
単語数 |
eng - bel |
tatoeba - test - v2021 - 08 - 07 |
0.50345 |
24.9 |
2500 |
16237 |
eng - rus |
tatoeba - test - v2021 - 08 - 07 |
0.66182 |
45.5 |
19425 |
134296 |
eng - ukr |
tatoeba - test - v2021 - 08 - 07 |
0.60175 |
37.7 |
13127 |
80998 |
eng - bel |
flores101 - devtest |
0.42078 |
11.2 |
1012 |
24829 |
eng - rus |
flores101 - devtest |
0.59654 |
32.7 |
1012 |
23295 |
eng - ukr |
flores101 - devtest |
0.60131 |
32.1 |
1012 |
22810 |
eng - rus |
newstest2012 |
0.62842 |
36.8 |
3003 |
64790 |
eng - rus |
newstest2013 |
0.54627 |
26.9 |
3000 |
58560 |
eng - rus |
newstest2014 |
0.68348 |
43.5 |
3003 |
61603 |
eng - rus |
newstest2015 |
0.62621 |
34.9 |
2818 |
55915 |
eng - rus |
newstest2016 |
0.60595 |
33.1 |
2998 |
62014 |
eng - rus |
newstest2017 |
0.64249 |
37.3 |
3001 |
60253 |
eng - rus |
newstest2018 |
0.61219 |
32.9 |
3000 |
61907 |
eng - rus |
newstest2019 |
0.57902 |
31.8 |
1997 |
48147 |
eng - rus |
newstest2020 |
0.52939 |
25.5 |
2002 |
47083 |
eng - rus |
tico19 - test |
0.59314 |
33.7 |
2100 |
55843 |
- テストセットの翻訳結果: [opusTCv20210807+bt_transformer - big_2022 - 03 - 13.test.txt](https://object.pouta.csc.fi/Tatoeba - MT - models/eng - zle/opusTCv20210807+bt_transformer - big_2022 - 03 - 13.test.txt)
- テストセットのスコア: [opusTCv20210807+bt_transformer - big_2022 - 03 - 13.eval.txt](https://object.pouta.csc.fi/Tatoeba - MT - models/eng - zle/opusTCv20210807+bt_transformer - big_2022 - 03 - 13.eval.txt)
- ベンチマーク結果: benchmark_results.txt
- ベンチマーク出力: benchmark_translations.zip
モデル変換情報
- transformersバージョン: 4.16.2
- OPUS - MTのgitハッシュ: 1bdabf7
- ポート時間: Thu Mar 24 01:58:40 EET 2022
- ポートマシン: LM0 - 400 - 22516.local
🔧 技術詳細
このモデルは、Marian NMT
フレームワークを使用してトレーニングされ、transformers
ライブラリを使用してpyTorchに変換されています。トークナイゼーションにはSentencePiece
を使用しています。
📄 ライセンス
このモデルは、CC - BY - 4.0ライセンスの下で提供されています。
謝辞
この研究は、[European Language Grid](https://www.european - language - grid.eu/)の[pilot project 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)(欧州研究評議会(ERC)による欧州連合のHorizon 2020研究・イノベーションプログラム(助成協定番号771113)による資金提供を受けています)、およびMeMADプロジェクト(欧州連合のHorizon 2020研究・イノベーションプログラム(助成協定番号780069)による資金提供を受けています)によって支援されています。また、フィンランドのCSC -- IT Center for Scienceによって提供される寛大な計算リソースとITインフラストラクチャに感謝します。