A 3-class intent classifier (BUYER / SELLER / IRRELEVANT) for Algerian real-estate posts scraped from Facebook groups and marketplaces.
Built on 81melody/algerianDeBERTa, a DeBERTa-v2 model pre-trained from scratch on Algerian web text (Darja, Arabizi, French, code-switching). This classifier is the second stage of the DZ Pulse data-curation pipeline: once 81melody/algerian-realestate-ner extracts structured fields from a post, this model decides whether the post is a genuine buyer lead, a seller listing, or irrelevant noise (chit-chat, spam, unrelated content).
| Architecture | DeBERTa-v2 — 12 layers, hidden=512, 8 heads, 2048 FFN |
| Base model | algerianDeBERTa (pre-trained on Algerian web text) |
| Task | Sequence classification — 3 classes |
| Languages | Algerian Darja · Arabizi · French · Code-switched |
| Domain | Real estate classifieds scraped from Facebook |
| Parameters | ~60M |
| License | Apache 2.0 |
Labels:
| id | label | meaning |
|---|---|---|
| 0 | BUYER |
Post is someone looking to buy/rent a property |
| 1 | SELLER |
Post is a property listing for sale/rent |
| 2 | IRRELEVANT |
Post has nothing to do with a real-estate transaction |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
clf = pipeline(
"text-classification",
model="81melody/algerianDeBERTa-realestate-intent",
top_k=None,
)
print(clf("نبيع شقة F3 في درارية واتساب فقط"))
print(clf("نحوس على فيلا في حيدرة 4 غرف ميزانية 8 مليار"))
Or load directly with AutoModelForSequenceClassification — the id2label / label2id maps are already baked into config.json:
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
MODEL = "81melody/algerianDeBERTa-realestate-intent"
tokenizer = AutoTokenizer.from_pretrained(MODEL)
model = AutoModelForSequenceClassification.from_pretrained(MODEL)
model.eval()
inputs = tokenizer("نبيع شقة F3 في درارية", return_tensors="pt", truncation=True, max_length=192)
with torch.no_grad():
probs = torch.softmax(model(**inputs).logits, dim=-1)[0]
for i, p in enumerate(probs):
print(model.config.id2label[i], round(p.item(), 3))
Sourced from real-estate posts scraped from public Algerian Facebook groups (DZ Pulse scraper pipeline).
| Split | Examples |
|---|---|
| Total | 13,130 |
| Train | 11,160 (85%) |
| Val | 1,970 (15%) |
Label distribution (full set): BUYER 6,565 (50%) · IRRELEVANT 3,495 (27%) · SELLER 3,070 (23%)
Sensitive entities (price, phone, city, surface, etc.) are normalized/masked before classification so the model learns intent from phrasing rather than memorizing specific listing details — this masking is handled upstream by the companion NER model.
base_model: algerianDeBERTa (DeBERTa-v2)
architecture: DebertaV2ForSequenceClassification
num_labels: 3 (BUYER, SELLER, IRRELEVANT)
max_seq_len: 192
optimizer: AdamW
peak_lr: 2e-5
llrd_factor: 0.9
weight_decay: 0.01
max_grad_norm: 1.0
grad_accum_steps: 2
epochs: up to 10 (early stop, patience=3)
warmup_ratio: 0.1
schedule: cosine with warmup
label_smoothing: 0.05
dropout: 0.1
model_selection: best checkpoint by macro-F1 on the validation split
Layerwise Learning Rate Decay (LLRD): as with the companion NER model, the classifier head trains at peak_lr=2e-5 while each successive DeBERTa layer underneath is scaled down by 0.9×, preserving the base model's general language representations while adapting the top layers to the intent task.
Note on metrics: this checkpoint (
best_of2) was selected as the production model based on validation macro-F1 during training and is the version hardcoded in the DZ Pulse production pipeline (intent_classifier.py). A separate archived metrics file for this exact run was not retained, so no held-out test-set numbers are reported here — treat reported confidence scores as relative, and re-validate on your own data before using as a hard filter.
| Use case | Notes |
|---|---|
| Real-estate lead curation | Split scraped posts into buyer leads / seller listings / noise |
| Marketplace data pipelines | Pre-filter irrelevant content before downstream NER/enrichment |
| Algerian NLP research | Low-resource intent-classification benchmark for Darja/Arabizi |
@misc{himeur2026algeriandeberta_intent,
title = {algerianDeBERTa-realestate-intent: Buyer/Seller/Irrelevant
Intent Classification for Algerian Real Estate Text},
author = {Himeur, Ayoub},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/81melody/algerianDeBERTa-realestate-intent},
note = {Fine-tuned DeBERTa-v2 on Algerian Facebook real estate posts, 3-class intent}
}
81melody/algerianDeBERTa