Instructions to use ayhay/BanglaText2Gloss with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ayhay/BanglaText2Gloss with PEFT:
from peft import PeftModel from transformers import AutoModelForSeq2SeqLM base_model = AutoModelForSeq2SeqLM.from_pretrained("facebook/mbart-large-50") model = PeftModel.from_pretrained(base_model, "ayhay/BanglaText2Gloss") - Transformers
How to use ayhay/BanglaText2Gloss with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ayhay/BanglaText2Gloss", dtype="auto") - Notebooks
- Google Colab
- Kaggle
metadata
base_model: facebook/mbart-large-50
library_name: peft
tags:
- base_model:adapter:facebook/mbart-large-50
- lora
- transformers
language:
- bn
metrics:
- chrf
- bleu
Model Card for Model ID
Translate Bangla sentences to Bangla Sign Language(BdSL) gloss with a lightweight model!
Model Details
Model Description
- Developed by: Sharif Mohammad Abdullah
- Language(s) (NLP): Bangla to Bangla Gloss
- Finetuned from model: mbart-large-50
Model Sources [optional]
- Paper [optional]: https://arxiv.org/abs/2504.02293
Uses
You can use the following snippet to do a test run for a sample sentence:
from transformers import MBartForConditionalGeneration, AutoTokenizer
from peft import PeftModel
model_path = "ayhay/BanglaText2Gloss"
base_id = "facebook/mbart-large-50"
# 1. Load Tokenizer & Model with Adapters
tokenizer = AutoTokenizer.from_pretrained(model_path)
base_model = MBartForConditionalGeneration.from_pretrained(base_id)
model = PeftModel.from_pretrained(base_model, model_path)
# 2. Run Translation
text = "আপনি কেমন আছেন?"
inputs = tokenizer(text, return_tensors="pt")
output_tokens = model.generate(**inputs, max_new_tokens=50)
gloss = tokenizer.batch_decode(output_tokens, skip_special_tokens=True)
print(f"Bangla: {text}")
print(f"Sign Gloss: {gloss[0]}")
Out-of-Scope Use
The model will not work for any languages other than Bangla.
-->Citation [optional]
If you use this model in your works, pleasae cite using the following bibtex format:
BibTeX:
[More Information Needed]
Framework versions
- PEFT 0.18.0