Instructions to use dexplorer21/naija-scam-safe-aya-v22 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use dexplorer21/naija-scam-safe-aya-v22 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global") model = PeftModel.from_pretrained(base_model, "dexplorer21/naija-scam-safe-aya-v22") - Notebooks
- Google Colab
- Kaggle
Naija Scam-Safe Aya: LoRA adapter (Kaggle version 22)
You paste a message you received, and the model replies in the same language with three lines.
Verdict: SCAM, NOT SCAM or CAN'T HELP, then Why, then What to do. It works in Nigerian Pidgin,
mixed English and Pidgin, Yoruba, Hausa and Igbo.
What this file is. A LoRA adapter, which is a small add-on file (30.7 MB) that changes how a bigger
model answers without changing the bigger model itself. It sits on top of CohereLabs/tiny-aya-global, a
3.35-billion-parameter multilingual model from Cohere Labs. "Rank 16" means each added piece is a thin layer
16 numbers wide, and "q/k/v/o" names the four parts of the model's attention layers (the parts that decide
which earlier words matter) where the add-on sits.
- Licence. This adapter follows the base model's CC-BY-NC-4.0 licence, so non-commercial use only.
- How it was trained. Fine-tuning means showing the model worked examples until it copies their style. We used supervised fine-tuning (SFT, learning from question-and-answer pairs) with AlignTune on 183 synthetic examples written for this project (118 in the first round, 65 in the second). The model was scored only on the answer part of each example, not on the question, so it learned to write answers rather than to repeat messages. It saw every example 3 times (3 epochs) on one free Kaggle T4 GPU. The first round was called v17.
- Results on the 47-message test set (messages kept out of training, base model β version 22).
- Right verdict on scam and normal messages, 9/40 β 33/40.
- Scam recall (the share of scams it calls SCAM), 1/27 β 23/27.
- False alarms (normal messages wrongly called SCAM), 0/13 β 2/13.
- CAN'T HELP given to a person who only asked "is this a scam?", 19/40 β 2/40.
- Requests to help commit fraud that it refused plainly, 0/7 β 4/7. It wrote scam content 0 times.
- Fully right once the advice was also read by hand, 31/47 (66%). The first round got 27/47.
- A second, newer test. After training we wrote 38 new messages that no training round had used (a held-out set) and locked the file with a checksum. Version 22 got 32/32 verdicts right, 0/10 false alarms and 6/6 plain refusals. A first read of the advice, not yet checked by a second person, found 33/38 fully right. These messages are probably easier than the 47.
- Caveats. The second-round examples were chosen after looking at mistakes on the same 47 test messages, so the gain over v17 is optimistic. 39 of the 47 hand marks are by an AI assistant only. Version 22 is worse than v17 on 2 honest questions (it now says CAN'T HELP) and 3 replies. One of them tells the user to call the number in a fake "reversal failed" text.
- Limits. Small test sets, one training run per version, and only 5 test messages each in Yoruba, Hausa and Igbo, checked via Google Translate, not by a native speaker. It still sends loan-app harassment to the EFCC, CBN, NITDA or police instead of the FCCPC (the consumer protection agency that registers loan apps). Advisory only. Always confirm with your bank on its official number.
- Use the system prompt (the fixed instruction sent before each message) in
scamsafe/prompts.pyin the GitHub repo to get results that match ours. - Code, write-up and full numbers:
- Downloads last month
- -