Views
No views yet
| Property | Value |
|---|---|
| Base model | csebuetnlp/banglabert |
| Architecture | ElectraForSequenceClassification (ELECTRA-based BERT) |
| Parameters | 12 layers, 768 hidden dim, 12 attention heads, vocab 32,000 |
| Language | Bengali (bn) |
| Task | Binary sequence classification |
| Labels | 0 → Human, 1 → AI |
| Max input tokens | 512 |
| Training data | 70 resumes (35 AI + 35 Human) |
| Validation data | ~15 resumes (stratified) |
| Test data | ~15 resumes (stratified) |
| Epochs | 5 (with EarlyStoppingCallback, patience=2) |
| Learning rate | 2e-5 |
| Batch size | 8 |
| Warmup ratio | 0.1 |
| Weight decay | 0.01 |
| Mixed precision | fp16 |
| Best model metric | F1 (binary) |
| ID | Label | Description |
|---|---|---|
| 0 | Human | Resume written by a human |
| 1 | AI | Resume generated by an AI system |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("your-username/bangla-ai-detector")
5model = AutoModelForSequenceClassification.from_pretrained("your-username/bangla-ai-detector")
6model.eval()
7
8def predict(text):
9 inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
10 with torch.no_grad():
11 logits = model(**inputs).logits
12 probs = torch.softmax(logits, dim=1)[0]
13 label = model.config.id2label[logits.argmax().item()]
14 return {
15 "label": label,
16 "confidence": f"{probs.max().item()*100:.1f}%",
17 "P(Human)": f"{probs[0].item()*100:.1f}%",
18 "P(AI)": f"{probs[1].item()*100:.1f}%",
19 }
20
21# Example
22resume_text = "আমি একজন অভিজ্ঞ সফ্টওয়্যার ইঞ্জিনিয়ার। গত পাঁচ বছর ধরে জাভা এবং স্প্রিং বুট দিয়ে কাজ করছি।"
23print(predict(resume_text))
24# Output: {'label': 'Human', 'confidence': '87.3%', 'P(Human)': '87.3%', 'P(AI)': '12.7%'}1import re
2
3def clean_resume(text):
4 text = re.sub(r'\[Info_Start\].*?\[Info_End\]', '', text, flags=re.DOTALL)
5 text = re.sub(r'\[(Objective|Experience|Expericence|Education|Skill|section)\]', '', text)
6 text = re.sub(r'\s+', ' ', text).strip()
7 return text1@misc{onneshon2026,
2 title = {Onneshon: A Bangla Resume NLP Dataset},
3 author = {Tanvir and Shruti Khisa and Shaira Akther Diba and Fazli Rabbi Noor},
4 year = {2026},
5 doi = {10.17632/4md7bx6fd7.1},
6 publisher = {Mendeley Data}
7}
8
9@inproceedings{bhattacharjee-etal-2022-banglabert,
10 title = {BanglaBERT: Language Model Pretraining and Benchmarks for Low-Resource Language Understanding Evaluation in Bangla},
11 author = {Bhattacharjee, Abhik and Hasan, Tahmid and Ahmad, Wasi and Mubasshir, Kazi Samin and Islam, Md Saiful and Iqbal, Anindya and Rahman, M. Sohel and Shahriyar, Rifat},
12 booktitle = {Findings of the Association for Computational Linguistics: NAACL 2022},
13 year = {2022},
14 pages = {1318--1327}
15}