opus mt ko en

ProviderHelsinki-NLP
Categorytranslation
Licenseapache-2.0
Downloads141
Stars0

Overview

The opus-mt-ko-en model is a specialized neural machine translation tool developed by Helsinki-NLP, designed specifically for translating Korean text into English. Built on the Marian NMT framework, it offers a lightweight, efficient alternative to massive LLMs for dedicated translation pipelines. Developers can easily integrate it via the Transformers library, making it ideal for real-time localization, preprocessing multilingual datasets, or building lightweight translation microservices. Unlike general-purpose models, its focused architecture ensures consistent terminology and lower latency for this specific language pair, while the Apache-2.0 license allows for unrestricted commercial deployment.

Highlights

  • Optimized for high-performance Korean to English translation
  • Lightweight architecture ensures low latency and fast inference
  • Seamless integration via Hugging Face Transformers library
  • Permissive Apache-2.0 license for commercial application
  • Efficient alternative to resource-heavy general LLMs

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("Helsinki-NLP/opus-mt-ko-en")
tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-ko-en")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download Helsinki-NLP/opus-mt-ko-en

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download Helsinki-NLP/opus-mt-ko-en config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('Helsinki-NLP/opus-mt-ko-en')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/Helsinki-NLP/opus-mt-ko-en

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Helsinki-NLP/opus-mt-ko-en

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('Helsinki-NLP/opus-mt-ko-en')
tokenizer = AutoTokenizer.from_pretrained('Helsinki-NLP/opus-mt-ko-en')

Model Download

We recommend downloading the model via the ModelScope CLI or SDK.

Guidance:Before downloading, install ModelScope with:

Guidance
pip install modelscope

CLI Download

Download the full repository

Download the full repository
modelscope download --model Helsinki-NLP/opus-mt-ko-en

Download a single file to a local folder (e.g. README.md into ./dir)

Download a single file to a local folder (e.g. README.md into ./dir)
modelscope download --model Helsinki-NLP/opus-mt-ko-en README.md --local_dir ./dir

See the docs for more CLI options

SDK Download

SDK Download
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('Helsinki-NLP/opus-mt-ko-en')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://www.modelscope.cn/Helsinki-NLP/opus-mt-ko-en.git

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/Helsinki-NLP/opus-mt-ko-en.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook Quickstart

Install the ModelScope library

Install the ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

Load the model and run inference

Load the model and run inference
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

p = pipeline('text-generation', 'Helsinki-NLP/opus-mt-ko-en')

Full Documentation

来源: HuggingFace

---
language:

  • ko

  • en

tags:

  • translation

license: apache-2.0
---

kor-eng

  • source group: Korean
  • target group: English
  • model: transformer-align
  • source language(s): kor kor_Hang kor_Latn
  • target language(s): eng
  • model: transformer-align
  • pre-processing: normalization + SentencePiece (spm32k,spm32k)

Benchmarks

| testset | BLEU | chr-F |
|-----------------------|-------|-------|
| Tatoeba-test.kor.eng | 41.3 | 0.588 |

System Info:

  • hf_name: kor-eng
  • source_languages: kor
  • target_languages: eng
  • opus_readme_url: https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/kor-eng/README.md
  • original_repo: Tatoeba-Challenge
  • tags: ['translation']
  • languages: ['ko', 'en']
  • src_constituents: {'kor_Hani', 'kor_Hang', 'kor_Latn', 'kor'}
  • tgt_constituents: {'eng'}
  • src_multilingual: False
  • tgt_multilingual: False
  • prepro: normalization + SentencePiece (spm32k,spm32k)
  • url_model: https://object.pouta.csc.fi/Tatoeba-MT-models/kor-eng/opus-2020-06-17.zip
  • url_test_set: https://object.pouta.csc.fi/Tatoeba-MT-models/kor-eng/opus-2020-06-17.test.txt
  • src_alpha3: kor
  • tgt_alpha3: eng
  • short_pair: ko-en
  • chrF2_score: 0.588
  • bleu: 41.3
  • brevity_penalty: 0.9590000000000001
  • ref_len: 17711.0
  • src_name: Korean
  • tgt_name: English
  • train_date: 2020-06-17
  • src_alpha2: ko
  • tgt_alpha2: en
  • prefer_old: False
  • long_pair: kor-eng
  • helsinki_git_sha: 480fcbe0ee1bf4774bcbe6226ad9f58e63f6c535
  • transformers_git_sha: 2207e5d8cb224e954a7cba69fa4ac2309e9ff30b
  • port_machine: brutasse
  • port_time: 2020-08-21-14:41
Join our Telegram