State-of-the-Art Translation of Text-to-Gloss using mBART : A case study of Bangla
Paper • 2504.02293 • Published
Translate Bangla sentences to Bangla Sign Language(BdSL) gloss with a lightweight model!
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]}")
The model will not work for any languages other than Bangla.
-->If you use this model in your works, pleasae cite using the following bibtex format:
BibTeX:
[More Information Needed]
Base model
facebook/mbart-large-50