Downloads · 30 days
9
4% of all-time downloads
trinhhuy/finetuned-opus-mt-en-vi
finetuned-opus-mt-en-vi is a translation model from trinhhuy. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
probably proofread and complete it, then remove this comment. --
Downloads · 30 days
9
4% of all-time downloads
All-time downloads
213
Public
Parameters
71.7M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.h5289 MB · 50%
From the Hugging Face model README
This model is a fine-tuned version of Helsinki-NLP/opus-mt-en-vi on harouzie/vi_en-translation dataset. It achieves the following results on the evaluation set:
First, make sure to install the transformers library:
pip install transformers
Option 1: Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("translation", model="trinhhuy/finetuned-opus-mt-en-vi")
result = pipe("I'm confident that my friend will pass the exam because he has been studying hard and staying focused for weeks.")
print(result)
[{'translation_text': 'Tôi tự tin rằng bạn tôi sẽ vượt qua kỳ thi vì anh ấy đã học tập chăm chỉ và tập trung nhiều tuần.'}]
Option 2: Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("trinhhuy/finetuned-opus-mt-en-vi")
model = AutoModelForSeq2SeqLM.from_pretrained("trinhhuy/finetuned-opus-mt-en-vi")
input_tokenized = tokenizer("I'm confident that my friend will pass the exam because he has been studying hard and staying focused for weeks.", return_tensors="pt")
output_tokenized = model.generate(**input_tokenized)
translated_text = tokenizer.decode(output_tokenized[0], skip_special_tokens=True)
print(translated_text)
Tôi tự tin rằng bạn tôi sẽ vượt qua kỳ thi vì anh ấy đã học tập chăm chỉ và tập trung nhiều tuần.
The following hyperparameters were used during training:
| Train Loss | Validation Loss | Epoch |
|---|---|---|
| 0.4246 | 0.3235 | 0 |
| 0.2724 | 0.2977 | 1 |
| 0.2019 | 0.2887 | 2 |
| 0.1596 | 0.2877 | 3 |