Model Card: Wolof Educational Assistant — LoRA Fine-tuned Qwen3-0.6B
Model Summary
Base model:Qwen/Qwen3-0.6B
Adaptation method: LoRA / PEFT
Target task: Instruction following in Wolof — answering educational
questions, language learning assistance, and general Wolof conversation
Target users: Senegalese learners and speakers who want a digital
assistant in their native language; researchers interested in low-resource
African language NLP
Target language/domain: Wolof (Senegambian language, 10+ million speakers)
No filtering applied; already in correct instruction format
train/val/eval
Data Splits
Split
Number of examples
Ratio
Notes
Train
5670
90%
Split per source family with deterministic seed
Validation
315
5%
Used for checkpoint selection during training
Evaluation
315
5%
Held-out; used for all reported metrics
Splits were generated per source family before merging to prevent
data leakage. The combined eval file data/splits/eval_all.jsonl contains
25 AYA + 25 Soynade + 265 Synthetic examples.
Chat Template and Training Labels
Every example was converted from raw instruction format to the following
chat template using src/download_datasets.py:
text
1system: You are a helpful Wolof language educational assistant trained
2 at AIMS Sénégal. Answer clearly and concisely. If you do not
3 know the answer, say so honestly.
4user: <instruction> <input>
5assistant: <output>
Training labels:
system tokens: -100 (ignored in loss — model does not learn to reproduce system prompt)
user tokens: -100 (ignored in loss — model does not learn to copy the question)
padding tokens: -100 (ignored in loss — padding does not pollute gradients)
assistant output tokens: learned by the model (normal token IDs in labels)
This assistant-only masking was verified by tokenization statistics:
avg_total tokens per example: 129.0
avg_supervised tokens per example: 33.9
examples kept: 5670 / 5670 (skipped: 0)
Only 26% of tokens per example contributed to the training loss.
Required hardware: CPU sufficient (no GPU required for inference);
GPU recommended for faster response times
Average latency: ~5–15 seconds per response on CPU (Colab free tier)
The Space loads the LoRA adapter directly from the Hugging Face Hub
repository. It does not use any local checkpoint.
Limitations
Small dataset: ~6300 training examples is insufficient for robust
Wolof instruction following. A production system would require 50,000+
high-quality examples.
English fallback: The model sometimes responds in English to Wolof
prompts (e.g., "Ana nga?" → "What?"), reflecting the base model's
pre-training distribution.
Translation failures: Wolof-to-French or Wolof-to-English translation
tasks systematically fail (F1=0.00, BLEU=0.04 on number translation).
This task type is underrepresented in all three training sources.
Hallucination: The model generates plausible-sounding but factually
incorrect answers for topics outside its training distribution
(e.g., Yamoussoukro geography: F1=0.00).
Orthography inconsistency: The Soynade dataset uses non-standard
Wolof orthography, causing spelling inconsistencies in outputs
(e.g., "péyum" instead of "péeyu").
Whisper ASR incompatibility: Wolof is not natively supported by
Whisper, limiting voice-based interface development on top of this model.
No factual grounding: The model has no access to external knowledge
sources and cannot verify or update factual claims.
Safety and Responsible Use
Guardrails implemented:
A keyword-based safety filter was added to src/context_state_machine.py.
It detects prompts requesting medical, legal, financial, or harmful content
and returns a guardrail message instead of a model response:
"This assistant is designed for Wolof educational purposes only.
For medical, legal, or critical decisions, please consult a qualified
professional."
Refusal behavior:
The deployed Gradio Space displays a visible limitations section informing
users that:
This is a classroom demo model, not a production assistant
Wolof is a low-resource language — outputs may be imperfect
The model was fine-tuned on ~6300 examples only
Do not use for critical or sensitive decisions
Prompt injection risks:
The context_state_machine.py retrieves training examples to augment
prompts. A confidence score mechanism was added to reject low-quality
retrievals (below similarity threshold) and prevent them from being
injected into the model context. However, this mitigation is not complete
and the model should not be used in adversarial environments.
Recommended use:
Always present model outputs as suggestions, not facts. Verify important
information with native Wolof speakers or authoritative sources.