Downloads · 30 days
4
11% of all-time downloads
ILT37/en_to_vi_translation
en_to_vi_translation is a machine learning model from ILT37. 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.
State-of-the-art English-Vietnamese and Vietnamese-English Translation models trained on MTet, PhoMT.
Downloads · 30 days
4
11% of all-time downloads
All-time downloads
38
Public
Repo size
2.2 GB
Likes
0
Public
Click a slice to open those files.
.bin1.1 GB · 100%
From the Hugging Face model README
State-of-the-art English-Vietnamese and Vietnamese-English Translation models trained on MTet, PhoMT.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_name = "ILT37/en_to_vo_translation"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
inputs = [
"vi: Theo báo cáo mới nhất của Linkedin về danh sách việc làm triển vọng với mức lương hấp dẫn năm 2020, các chức danh công việc liên quan đến AI như Chuyên gia AI (Artificial Intelligence Specialist), Kỹ sư ML (Machine Learning Engineer) đều xếp thứ hạng cao.",
"en: I go to school",
"en: ... is girlfriend of me"
]
outputs = model.generate(tokenizer(inputs, return_tensors="pt", padding=True).input_ids.to('cuda'), max_length=512)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))