Downloads · 30 days
14
6% of all-time downloads
Mudasir692/mbart-eng-ur
mbart-eng-ur is a machine learning model from Mudasir692. 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 designed to translate text from English to Urdu using the mBART architecture, fine-tuned with the BitFit method.
Downloads · 30 days
14
6% of all-time downloads
All-time downloads
224
Public
Parameters
611M
2.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.4 GB · 99%
From the Hugging Face model README
This model is designed to translate text from English to Urdu using the mBART architecture, fine-tuned with the BitFit method.
This model leverages the mBART (Multilingual BART) architecture to perform English-to-Urdu translation. The model was fine-tuned on a custom English-Urdu dataset, and it uses efficient fine-tuning techniques such as BitFit to ensure high-quality translations.
This model is intended for direct use in English-to-Urdu machine translation tasks.
The model can be fine-tuned further for specific tasks in machine translation or other NLP tasks involving multilingual data. You can use adapters or prefix tuning.
The model is not suitable for domains where high accuracy is critical or where domain-specific training data is required. Misuse in sensitive domains like legal or medical translation should be avoided.
The model may inherit biases from the dataset, including socio-political biases and cultural influences in the training data. Testing on domain-specific data is recommended before using it in production.
Users should be made aware of the potential biases in the translations and consider domain-specific testing before deploying the model in real-world applications.
To get started with the model, use the following code snippet to load the model and tokenizer, input English sentences, and generate translations to Urdu.
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
# Load the tokenizer and model
tokenizer = MBart50TokenizerFast.from_pretrained("Mudasir692/mbart-eng-ur")
model = MBartForConditionalGeneration.from_pretrained("Mudasir692/mbart-eng-ur")
# Example input text (English)
input_text = "This is an example sentence."
# Tokenize the input text
inputs = tokenizer(input_text, return_tensors="pt")
# Generate the translation
translated = model.generate(**inputs)
# Decode the translation and print the result
output_text = tokenizer.decode(translated[0], skip_special_tokens=True)
print("Translated Text (Urdu):", output_text)