Instructions to use arunapriyad24/MT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arunapriyad24/MT with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="arunapriyad24/MT")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("arunapriyad24/MT", dtype="auto") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("arunapriyad24/MT", dtype="auto")Hindi to Bengali Translation using BART
Overview
This project fine-tunes the BART model for Hindi-to-Bengali translation using the Hind-Beng-5k dataset. The model is trained using the Hugging Face transformers library with PyTorch.
Dataset
We use the Hind-Beng-5k dataset from Hugging Face, which contains parallel Hindi and Bengali text samples. Dataset: sudeshna84/Hind-Beng-5k
Model
The model used for translation is facebook/bart-large. It is fine-tuned for sequence-to-sequence translation from Hindi to Bengali using the BART architecture.
Installation To run the project, install the required dependencies: pip install transformers datasets torch
Preprocessing The dataset is preprocessed by tokenizing the Hindi input text and Bengali target text using the BART tokenizer.
Training The model is trained using the Trainer API from Hugging Face with the following parameters: Batch size: 8 Learning rate: 2e-5 Epochs: 3 Weight decay: 0.01
Credits Tag Sudeshna Sani- https://huggingface.co/sudeshna84
Model tree for arunapriyad24/MT
Base model
facebook/bart-large
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="arunapriyad24/MT")