Instructions to use Helsinki-NLP/opus-mt_tiny_kor-eng with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Helsinki-NLP/opus-mt_tiny_kor-eng with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="Helsinki-NLP/opus-mt_tiny_kor-eng")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt_tiny_kor-eng") model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt_tiny_kor-eng", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -35,4 +35,16 @@ tokenizer.decode(output, skip_special_tokens=True)
|
|
| 35 |
|
| 36 |
| testset | BLEU | chr-F |
|
| 37 |
|-----------------------|-------|-------|
|
| 38 |
-
| flores200 | 20.3 | 50.3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
| testset | BLEU | chr-F |
|
| 37 |
|-----------------------|-------|-------|
|
| 38 |
+
| flores200 | 20.3 | 50.3 |
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
## Marian models
|
| 42 |
+
|
| 43 |
+
We also provide Marian-compatible versions of this model. To use them, compile [Marian](https://marian-nmt.github.io/quickstart/) and run decoding with `marian-decoder`, for example:
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
marian-decoder \
|
| 47 |
+
-i input.txt \
|
| 48 |
+
-c final.model.npz.best-perplexity.npz.decoder.yml \
|
| 49 |
+
-m final.model.npz.best-perplexity.npz \
|
| 50 |
+
-v vocab.spm vocab.spm
|