gaialab-naija-adapter-v0.4 / README_v0.4.md
mgbam's picture
Upload README_v0.4.md
2b02347 verified
|
Raw History Blame Contribute Delete
3.5 kB
---
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
license: apache-2.0
---
# GaiaLab Naija Assistant v0.4
GaiaLab Naija Assistant v0.4 is an experimental LoRA adapter for `Qwen/Qwen2.5-0.5B-Instruct`.
This release introduced a more structured review and benchmarking process for Nigerian-context conversational AI.
## Model Details
| Field | Value |
|---|---|
| Version | v0.4 |
| Base model | `Qwen/Qwen2.5-0.5B-Instruct` |
| Fine-tuning method | LoRA / PEFT |
| Model type | Causal language model adapter |
| Reviewed dataset size | 50 examples |
| Training split | 45 examples |
| Validation split | 5 examples |
| Developer | Oluwafemi Idiakhoa |
| Project | GaiaLab AI |
## Benchmark Summary
The recorded v0.4 benchmark produced:
| Result | Count |
|---|---:|
| Pass | 8 |
| Fail | 11 |
| Needs review | 31 |
| Total | 50 |
A separate manual review found approximately 17 of 50 responses acceptable. These results motivated the development of the v0.5 dataset pipeline and corrective examples.
## Intended Uses
- Research and education
- Nigerian customer-service experiments
- Scam-awareness demonstrations
- Professional communication prototypes
- Nigerian English and basic Pidgin exploration
## Limitations
- The dataset is small
- Many benchmark responses required review
- The model may overfit specific examples
- Cultural and language coverage remains narrow
- The model may hallucinate
- Important outputs require human review
## Installation
```bash
pip install torch transformers peft
```
## Usage
```python
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.4"
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.
## Project Links
- GitHub: https://github.com/oluwafemidiakhoa/gaialab-naija-assistant
- Model: https://huggingface.co/mgbam/gaialab-naija-adapter-v0.4
- GaiaLab AI: https://www.gailabai.com