fastText LID-176: Sinhala-script LID (target-only)

fastText LID-176 fine-tuned to separate Sinhala, Pali and Sanskrit written in Sinhala script (sin_Sinh, pli_Sinh, san_Sinh), which the base model labels as Sinhala. Training regime: target-only adaptation (Sinhala, Pali and Sanskrit training data only). The model keeps the base model's original output labels; labels it lacked were added.

Code: https://anonymous.4open.science/r/Sinhala-LangID/

Base model

fastText LID-176. This checkpoint inherits the base model's licence (cc-by-sa-3.0).

Training and selection

Regime target_only
Seed 42
Selected lr 2.0 (grid [0.1, 0.5, 2.0])
Selected epoch 3 of max 3
Selection metric macro_target3 on validation = 0.9954
Training / validation rows 151979 / 18999
Rule max validation metric; ties keep the first found: smaller lr, then earlier epoch

The full grid is in training/selection_log.csv.

Evaluation

Scored labels: target sin_Sinh, pli_Sinh, san_Sinh; replay san_Deva, eng_Latn, tam_Taml, hin_Deva, ben_Beng, arb_Arab, fra_Latn, deu_Latn. Hybrid sets use each benchmark's own rows for the replay labels, with its Sinhala-script rows replaced by the target test split. Predictions are unrestricted. Values are point estimates with bootstrap 95% CIs.

Eval set n Accuracy Macro-F1 (11) Macro-F1 (target 3) Macro-F1 (replay 8)
Target test (Sinhala/Pali/Sanskrit) 18982 0.9984 [0.9978, 0.9989] 0.9979 [0.9969, 0.9988] 0.9979 [0.9969, 0.9988] n/a
FLORES+ hybrid 27078 0.9988 [0.9984, 0.9992] 0.9994 [0.9991, 0.9996] 0.9979 [0.9970, 0.9987] 0.9999 [0.9998, 1.0000]
CommonLID hybrid 89874 0.9744 [0.9734, 0.9755] 0.9788 [0.9769, 0.9804] 0.9979 [0.9968, 0.9987] 0.9716 [0.9690, 0.9739]
WiLI-2018 hybrid 22469 0.9943 [0.9933, 0.9952] 0.9818 [0.9783, 0.9853] 0.9979 [0.9969, 0.9987] 0.9749 [0.9699, 0.9799]

Usage

With the code release (any model family), using the same loader as the paper's evaluation:

from huggingface_hub import snapshot_download
from lidpipe.models import load          # data_pipeline/ in the code repository

model = load("lid176", snapshot_download("temp-anon/fasttext-lid176-sinhala-script-lid-target-only"))
labels, confidences = model.predict(["නමෝ තස්ස භගවතෝ අරහතෝ සම්මාසම්බුද්ධස්ස"])

Inputs should be normalised as in the paper (lidpipe.text.normalise: NFC, invisible characters removed except ZWJ/ZWNJ, whitespace collapsed).

Citation

@misc{sinhala_script_lid,
  title  = {A Benchmark for Sinhala-Script Language Identification: Sinhala, Pali, and Sanskrit},
  author = {Anonymous},
  year   = {2026}
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support