laya-bangla · বাংলা সিদ্ধান্ত মডেল
Write a message in Bangla, Banglish (Bangla in English letters), or a mix. The model answers fixed questions about it (which team should handle it, is it hate speech, how serious is it) and shows how sure it is about every option.
Everything runs in your browser. Your text never leaves this page. The first visit downloads the model once (about 640 MB); after that it loads from your browser's cache.
Model card · Source code · Base model
Loading takes a minute on the first visit. Chrome or Edge use your GPU (WebGPU); other browsers use the CPU.
Questions sent to the model (editable JSON)
Answers appear here.
The built-in questions use the benchmark's test wording, which the model never saw in training. Customer support questions come from a small synthetic diagnostic set, where the model is weaker.
How well does it work?
Every number is measured on test data the model never saw, asked with question wording it never saw in training. Each question was asked twice, worded in Bangla and in English, so each cell shows accuracy with the Bangla question / with the English question. The better model on each row is in bold.
Loading results…
Full tables with macro-F1, calibration, and results by script are in the benchmark report.
Use the model
Python
pip install "laya==0.4.11"
import laya
agent = laya.load("algolyzer/laya-bangla", revision="v2")
questions = {
"sector": {
"type": "choice",
"instructions": "নাগরিকের এই সমস্যাটি কোন সেবা খাতের?",
"criteria": {"water": "পানি সরবরাহ", "electricity": "বিদ্যুৎ", "waste": "ময়লা ও পরিচ্ছন্নতা"},
},
}
print(agent.predict("আমাদের এলাকায় তিন দিন ধরে পানি নেই", questions)["answers"])
JavaScript (browser or Node)
This page uses laya-ts, Laya's TypeScript runtime, with the ONNX files in the model repository:
import { Agent } from "./vendor/laya-ts/index.js";
const agent = await Agent.load("algolyzer/laya-bangla", { subfolder: "onnx/int8", revision: "7c8ad162a66c05409f9278e047e3ee80c24017a8" });
const result = await agent.predict("আমাদের এলাকায় তিন দিন ধরে পানি নেই", questions);
The three question types
| Type | The model returns | Example |
|---|---|---|
choice | the best option, plus a probability for every option | Which department should handle this? |
noul | the probability that the answer is yes | Is this comment hate speech? |
score | a level on an ordered scale, with a probability per level | How urgent is it: low, medium, high? |
Write instructions and options in Bangla or English. noul questions use exactly the options
"false" and "true"; score options are a list from lowest to highest.
Datasets used for training
All training data is real, published Bangla text. Nothing is machine-generated.
| Dataset | Text | What the model learned | License |
|---|---|---|---|
| MASSIVE bn-BD | Voice-assistant requests | Scenario (18) and intent | CC BY 4.0 |
| SIB-200 ben_Beng | News-style sentences | Topic (7) | CC BY-SA 4.0 |
| BanglaPSG | Citizen complaints | Service sector (6), severity (3) | CC BY 4.0 |
| BanTH | YouTube comments in Banglish | Hate, personal attack, abusive | MIT |
| BanHate | YouTube comments in Bangla | Hate | MIT |
| Bangla Sentiments in eLearning | Course comments, Bangla and romanized | Sentiment (3) | Apache-2.0 |
Test-only datasets: SentNoB, IndicSentiment, IndicXNLI, and English sets listed in the dataset guide.
Known limits
- New kinds of yes/no questions can get worse. All trained yes/no tasks are about moderation, so the model says "no" readily. Test new yes/no questions first.
- Rare cases are missed. Only about 8% of BanTH comments are abusive; the model finds few of them.
- Complaint severity is weak (about 40–43% over three levels).
- Voice-assistant routing was trained on Bangla script only. Banglish commands are often misrouted.
- No real customer-support data was available; the support preset is a diagnostic.