--- language: - en - pcm license: mit tags: - text-classification - intent-classification - afro-xlmr - nigerian-pidgin - bursary - multilingual - zero-shot pipeline_tag: text-classification base_model: Davlan/afro-xlmr-small datasets: - Estarcode/campusdesk-ai-dataset metrics: - f1 - accuracy --- # CampusDesk AI — Intent Classifier A fine-tuned **Davlan/afro-xlmr-small** (AfroXLMR-Small) model for 4-class intent classification of student bursary enquiries in **English and Nigerian Pidgin Creole (PCM)**. Built as part of the **CampusDesk AI** capstone project — a retrieval-augmented generation (RAG) system for a Nigerian tertiary institution's bursary desk. --- ## Model Description | Property | Value | |---|---| | Base model | `Davlan/afro-xlmr-small` | | Fine-tuning task | 4-class intent classification | | Languages | English (`en`), Nigerian Pidgin (`pcm`) | | Training set size | 88 samples (136 total, 88/24/24 split) | | Test Macro-F1 | **1.000** | | Validation Macro-F1 | **1.000** | | Inference latency | ~55 ms/query (CPU) | | Confused pairs | 0 | ### Intent Classes | Label | Description | Examples | |---|---|---| | `deadlines` | Questions about submission dates, deadlines | "When is the deadline to apply?" | | `eligibility` | Questions about who qualifies | "Am I eligible for bursary?" | | `required_documents` | Questions about what to submit | "Wetin dem need make I submit?" | | `fees` | Questions about amounts, tiers, payment | "How much bursary money I go get?" | --- ## Training Details - **Epochs:** 8 - **Learning rate:** 5e-5 - **Warmup steps:** 5 - **Seed:** 42 - **Batch size:** 8 (train), 16 (eval) - **Framework:** Hugging Face Transformers 5.x - **Hardware:** CPU (Windows, Python 3.14) ### Dataset Split - **Train:** 88 samples (34 per intent, balanced) - **Validation:** 24 samples - **Test:** 24 samples - **Zero family overlap** across splits (no data leakage) - **Bilingual balance:** 68 English + 68 Nigerian Pidgin --- ## Usage ```python from transformers import pipeline import json, pathlib # Load label map label_map = json.loads(pathlib.Path("label_map.json").read_text()) id2label = {v: k for k, v in label_map.items()} # Load classifier clf = pipeline( "text-classification", model="Estarcode/campusdesk-ai-intent-classifier", tokenizer="Estarcode/campusdesk-ai-intent-classifier", top_k=1, ) query = "When is the deadline to submit bursary documents?" result = clf(query)[0] intent = id2label[int(result["label"].split("_")[-1])] print(intent) # → deadlines ``` --- ## Comparison with Baseline | Model | Val F1 | Test F1 | Latency | Confused | |---|---|---|---|---| | TF-IDF + Logistic Regression | 0.8325 | 0.9143 | 0.096 ms | 2 pairs | | **AfroXLMR-Small (fine-tuned)** | **1.000** | **1.000** | 55.4 ms | **0** | The fine-tuned model achieves perfect classification at the cost of ~575× higher latency — a worthwhile trade for a production bursary assistant where accuracy is critical. --- ## Citation If you use this model, please cite: ```bibtex @misc{campusdesk2024, title = {CampusDesk AI: Bilingual RAG for Nigerian University Bursary Enquiries}, year = {2024}, note = {Capstone project. Fine-tuned AfroXLMR-Small for 4-class intent classification in English and Nigerian Pidgin Creole.} } ``` --- ## Limitations - Trained on **synthetic** ZIT bursary data — real-world queries may differ - 4 intents only — out-of-scope queries will be misclassified - Nigerian Pidgin coverage based on West African PCM; regional dialects may vary - No GPU optimization applied; latency is CPU-only --- ## Related - 📦 Dataset: [campusdesk-ai-dataset](https://huggingface.co/datasets/Estarcode/campusdesk-ai-dataset) - 🤖 Full system: CampusDesk AI RAG pipeline (Retrieval + Qwen2.5-1.5B-Instruct generation)