🚀 opus-mt-tc-big-en-ar
このモデルは英語(en)からアラビア語(ar)への翻訳を行うニューラル機械翻訳モデルです。
OPUS-MTプロジェクトの一環として開発され、世界中の多くの言語に対して機械翻訳モデルを広く利用可能にする取り組みの一部です。
🚀 クイックスタート
このモデルは、英語からアラビア語への翻訳を行うために使用できます。以下に使用例を示します。
✨ 主な機能
- 英語からアラビア語への翻訳を行うことができます。
- 複数のターゲット言語に対応した多言語翻訳モデルです。
📦 インストール
このモデルを使用するには、transformers
ライブラリが必要です。以下のコマンドでインストールできます。
pip install transformers
💻 使用例
基本的な使用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
">>ara<< I can't help you because I'm busy.",
">>ara<< I have to write a letter. Do you have some paper?"
]
model_name = "pytorch-models/opus-mt-tc-big-en-ar"
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-ar")
print(pipe(">>ara<< I can't help you because I'm busy."))
📚 ドキュメント
モデル情報
ベンチマーク
言語ペア |
テストセット |
chr-F |
BLEU |
文数 |
単語数 |
eng-ara |
tatoeba-test-v2021-08-07 |
0.48813 |
19.8 |
10305 |
61356 |
eng-ara |
flores101-devtest |
0.61154 |
29.4 |
1012 |
21357 |
eng-ara |
tico19-test |
0.60075 |
30.0 |
2100 |
51339 |
モデル変換情報
- transformersバージョン: 4.16.2
- OPUS-MTのgitハッシュ: 3405783
- ポート時間: Wed Apr 13 16:37:31 EEST 2022
- ポートマシン: LM0-400-22516.local
🔧 技術詳細
このモデルは、Marian NMTというフレームワークを使用して訓練され、huggingfaceのtransformers
ライブラリを使用してpyTorchに変換されています。訓練データはOPUSから取得され、訓練パイプラインはOPUS-MT-trainの手順に従っています。
📄 ライセンス
このモデルはCC BY 4.0ライセンスの下で提供されています。
引用情報
@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",
}
謝辞
この研究は、European Language Gridのpilot project 2866、FoTranプロジェクト、MeMADプロジェクトによって支援されています。また、フィンランドのCSC -- IT Center for Scienceから提供された計算資源とITインフラストラクチャに感謝します。