Downloads · 30 days
19
11% of all-time downloads
ghaskari/mbart-finetuned-opensubtitle
mbart-finetuned-opensubtitle is a translation model from ghaskari. Use it when you need text moved from one language to another. The card lists the license as mit.
This repository contains a fine-tuned version of the mBART model, optimized for translation and text generation on the OpenSubtitles dataset. Fine-tuning was performed on Farsi (fa) language data, making this model pa…
Downloads · 30 days
19
11% of all-time downloads
All-time downloads
179
Public
Parameters
611M
4.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin2.4 GB · 50%
From the Hugging Face model README
This repository contains a fine-tuned version of the mBART model, optimized for translation and text generation on the OpenSubtitles dataset. Fine-tuning was performed on Farsi (fa) language data, making this model particularly effective for Farsi subtitling and conversational tasks. It leverages the strengths of the facebook/mbart-large-50 base model.
The mBART model, originally pre-trained on a large corpus of multilingual data, has been fine-tuned on the OpenSubtitles dataset with a focus on Farsi. This fine-tuning enhances its ability to generate fluent, contextually relevant text in subtitle and conversational formats.
Before cloning this repository, ensure that you have Git LFS installed, as several large files (e.g., model weights and tokenizer files) are managed through Git LFS.
Below is an example of how to load and use the model with the Hugging Face Transformers library:
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
# Load tokenizer and model
tokenizer = MBart50TokenizerFast.from_pretrained("ghaskari/mbart-finetuned-opensubtitle")
model = MBartForConditionalGeneration.from_pretrained("ghaskari/mbart-finetuned-opensubtitle")
# Example input text for translation or text generation
input_text = "سلام، حال شما چطور است؟" # "Hello, how are you?" in Farsi
encoded_input = tokenizer(input_text, return_tensors="pt")
# Generate output (e.g., for translation or creative text generation)
output_ids = model.generate(**encoded_input)
output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print("Generated Output:", output_text)
The fine-tuning process utilized the OpenSubtitles dataset to adapt the mBART model for Farsi conversational and subtitle-style text. Although the training scripts are not provided in this repository, a typical fine-tuning workflow includes:
Feel free to explore or modify your own fine-tuning scripts based on these guidelines.
While specific evaluation metrics (e.g., BLEU or ROUGE scores) are not provided here, the model has been qualitatively assessed for its ability to generate coherent and contextually accurate outputs in Farsi. Users are encouraged to benchmark the model on their own datasets and share feedback for further improvements.
Contributions are welcome! If you have suggestions, improvements, or bug fixes, please submit a pull request or open an issue. For major changes, please discuss them via an issue first.
This repository is distributed under the MIT License. See the LICENSE file for more details.
This version incorporates the additional YAML metadata for the license, target language, and base model, along with updated details throughout the documentation.