Views
No views yet
Helsinki-NLP/opus-tatoeba-en-ja, packaged for offline use in Playto.Note: This is the Tatoeba Challenge variant, not the olderopus-mt-en-jap(which is trained primarily on biblical parallel corpora and produces archaic Japanese unsuitable for general/game text). Always prefer this Tatoeba variant for production en→ja use.
Helsinki-NLP/opus-tatoeba-en-ja — MarianMT, transformer-align architecture, Tatoeba Challenge dataset1pip install ctranslate2 transformers sentencepiece
2ct2-transformers-converter \
3 --model Helsinki-NLP/opus-tatoeba-en-ja \
4 --output_dir opus-tatoeba-en-ja-ct2 \
5 --quantization int8 \
6 --copy_files source.spm target.spm
7tar czf opus-tatoeba-en-ja-ct2.tar.gz opus-tatoeba-en-ja-ct2opus-tatoeba-en-ja-ct2.tar.gz)| File | Size | Purpose |
|---|---|---|
model.bin | ~75 MB | CTranslate2 int8 quantized weights |
shared_vocabulary.json | ~1.4 MB | CTranslate2 vocab |
source.spm | ~810 KB | SentencePiece source tokenizer |
target.spm | ~830 KB | SentencePiece target tokenizer |
config.json | ~250 B | CTranslate2 config |
ctranslate2 (Python)1import ctranslate2
2import sentencepiece
3
4translator = ctranslate2.Translator("opus-tatoeba-en-ja-ct2", device="cpu", compute_type="int8")
5sp_source = sentencepiece.SentencePieceProcessor("opus-tatoeba-en-ja-ct2/source.spm")
6sp_target = sentencepiece.SentencePieceProcessor("opus-tatoeba-en-ja-ct2/target.spm")
7
8source_tokens = sp_source.encode("Hello, how are you?", out_type=str) + ["</s>"]
9results = translator.translate_batch([source_tokens])
10print(sp_target.decode(results[0].hypotheses[0]))
11# → "こんにちは、元気?"ct2rs (Rust)1use ct2rs::{Translator, Tokenizer};
2
3let tokenizer = Tokenizer::new("opus-tatoeba-en-ja-ct2")?;
4let translator = Translator::with_tokenizer("opus-tatoeba-en-ja-ct2", tokenizer, /* config */)?;
5let result = translator.translate_batch(&["Hello, how are you?".to_string()], /* options */)?;</s> appended to source token sequences. The ct2rs::Tokenizer wrapper handles this automatically; raw SentencePiece calls must add it manually.merged mode generally outperforms per-line (= honorific / 助詞 / 文末表現 benefit from longer context)Helsinki-NLP/opus-mt-en-jap (= biblical Japanese, ~95 % broken on game text)Helsinki-NLP/opus-tatoeba-en-ja. License is CC-BY 4.0 inherited from upstream.Helsinki-NLP. OPUS-MT — Open Machine Translation Models.
Tatoeba Challenge.
https://github.com/Helsinki-NLP/Tatoeba-Challenge
https://github.com/Helsinki-NLP/Opus-MT