translation · English→Turkish Transformer-big MarianMT · q8 · WASM · 538.56 MB · CC-BY-4.0
Opus-MT TC-Big English → Turkish
University of Helsinki's OPUS-MT TC-Big EN→TR
(Helsinki-NLP/opus-mt-tc-big-en-tr,
quantized to 538.56 MB first-visit q8 ONNX in
onnx-community/opus-mt-tc-big-en-tr)
is a Transformer-big 6+6 MarianMT encoder-decoder (d_model=1024, 16 heads) translating analytic
English SVO clauses into agglutinative Turkish SOV syntax with full diacritic fidelity
(ğ, ş, ı, İ, ö, ü, ç) — running 100% locally in CPU WebAssembly.
At a glance
| Upstream model |
Helsinki-NLP/opus-mt-tc-big-en-tr
(MarianMT Transformer-big)
|
|---|---|
| Browser ONNX repo |
onnx-community/opus-mt-tc-big-en-tr
(dtype: "q8")
|
| Pipeline task | translation (English en → Turkish tr, no prefix tag) |
| Architecture | 6-layer encoder + 6-layer decoder · d_model=1024 · 16 heads · FFN 4096 · ReLU · 57,060 SentencePiece · 512 max tokens |
| Backend & size | CPU WebAssembly (device: "wasm") · 538.56 MB (538,557,362 B first visit) |
| Benchmarks & license | Tatoeba BLEU 42.3 · FLORES-101 BLEU 31.4 · newstest2017 25.4 · CC-BY-4.0 |
1 · On-device model (538.56 MB q8 WASM · encoder 135.73 MB + decoder 395.72 MB + tokenizer/vocab 7.11 MB)
2 · Live English → Turkish Neural Translation Studio
Select an English preset, type or paste English prose, or drop/upload a .txt, .md,
or .json file anywhere on this page.
.txt, .md, or .json file here,
paste via Ctrl/Cmd+V, or choose a local file:
Turkish Translation (Türkçe)
Waiting for runPrepare Opus-MT TC-Big EN→TR above to translate English prose into Turkish locally in CPU WebAssembly.
3 · See Inside: Turkish Diacritics, Agglutinative Suffixes & SentencePiece Subwords
Inspect live preservation of Turkish's 7 special letters (ğ/Ğ, ş/Ş, ı, İ, ö/Ö, ü/Ü, ç/Ç),
long agglutinated surface words (≥10 characters), sentence-by-sentence decoder latency, and real
57,060-vocabulary MarianTokenizer subwords.
| # | English segment | Turkish translation | Tokens (in→out) | Latency |
|---|---|---|---|---|
| Run a translation above to inspect aligned English→Turkish segments. | ||||
Real MarianTokenizer SentencePiece Subwords
Run a translation to inspect real SentencePiece pieces (▁ word-boundary markers and IDs).
Waiting for first on-device run.
Show the code — Off-main-thread Transformer-big MarianMT inference & NaN check
Show the code — Turkish diacritic & agglutinative morphology analyzer
4 · Why It Matters & Use-Case Ladder
- Zero-server Turkish localization: Translate sensitive legal, medical, HR, or internal product docs directly in CPU WASM without sending strings to external APIs.
- Agglutinative inflection fidelity: Transformer-big capacity (
d_model=1024, 16 heads) preserves vowel harmony (-mi/-mı/-mu/-mü), case endings, and dotted/dotlessİ/ıdistinctions. - Explore the full ladder: Basics (Morphology & Beam Search Lab) · Practical (Multi-File Document & CSV Batch Localizer) · Wild (Turkish Edge-Case Stress Lab) · Multi-model (EN→TR × FLORES-200 Language-Shift Auditor).
How the API works
import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";
const translator = await pipeline("translation", "onnx-community/opus-mt-tc-big-en-tr", {
device: "wasm",
dtype: "q8",
});
const out = await translator(
"Artificial intelligence runs directly inside your browser.",
{ num_beams: 2, max_new_tokens: 256, repetition_penalty: 1.05 }
);
console.log(out[0].translation_text);
5 · References
- Helsinki-NLP/opus-mt-tc-big-en-tr — Upstream Transformer-big MarianMT model card (CC-BY-4.0, Tatoeba BLEU 42.3).
- onnx-community/opus-mt-tc-big-en-tr — Transformers.js-ready quantized ONNX weights (
q8, 538.56 MB). - Tiedemann & Thottingal (2020) — OPUS-MT: Building open translation services for the World.