Downloads · 30 days
25
34% of all-time downloads
resume-summerization-classification
resume-summerization-classification/bangla_ai_detector
bangla_ai_detector is a text classification model from resume-summerization-classification. Use it when you need a label for a piece of text. The card lists the license as mit.
Fine-tuned BanglaBERT for binary classification of Bangla text as AI-generated or human-written. Developed as part of the Onneshon thesis project at Bangladesh University of Professionals (BUP).
Downloads · 30 days
25
34% of all-time downloads
All-time downloads
74
Public
Parameters
111M
443 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors442 MB · 100%
From the Hugging Face model README
Fine-tuned BanglaBERT for binary classification of Bangla text as AI-generated or human-written. Developed as part of the Onneshon thesis project at Bangladesh University of Professionals (BUP).
Given the full text of a Bangla resume, the model predicts whether it was written by a human or generated by an AI system, along with a confidence score.
| 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) |
Trained on Onneshon — an original Bangla resume dataset:
Published on Mendeley Data: DOI: 10.17632/4md7bx6fd7.1
| ID | Label | Description |
|---|---|---|
| 0 | Human | Resume written by a human |
| 1 | AI | Resume generated by an AI system |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("your-username/bangla-ai-detector")
model = AutoModelForSequenceClassification.from_pretrained("your-username/bangla-ai-detector")
model.eval()
def predict(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
logits = model(**inputs).logits
probs = torch.softmax(logits, dim=1)[0]
label = model.config.id2label[logits.argmax().item()]
return {
"label": label,
"confidence": f"{probs.max().item()*100:.1f}%",
"P(Human)": f"{probs[0].item()*100:.1f}%",
"P(AI)": f"{probs[1].item()*100:.1f}%",
}
# Example
resume_text = "আমি একজন অভিজ্ঞ সফ্টওয়্যার ইঞ্জিনিয়ার। গত পাঁচ বছর ধরে জাভা এবং স্প্রিং বুট দিয়ে কাজ করছি।"
print(predict(resume_text))
# Output: {'label': 'Human', 'confidence': '87.3%', 'P(Human)': '87.3%', 'P(AI)': '12.7%'}
Before passing text to the model, strip any annotation tags if present (these are specific to the Onneshon dataset format):
import re
def clean_resume(text):
text = re.sub(r'\[Info_Start\].*?\[Info_End\]', '', text, flags=re.DOTALL)
text = re.sub(r'\[(Objective|Experience|Expericence|Education|Skill|section)\]', '', text)
text = re.sub(r'\s+', ' ', text).strip()
return text
@misc{onneshon2026,
title = {Onneshon: A Bangla Resume NLP Dataset},
author = {Tanvir and Shruti Khisa and Shaira Akther Diba and Fazli Rabbi Noor},
year = {2026},
doi = {10.17632/4md7bx6fd7.1},
publisher = {Mendeley Data}
}
@inproceedings{bhattacharjee-etal-2022-banglabert,
title = {BanglaBERT: Language Model Pretraining and Benchmarks for Low-Resource Language Understanding Evaluation in Bangla},
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},
booktitle = {Findings of the Association for Computational Linguistics: NAACL 2022},
year = {2022},
pages = {1318--1327}
}
Part of the Onneshon thesis project — a Bangla NLP pipeline for resume processing.