translation · MarianMT 6+6 Japanese→English · q8 · WASM · 108.71 MB · Apache-2.0

Opus-MT Japanese → English

University of Helsinki's OPUS-MT JA→EN (Helsinki-NLP/opus-mt-ja-en, quantized to 108.71 MB INT8 ONNX in Xenova/opus-mt-ja-en) is a dedicated 6+6 MarianMT SentencePiece neural translator handling unsegmented mixed Kanji + Hiragana + Katakana + full-width Japanese punctuation (。?!「」) directly in CPU WebAssembly — 100% private, zero cloud APIs, offline after first cache.

Runs in browser · WASM translation 108.71 MB q8 ONNX Apache-2.0 MarianMT · 60,716 SentencePiece

1 · On-device model (108.71 MB q8 WASM · encoder 50.71 MB + decoder 58.00 MB)

2 · Live Japanese → English Neural Translator

Pick a curated Japanese sample, type or paste (Ctrl/Cmd+V) text, or drop/upload a .txt, .md, .srt, or .csv file. All inference runs off the main thread in a dedicated Web Worker.

Curated Japanese presets (Tech, Travel, Keigo, Casual, News)
Drop a Japanese .txt / .md / .srt / .csv file here, paste with Ctrl/Cmd+V, or choose a local file:
0 chars

English translation

Waiting for run
Prepare Opus-MT JA→EN above and click Translate to run real on-device MarianMT inference.

Prepare Opus-MT JA→EN above to translate Japanese locally in CPU WebAssembly.

Latency—
Throughput—
Src → Tgt tokens—
Script mix—
Token fertility—
Backend · dtypeWASM · q8
NaN count—

3 · Sentence Alignment & SentencePiece Script Breakdown

MarianMT caps each sequence at 512 tokens. Segmenting on Japanese terminators (。?!) preserves clause boundaries and exposes per-segment timing plus SentencePiece Kanji / Hiragana / Katakana subword fertility.

Sentence-by-sentence Japanese to English translation alignment
# Japanese segment English translation Tokens (in→out) Latency
Run a translation above to inspect sentence-by-sentence alignment.

Real SentencePiece Subwords (MarianTokenizer · 60,716 vocab)

Script subword counts: —

Run a translation to inspect real MarianTokenizer SentencePiece subwords.

4 · At a Glance, Show the Code & Use-Case Ladder

Model card and runtime specifications for Helsinki-NLP/opus-mt-ja-en
Upstream model Helsinki-NLP/opus-mt-ja-en (Tatoeba.ja.en: BLEU 41.7 · chr-F 0.589)
Browser ONNX repo Xenova/opus-mt-ja-en (encoder_model_quantized.onnx 50.71 MB + decoder_model_merged_quantized.onnx 58.00 MB = 108.71 MB q8)
Pipeline task & runtime translation · @huggingface/transformers@3.7.5 (shared pin in lib/webai.js) · CPU WASM
Architecture MarianMTModel (6 encoder + 6 decoder layers, d_model=512, 8 heads, ffn=2048, swish, max_length=512, vocab_size=60716)
Special tokens pad=<pad> (60715, also decoder_start_token_id), eos=</s> (0), unk=<unk> · pair baked into weights
License Apache-2.0 (University of Helsinki Language Technology Research Group)
Show the code — Real Transformers.js MarianMT inference & streaming
Show the code — Japanese sentence segmentation (。?!) for 512-token safety