File size: 4,104 Bytes
080af4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
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

```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.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.


## 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