Downloads · 30 days
23
2% of all-time downloads
mittynem/m2m100_418M_en2fa_colloquial
m2m100_418M_en2fa_colloquial is a translation model from mittynem. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
This model is based on the M2M100 418M Facebook model and trained with approximately one million and 600 thousand pairs of English text with Persian human translation. The training data consists of colloquial sentence…
Downloads · 30 days
23
2% of all-time downloads
All-time downloads
1.4K
Public
Repo size
7.8 GB
Likes
4
Public
Click a slice to open those files.
.pt3.9 GB · 66%
From the Hugging Face model README
This model is based on the M2M100 418M Facebook model and trained with approximately one million and 600 thousand pairs of English text with Persian human translation. The training data consists of colloquial sentences, resulting in fluent and colloquial translations. This model is designed to facilitate the translation of informal English to Persian.
config.json includes the specifications below:
The model's performance was evaluated using the sacrebleu metric on a separate test dataset. The results are as follows:
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer
model_name = "mittynem/m2m100_418M_en2fa_colloquial"
model = M2M100ForConditionalGeneration.from_pretrained(model_name)
tokenizer = M2M100Tokenizer.from_pretrained(model_name)
# English text to translate
english_text = "Last night's party was lit!"
# Tokenize and translate
input_ids = tokenizer.encode(english_text, return_tensors="pt")
translated_ids = model.generate(input_ids)
translated_text = tokenizer.decode(translated_ids[0], skip_special_tokens=True)
print(translated_text) # Output: "مهمونی دیشب عالی بود!"
You can further fine-tune this model on specific downstream tasks or domains by using Hugging Face's Transformers library. Refer to the official documentation for guidance on fine-tuning procedures and techniques.
⚠️ Caution: This model has been trained on colloquial and informal data, aiming to produce translations that closely resemble the vernacular language used by people. While it generally generates accurate and fluent translations, it is important to be aware that it has the possibility of producing words or phrases that some individuals may find objectionable or inappropriate.
Please exercise caution and responsibility when using this model, especially in situations where communication with others is involved. The generated translations should be carefully reviewed and edited to ensure they align with the intended context and comply with social norms and guidelines.
The developer and contributors of this model cannot be held responsible for any potential misuse or unintended consequences resulting from the use of the model. It is the user's responsibility to review and refine the generated translations to ensure they meet their specific requirements, conform to acceptable standards, and are suitable for the target audience.
We strongly recommend that users exercise due diligence and employ human judgment to validate and modify the model's outputs before disseminating them in public or sensitive settings. It is essential to consider cultural, linguistic, and ethical factors to ensure respectful and appropriate communication.
For any questions, suggestions, or issues related to this model, please feel free to reach out to the model developer at [email protected]. This model is released under the cc-by-nc-4.0 license, allowing researchers and developers to use it for their projects and experiments for non-commercial purposes.