This is a slightly smaller model trained on half of the
FastText dataset. Since Sinhala is a low-resource language, there’s a noticeable lack of pre-trained models available for it. 😕 This gap makes it harder to represent the language properly in the world of NLP.
But hey, that’s where this model comes in! 🚀 It opens up exciting opportunities to improve tasks like sentiment analysis, machine translation, named entity recognition, or even question answering—tailored just for Sinhala. 🇱🇰✨
Here’s what powers this model (we went with
RoBERTa):
1from transformers import AutoTokenizer, AutoModelWithLMHead, pipeline
2
3# Load the model and tokenizer
4model = AutoModelWithLMHead.from_pretrained("ashenR/AshenBERTo")
5tokenizer = AutoTokenizer.from_pretrained("ashenR/AshenBERTo")
6
7# Create a fill-mask pipeline
8fill_mask = pipeline('fill-mask', model=model, tokenizer=tokenizer)
9
10# Try it out with a Sinhala sentence! 🇱🇰
11fill_mask("මම ගෙදර <mask>.")
For the research Paper you can access using this.
Cite