CoolFace
Modelpublic

81melody/algerianDeBERTa-realestate-intent

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes12downloads
Model Card

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

ArchitectureDeBERTa-v2 — 12 layers, hidden=512, 8 heads, 2048 FFN
Base modelalgerianDeBERTa (pre-trained on Algerian web text)
TaskSequence classification — 3 classes
LanguagesAlgerian Darja · Arabizi · French · Code-switched
DomainReal estate classifieds scraped from Facebook
Parameters~60M
LicenseApache 2.0

Labels:

idlabelmeaning
0BUYERPost is someone looking to buy/rent a property
1SELLERPost is a property listing for sale/rent
2IRRELEVANTPost has nothing to do with a real-estate transaction

Quick Start

python
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:

python
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))

Training Data

Sourced from real-estate posts scraped from public Algerian Facebook groups (DZ Pulse scraper pipeline).

SplitExamples
Total13,130
Train11,160 (85%)
Val1,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

yaml
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.

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 caseNotes
Real-estate lead curationSplit scraped posts into buyer leads / seller listings / noise
Marketplace data pipelinesPre-filter irrelevant content before downstream NER/enrichment
Algerian NLP researchLow-resource intent-classification benchmark for Darja/Arabizi

Citation

bibtex
@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}
}

License

Apache 2.0