Downloads · 30 days
0
wasawat/Translate12M
Translate12M is a machine learning model from wasawat. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Collection of 12 LoRA fine-tuned translation models based on NLLB-200-distilled-600M.
Downloads · 30 days
0
Access
Public
Updated Nov 7, 2025
Repo size
1.6 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.4 GB · 75%
From the Hugging Face model README
Collection of 12 LoRA fine-tuned translation models based on NLLB-200-distilled-600M.
| Direction | BLEU | Size (MB) | Path |
|---|---|---|---|
| EN→TH | 99.53 | 143.5 | eng_Latn_to_tha_Thai |
| TH→EN | 99.67 | 143.5 | tha_Thai_to_eng_Latn |
| EN→JA | 98.66 | 143.5 | eng_Latn_to_jpn_Jpan |
| JA→EN | 99.55 | 143.5 | jpn_Jpan_to_eng_Latn |
| EN→HI | 99.70 | 143.5 | eng_Latn_to_hin_Deva |
| HI→EN | 99.84 | 143.5 | hin_Deva_to_eng_Latn |
| EN→RU | 99.52 | 143.5 | eng_Latn_to_rus_Cyrl |
| RU→EN | 99.38 | 143.5 | rus_Cyrl_to_eng_Latn |
| EN→MS | 99.37 | 143.5 | eng_Latn_to_zsm_Latn |
| MS→EN | 99.74 | 143.5 | zsm_Latn_to_eng_Latn |
| EN→ZH | 98.62 | 143.5 | eng_Latn_to_zho_Hans |
| ZH→EN | 99.13 | 143.5 | zho_Hans_to_eng_Latn |
from peft import PeftModel, PeftConfig
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
# Example: EN→TH
direction = 'eng_Latn_to_tha_Thai'
config = PeftConfig.from_pretrained('wasawat/Translate12M', subfolder=direction)
base = AutoModelForSeq2SeqLM.from_pretrained(config.base_model_name_or_path)
model = PeftModel.from_pretrained(base, 'wasawat/Translate12M', subfolder=direction)
tokenizer = AutoTokenizer.from_pretrained('wasawat/Translate12M', subfolder=direction)
# Set languages
tokenizer.src_lang = 'eng_Latn'
tokenizer.tgt_lang = 'tha_Thai'
# Translate
text = 'Hello, how are you?'
inputs = tokenizer(text, return_tensors='pt')
outputs = model.generate(**inputs, max_length=128)
translation = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(translation)
CC-BY-NC-4.0 (Creative Commons Attribution-NonCommercial 4.0)
wasawat
Repository: https://huggingface.co/wasawat/Translate12M