HelaBERT is a BERT-based masked language model pre-trained from scratch on a large Sinhala text corpus. With approximately 23.3 million parameters, it is designed to produce contextual representations of Sinhala language text and can be used for downstream NLP tasks such as text classification, named entity recognition, semantic similarity, and information retrieval.
This work is described in the paper:
HelaBERT: Enhancing Sinhala Language Understanding with Dual Pooling Classification Head arXiv:2608.22922
Model Details
Property
Value
Architecture
BERT (encoder-only)
Parameters
~23.3 million
Vocabulary size
32,000
Hidden size
384
Transformer layers
6
Attention heads
6
Intermediate size
1,536
Max sequence length
512
Activation function
GELU
Tokenizer
SentencePiece Unigram
Pre-training objective
Masked Language Modeling (MLM)
Training Data
HelaBERT was pre-trained on approximately ~900 million tokens of Sinhala text sourced from three datasets:
MADLAD-400 — Sinhala subset of the multilingual document-level dataset
CulturaX — Sinhala subset of the cleaned multilingual web corpus
Custom Sinhala Corpus — A dataset compiled from Sinhala Wikipedia, Sinhala news articles, and Sinhala web crawl data
Data Preprocessing
The raw text was preprocessed through a multi-stage cleaning pipeline before training:
Unicode NFC normalization and removal of zero-width characters (excluding ZWJ U+200D, which is required for correct Sinhala ligature rendering)
Filtering to retain only lines containing Sinhala characters (U+0D80–U+0DFF), with a minimum line length of 5 characters
Removal of non-Sinhala characters, retaining Sinhala script, digits, common punctuation, and ZWJ/ZWNJ
Normalization of repeated punctuation, extra whitespace, unmatched brackets, and date-like numeric patterns
Final text was combined into a single corpus and tokenized using a SentencePiece unigram tokenizer
Tokenizer
HelaBERT uses a SentencePiece Unigram tokenizer trained on Sinhala text with a vocabulary size of 32,000. The tokenizer is not included in the HuggingFace tokenizer format and must be used via the sentencepiece library directly.
Training loss decreased from ~10.0 to ~3.5 over 2 epochs (~52,000 steps), with validation loss converging in parallel from ~7.0 to ~3.5, indicating no significant overfitting.
eval/loss curves
train/loss curves
Metric
Value
Final train loss
3.69
Final eval loss
3.49
Total training steps
~52,000
Hardware & Environmental Impact
Property
Details
CPU
Intel Core i9-14900HX (24 cores / 32 threads)
RAM
64 GB DDR5 5600 MHz
GPU
NVIDIA GeForce RTX 4060 8 GB GDDR6
GPU TDP
55 W
OS
Arch Linux (kernel 6.18.9, x86_64)
Training duration
~16 hours
CO₂ Estimate:0.055 kW × 16 h × 0.510 kg CO₂/kWh ≈ 0.45 kg CO₂eq
Grid carbon intensity for Sri Lanka sourced from Our World in Data (~0.510 kg CO₂/kWh). This estimate covers GPU power draw only and does not account for CPU, RAM, or system-level power consumption, so the actual footprint is moderately higher.
Language scope: HelaBERT is trained exclusively on Sinhala text. It does not support multilingual inference or cross-lingual transfer.
Tokenizer compatibility: The SentencePiece tokenizer is not natively integrated with the HuggingFace AutoTokenizer API. Manual tokenization is required.
Sequence length: The model was trained on 256-token sequences despite a maximum positional embedding of 512. Performance on sequences longer than 256 tokens has not been evaluated.
Training data bias: The corpus includes web-crawled content, which may contain informal language, spelling inconsistencies, or undesirable content that was not fully filtered.
Downstream evaluation: HelaBERT has not yet been formally benchmarked on labelled Sinhala NLP tasks (e.g., NER, classification). Reported similarity scores are from qualitative inference tests only.
Dialectal variation: The model may underrepresent dialectal and colloquial Sinhala, as the corpus skews toward written, formal text.
Citation
If you use HelaBERT in your research or work, please cite:
bibtex
1@misc{ekanayake2026helabertenhancingsinhalalanguage,
2 title={HelaBERT: Enhancing Sinhala Language Understanding with Dual Pooling Classification Head},
3 author={Thisen Ekanayake and Nisansa de Silva},
4 year={2026},
5 eprint={2608.22922},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2608.22922},
9}
Acknowledgements
Pre-training data sourced from MADLAD-400, CulturaX, Sinhala Wikipedia, Sinhala news sources, and Sinhala web crawl data.