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
base_model: Qwen/Qwen2.5-0.5B-Instruct
library_name: peft
pipeline_tag: text-generation
language:
- en
tags:
- lora
- peft
- nigeria
- nigerian-english
- nigerian-pidgin
- customer-service
- scam-safety
- business-writing
license: apache-2.0
GaiaLab Naija Assistant v0.5
GaiaLab Naija Assistant v0.5 is an experimental LoRA adapter for Qwen/Qwen2.5-0.5B-Instruct.
This release adds a reproducible dataset workflow for CSV ingestion, JSONL generation, validation, duplicate checking, statistics, and CPU-compatible LoRA training.
Model Details
| Field | Value |
|---|---|
| Version | v0.5 |
| Base model | Qwen/Qwen2.5-0.5B-Instruct |
| Fine-tuning method | LoRA / PEFT |
| Model type | Causal language model adapter |
| Training examples | 47 |
| Dataset health score | 95/100 |
| Developer | Oluwafemi Idiakhoa |
| Project | GaiaLab AI |
Training Categories
| 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 v0.5 pipeline reported:
- Valid JSONL
- Required fields present
- Correct system, user, and assistant role order
- Zero duplicate IDs
- Zero duplicate prompts
- Zero missing prompts
- Zero missing responses
- Dataset health score of 95/100
Evaluation Status
A formal side-by-side benchmark comparing v0.4 and v0.5 has not yet been published. This model card does not claim that v0.5 outperforms v0.4.
Intended Uses
- Research and education
- Nigerian customer-service prototypes
- Professional message drafting
- Scam-awareness demonstrations
- Nigerian English experimentation
- Basic Nigerian Pidgin experimentation
- CPU-friendly LoRA research
Limitations
- The training dataset contains only 47 examples
- Business writing and Pidgin each contain only one example
- The dataset is unevenly distributed
- The adapter may overfit specific wording
- Cultural coverage is narrow
- The model may hallucinate
- Human review is required for important outputs
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 payment reminder for a customer.",
},
]
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,
)
new_tokens = output[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))
Responsible Use
Do not use this model as the sole authority for medical, legal, financial, emergency, employment, identity-verification, or other high-impact decisions.
Never provide passwords, PINs, one-time passwords, bank verification codes, private keys, or other sensitive credentials to the model.
Author
Developed by Oluwafemi Idiakhoa under the GaiaLab AI initiative.