Downloads · 30 days
23
1% of all-time downloads
wtarit/nllb-600M-th-en
nllb-600M-th-en is a machine learning model from wtarit. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This model is finetuned from facebook/nllb-200-distilled-600M using SCB-1M and OPUS dataset. The finetuning script is on GitHub. View full finetuning logs on wandb.
Downloads · 30 days
23
1% of all-time downloads
All-time downloads
2.4K
Public
Repo size
5 GB
Likes
2
Public
Click a slice to open those files.
.bin2.5 GB · 99%
From the Hugging Face model README
This model is finetuned from facebook/nllb-200-distilled-600M using SCB-1M and OPUS dataset.
The finetuning script is on GitHub.
View full finetuning logs on wandb.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
import torch
MODEL_NAME = "wtarit/nllb-600M-th-en"
model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
device = 0 if torch.cuda.is_available() else "cpu"
translation_pipeline = pipeline(
"translation",
model=model,
tokenizer=tokenizer,
src_lang="tha_Thai",
tgt_lang="eng_Latn",
max_length=400,
device=device
)
# Run translation pipeline
result = translation_pipeline("สวัสดี เราคือโมเดลแปลภาษา")
print(result[0]['translation_text'])
BLEU Score (Using sacrebleu): 27.37 on IWSLT 2015