Downloads · 30 days
6
40% of all-time downloads
GudeGudeEgg/iput_3rd_DL_theme_2_level_1
iput_3rd_DL_theme_2_level_1 is a machine learning model from GudeGudeEgg. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a fine-tuned version of facebook/mbart-large-50-many-to-many-mmt for English to French translation.
Downloads · 30 days
6
40% of all-time downloads
All-time downloads
15
Public
Parameters
611M
2.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.4 GB · 99%
From the Hugging Face model README
This model is a fine-tuned version of facebook/mbart-large-50-many-to-many-mmt for English to French translation.
This was uploaded as a university assignment and has low accuracy.
Downloading is not recommended.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("GudeGudeEgg/iput_3rd_DL_theme_2_level1", token='your_token')
model = AutoModelForSeq2SeqLM.from_pretrained("GudeGudeEgg/iput_3rd_DL_theme_2_level1", token='your_token')
# Translate
def translate_en_to_fr(text):
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
generated_tokens = model.generate(**inputs, max_length=128)
return tokenizer.decode(generated_tokens[0], skip_special_tokens=True)
# Example
result = translate_en_to_fr("The cat is sleeping")
print(result) # Should output French translation
The model was fine-tuned for 3 epochs using the HuggingFace Trainer with: