Instructions to use mgbam/gaialab-naija-adapter-v0.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mgbam/gaialab-naija-adapter-v0.5 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "mgbam/gaialab-naija-adapter-v0.5") - Notebooks
- Google Colab
- Kaggle
GaiaLab Naija Assistant v0.5
GaiaLab Naija Assistant v0.5 is an experimental LoRA adapter for
Qwen/Qwen2.5-0.5B-Instruct.
It is designed to explore small, accessible language models for Nigerian-context communication, including customer service, Nigerian English, basic Nigerian Pidgin, professional boundaries, business writing, and scam-safety guidance.
Important status
This is an early research release.
The adapter was trained on a small, manually reviewed dataset of 47 examples. It should not be treated as a production-ready general-purpose assistant.
The current release demonstrates a reproducible workflow for:
- creating training examples from CSV
- generating JSONL training data
- validating dataset structure
- detecting duplicate IDs and prompts
- calculating dataset statistics
- training a CPU-compatible LoRA adapter
- versioning model releases
Model details
| Field | Value |
|---|---|
| Model | GaiaLab Naija Assistant v0.5 |
| Base model | Qwen/Qwen2.5-0.5B-Instruct |
| Fine-tuning method | LoRA / PEFT |
| Model type | Causal language model adapter |
| Primary language | English |
| Additional language variety | Nigerian English and basic Nigerian Pidgin |
| Training examples | 47 |
| Dataset health score | 95/100 |
| Developer | Oluwafemi Idiakhoa |
| Project | GaiaLab AI |
Training-data categories
The v0.5 training dataset contained:
| Category | Examples |
|---|---|
| Safety and scams | 13 |
| Professional boundaries | 12 |
| Customer service | 10 |
| Nigerian English | 10 |
| Business writing | 1 |
| Nigerian Pidgin | 1 |
| Total | 47 |
Risk-level distribution:
| Risk level | Examples |
|---|---|
| High | 19 |
| Medium | 7 |
| Low | 21 |
Dataset validation
The dataset pipeline reported:
- valid JSONL structure
- required fields present
- correct system, user, and assistant message order
- zero duplicate IDs
- zero duplicate prompts
- zero missing prompts
- zero missing responses
- dataset health score of 95/100
Intended uses
This adapter may be useful for:
- research on Nigerian-context conversational AI
- educational demonstrations of LoRA fine-tuning
- Nigerian customer-service prototypes
- professional-message drafting experiments
- scam-awareness and credential-safety demonstrations
- Nigerian English and basic Pidgin experimentation
- CPU-friendly small-model research
Out-of-scope uses
This model should not be used as the sole authority for:
- medical decisions
- legal advice
- financial decisions
- banking authentication
- emergency response
- employment decisions
- identity verification
- high-impact automated decision-making
Never provide passwords, PINs, one-time passwords, bank verification codes, private keys, or other sensitive credentials to the model.
Installation
pip install torch transformers peft
Usage
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
adapter_id = "mgbam/gaialab-naija-adapter-v0.5"
tokenizer = AutoTokenizer.from_pretrained(
base_model_id,
trust_remote_code=True,
)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float32,
trust_remote_code=True,
)
model = PeftModel.from_pretrained(
base_model,
adapter_id,
)
messages = [
{
"role": "system",
"content": (
"You are GaiaLab Naija Assistant. Be helpful, concise, "
"culturally aware, truthful, and safe."
),
},
{
"role": "user",
"content": "Write a polite reminder for a customer who has not paid.",
},
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=120,
do_sample=False,
)
generated_tokens = output[0][inputs["input_ids"].shape[1]:]
response = tokenizer.decode(
generated_tokens,
skip_special_tokens=True,
)
print(response)
Example areas
The adapter was trained on examples involving:
- suspicious requests for OTPs and PINs
- safe handling of account credentials
- professional customer responses
- Nigerian-style business communication
- polite payment reminders
- simple Nigerian English phrasing
- introductory Nigerian Pidgin translations
- maintaining appropriate professional boundaries
Training approach
The adapter was trained with LoRA using the PEFT library.
The local training configuration included:
- LoRA rank: 16
- LoRA alpha: 32
- LoRA dropout: 0.05
- training epochs: 3
- batch size: 1
- gradient accumulation steps: 8
- maximum sequence length: 512
- optimizer: AdamW
- CPU-compatible float32 loading
- base model:
Qwen/Qwen2.5-0.5B-Instruct
Evaluation status
A formal side-by-side comparison between v0.4 and v0.5 has not yet been published.
Therefore, this model card does not claim that v0.5 performs better than v0.4.
Evaluation results will be added after both adapters are tested on the same held-out benchmark and reviewed using consistent criteria.
Limitations
The training dataset is very small and unevenly distributed.
In particular:
- business writing has only one example
- Nigerian Pidgin has only one example
- the adapter may overfit specific phrasings
- responses may be inconsistent
- cultural coverage is narrow
- the model may hallucinate information
- safety behaviour has not been independently audited
- performance outside the training categories is unknown
- English and Pidgin quality may vary significantly
All important outputs should be reviewed by a person.
Version history
| Version | Status |
|---|---|
| v0.1 | Initial experimental adapter |
| v0.2 | Early iterative release |
| v0.3 | Expanded experimental release |
| v0.4 | First formally reviewed and benchmarked development version |
| v0.5 | Reproducible dataset pipeline and corrective-example training release |
Project links
- GitHub:
https://github.com/oluwafemidiakhoa/gaialab-naija-assistant - Model:
https://huggingface.co/mgbam/gaialab-naija-adapter-v0.5 - GaiaLab AI:
https://www.gailabai.com
Responsible-use statement
GaiaLab Naija Assistant is an experimental research project. Users are responsible for reviewing generated content before relying on it or sending it to others.
Do not use this model to impersonate individuals, facilitate fraud, request confidential credentials, or make consequential decisions without qualified human oversight.
Author
Developed by Oluwafemi Idiakhoa under the GaiaLab AI initiative.
- Downloads last month
- 46