translation · Arabic RTL→English MarianMT · q8 · WASM · 110.88 MB · Apache-2.0

Opus-MT Arabic → English

University of Helsinki's OPUS-MT AR→EN (Helsinki-NLP/opus-mt-ar-en, quantized to 110.88 MB INT8 ONNX in Xenova/opus-mt-ar-en) is a dedicated 6+6 MarianMT encoder-decoder for right-to-left Arabic script, vocalization diacritics (tashkeel / harakat), Eastern Arabic numerals (٠١٢٣٤٥٦٧٨٩), and mixed Bidi text — running 100% locally in CPU WebAssembly with zero cloud APIs.

Runs in browser · WASM translation 110.88 MB q8 ONNX Apache-2.0 MarianMT · 62.8k SentencePiece

1 · On-device model (110.88 MB q8 WASM · encoder 51.79 MB + decoder 59.09 MB)

2 · Live Arabic RTL → English Neural Translator

Select an Arabic RTL preset, type or paste right-to-left Arabic, or drop/upload a .txt, .md, .srt, or .csv file anywhere below.

Curated Arabic RTL presets (MSA, News, Travel, Email & Vocalized Proverb)
Drop a .txt, .md, .srt, or .csv file here, paste via Ctrl/Cmd+V, or choose a local file:
0 chars

English translation

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

Prepare Opus-MT AR→EN above to translate Arabic RTL prose locally in CPU WebAssembly.

Latency—
Throughput—
Src → Tgt tokens—
Root/affix fertility—
Script & tashkeel—
Backend · dtypeWASM · q8
NaN count—

3 · Sentence Alignment, Script Inspector & MarianTokenizer Subwords

Arabic verbs, attached prepositions (بـ / لـ / كـ), definite article الـ, and optional tashkeel diacritics split into SentencePiece subwords inside the 62,834-token vocabulary.

Arabic letters0
Tashkeel marks0
Alef hamza / ة0 / 0
Eastern / Western digits0 / 0
Bidi Latin chars0
Sentence-by-sentence Arabic RTL to English translation alignment
# Arabic RTL segment English translation Tokens (in→out) Latency
Run a translation above to inspect sentence-by-sentence alignment.

Real SentencePiece Subword Pieces (MarianTokenizer · 62,834 vocab)

Run a translation to inspect real MarianTokenizer subwords and root/affix fertility.

Waiting for first on-device run.

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

Upstream model Helsinki-NLP/opus-mt-ar-en (Tatoeba ar→en: BLEU 49.4 · chr-F 0.661)
Browser ONNX repo Xenova/opus-mt-ar-en (encoder_model_quantized.onnx 51.79 MB + decoder_model_merged_quantized.onnx 59.09 MB = 110.88 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=62834)
Special tokens pad=<pad> (62833, 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 & NaN check
Show the code — Arabic RTL sentence segmentation for 512-token safety