translation · MarianMT Hangul/Hanja/Konglish→English · q8 · WASM · 113.11 MB · Apache-2.0

Opus-MT Korean → English

University of Helsinki's dedicated 6+6 MarianMT encoder-decoder (Helsinki-NLP/opus-mt-ko-en, quantized to 113.11 MB INT8 ONNX in Xenova/opus-mt-ko-en) translates Korean Hangul, Hanja, and mixed Konglish/English prose into English offline on CPU WebAssembly — with live SentencePiece Hangul jamo/syllable fertility inspection and real-time token streaming.

Runs in browser · WASM translation 113.11 MB q8 ONNX Apache-2.0 MarianMT · 65,001 SentencePiece

1 · On-device model (113.11 MB q8 WASM · encoder 52.90 MB + decoder 60.21 MB)

2 · Live Korean → English MarianMT Studio

Pick one of 5 domain presets, type or paste Korean text (even with Ctrl/Cmd+V anywhere on the page), or drop/upload a .txt, .md, .srt, or .csv file. Inference runs off the main thread in a dedicated module Web Worker.

Curated Korean domain presets
Drop a .txt, .md, .srt, or .csv file here, paste via clipboard, or choose a file:
0 chars

English translation

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

Prepare Opus-MT KO→EN above to translate Korean locally in CPU WebAssembly.

Latency—
Throughput—
Src → Tgt tokens—
Eojeol fertility—
Script · Hanja—
NaN count—

3 · See Inside MarianTokenizer: Hangul Jamo / Syllable Fertility & Alignment

MarianMT caps each pass at 512 tokens and segments Korean agglutinative eojeol (stem + particles/endings), Hangul syllables, Jamo, and Hanja using a 65,001-entry SentencePiece vocabulary. Subword fertility (tokens / eojeol & tokens / syllable) reveals how Korean morphology decomposes before encoder attention.

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

Real SentencePiece Hangul & Subword Pieces (MarianTokenizer · 65,001 vocab)

Subword script mix: —

Run a translation to inspect real MarianTokenizer SentencePiece subwords.

4 · Why It Matters & At a Glance

Private local Korean→English translation unlocks zero-egress localization for customer support queues, K-drama / webtoon subtitle pipelines, engineering bug reports, and confidential contracts — with zero third-party API keys and full offline execution once cached.

Upstream model Helsinki-NLP/opus-mt-ko-en (Tatoeba.kor.eng: BLEU 41.3 · chr-F 0.588)
Browser ONNX repo Xenova/opus-mt-ko-en (encoder_model_quantized.onnx 52.90 MB + decoder_model_merged_quantized.onnx 60.21 MB = 113.11 MB q8)
Pipeline task & runtime translation · shared @huggingface/transformers@3.7.5 via lib/webai.js · CPU wasm
Architecture MarianMTModel (6 encoder + 6 decoder layers, d_model=512, 8 attention heads, ffn=2048, swish, max_length=512, vocab_size=65001)
Special tokens pad=<pad> (65000, also decoder_start_token_id), eos=</s> (0), unk=<unk> · source_lang="kor", target_lang="eng"
License Apache-2.0 (University of Helsinki)
Show the code — Off-thread MarianMT translation & TextStreamer
Show the code — Quote-aware Korean sentence splitter