algerianDeBERTa-realestate-intent
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).
Model Highlights
| |
|---|
| 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 |
Quick Start
1from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
2
3clf = pipeline(
4 "text-classification",
5 model="81melody/algerianDeBERTa-realestate-intent",
6 top_k=None,
7)
8
9print(clf("نبيع شقة F3 في درارية واتساب فقط"))
10print(clf("نحوس على فيلا في حيدرة 4 غرف ميزانية 8 مليار"))
Or load directly with AutoModelForSequenceClassification — the id2label / label2id maps are already baked into config.json:
1import torch
2from transformers import AutoTokenizer, AutoModelForSequenceClassification
3
4MODEL = "81melody/algerianDeBERTa-realestate-intent"
5tokenizer = AutoTokenizer.from_pretrained(MODEL)
6model = AutoModelForSequenceClassification.from_pretrained(MODEL)
7model.eval()
8
9inputs = tokenizer("نبيع شقة F3 في درارية", return_tensors="pt", truncation=True, max_length=192)
10with torch.no_grad():
11 probs = torch.softmax(model(**inputs).logits, dim=-1)[0]
12
13for i, p in enumerate(probs):
14 print(model.config.id2label[i], round(p.item(), 3))
Training Data
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.
Training Details
1base_model: algerianDeBERTa (DeBERTa-v2)
2architecture: DebertaV2ForSequenceClassification
3num_labels: 3 (BUYER, SELLER, IRRELEVANT)
4
5max_seq_len: 192
6optimizer: AdamW
7peak_lr: 2e-5
8llrd_factor: 0.9
9weight_decay: 0.01
10max_grad_norm: 1.0
11grad_accum_steps: 2
12
13epochs: up to 10 (early stop, patience=3)
14warmup_ratio: 0.1
15schedule: cosine with warmup
16
17label_smoothing: 0.05
18dropout: 0.1
19model_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.
Limitations
- Trained on Facebook posts only — casual, informal register; may underperform on formal listings (real-estate portals, classified-ad websites with structured formats).
- Buyer/seller class imbalance — SELLER is the rarer class on Facebook groups relative to BUYER/IRRELEVANT in this dataset; double-check precision on SELLER posts for your use case.
- No explicit metrics archived for this checkpoint — validate on a held-out sample from your own data before deploying as an automated filter.
- Domain-specific — trained exclusively on real-estate text; not a general-purpose intent classifier.
Intended Use
| 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 |
Citation
1@misc{himeur2026algeriandeberta_intent,
2 title = {algerianDeBERTa-realestate-intent: Buyer/Seller/Irrelevant
3 Intent Classification for Algerian Real Estate Text},
4 author = {Himeur, Ayoub},
5 year = {2026},
6 publisher = {Hugging Face},
7 url = {https://huggingface.co/81melody/algerianDeBERTa-realestate-intent},
8 note = {Fine-tuned DeBERTa-v2 on Algerian Facebook real estate posts, 3-class intent}
9}
License