mgbam commited on
Commit
080af4f
·
verified ·
1 Parent(s): 48f09b0

Upload README_v0.5.md

Browse files
Files changed (1) hide show
  1. README_v0.5.md +172 -0
README_v0.5.md ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-0.5B-Instruct
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - lora
9
+ - peft
10
+ - nigeria
11
+ - nigerian-english
12
+ - nigerian-pidgin
13
+ - customer-service
14
+ - scam-safety
15
+ - business-writing
16
+ license: apache-2.0
17
+ ---
18
+
19
+ # GaiaLab Naija Assistant v0.5
20
+
21
+ GaiaLab Naija Assistant v0.5 is an experimental LoRA adapter for `Qwen/Qwen2.5-0.5B-Instruct`.
22
+
23
+ This release adds a reproducible dataset workflow for CSV ingestion, JSONL generation, validation, duplicate checking, statistics, and CPU-compatible LoRA training.
24
+
25
+ ## Model Details
26
+
27
+ | Field | Value |
28
+ |---|---|
29
+ | Version | v0.5 |
30
+ | Base model | `Qwen/Qwen2.5-0.5B-Instruct` |
31
+ | Fine-tuning method | LoRA / PEFT |
32
+ | Model type | Causal language model adapter |
33
+ | Training examples | 47 |
34
+ | Dataset health score | 95/100 |
35
+ | Developer | Oluwafemi Idiakhoa |
36
+ | Project | GaiaLab AI |
37
+
38
+ ## Training Categories
39
+
40
+ | Category | Examples |
41
+ |---|---:|
42
+ | Safety and scams | 13 |
43
+ | Professional boundaries | 12 |
44
+ | Customer service | 10 |
45
+ | Nigerian English | 10 |
46
+ | Business writing | 1 |
47
+ | Nigerian Pidgin | 1 |
48
+ | **Total** | **47** |
49
+
50
+ ## Risk-Level Distribution
51
+
52
+ | Risk level | Examples |
53
+ |---|---:|
54
+ | High | 19 |
55
+ | Medium | 7 |
56
+ | Low | 21 |
57
+
58
+ ## Dataset Validation
59
+
60
+ The v0.5 pipeline reported:
61
+
62
+ - Valid JSONL
63
+ - Required fields present
64
+ - Correct system, user, and assistant role order
65
+ - Zero duplicate IDs
66
+ - Zero duplicate prompts
67
+ - Zero missing prompts
68
+ - Zero missing responses
69
+ - Dataset health score of 95/100
70
+
71
+ ## Evaluation Status
72
+
73
+ 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.
74
+
75
+ ## Intended Uses
76
+
77
+ - Research and education
78
+ - Nigerian customer-service prototypes
79
+ - Professional message drafting
80
+ - Scam-awareness demonstrations
81
+ - Nigerian English experimentation
82
+ - Basic Nigerian Pidgin experimentation
83
+ - CPU-friendly LoRA research
84
+
85
+ ## Limitations
86
+
87
+ - The training dataset contains only 47 examples
88
+ - Business writing and Pidgin each contain only one example
89
+ - The dataset is unevenly distributed
90
+ - The adapter may overfit specific wording
91
+ - Cultural coverage is narrow
92
+ - The model may hallucinate
93
+ - Human review is required for important outputs
94
+
95
+ ## Installation
96
+
97
+ ```bash
98
+ pip install torch transformers peft
99
+ ```
100
+
101
+ ## Usage
102
+
103
+ ```python
104
+ import torch
105
+ from peft import PeftModel
106
+ from transformers import AutoModelForCausalLM, AutoTokenizer
107
+
108
+ base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
109
+ adapter_id = "mgbam/gaialab-naija-adapter-v0.5"
110
+
111
+ tokenizer = AutoTokenizer.from_pretrained(
112
+ base_model_id,
113
+ trust_remote_code=True,
114
+ )
115
+
116
+ base_model = AutoModelForCausalLM.from_pretrained(
117
+ base_model_id,
118
+ torch_dtype=torch.float32,
119
+ trust_remote_code=True,
120
+ )
121
+
122
+ model = PeftModel.from_pretrained(base_model, adapter_id)
123
+
124
+ messages = [
125
+ {
126
+ "role": "system",
127
+ "content": (
128
+ "You are GaiaLab Naija Assistant. Be helpful, concise, "
129
+ "culturally aware, truthful, and safe."
130
+ ),
131
+ },
132
+ {
133
+ "role": "user",
134
+ "content": "Write a polite payment reminder for a customer.",
135
+ },
136
+ ]
137
+
138
+ text = tokenizer.apply_chat_template(
139
+ messages,
140
+ tokenize=False,
141
+ add_generation_prompt=True,
142
+ )
143
+
144
+ inputs = tokenizer(text, return_tensors="pt")
145
+
146
+ with torch.no_grad():
147
+ output = model.generate(
148
+ **inputs,
149
+ max_new_tokens=120,
150
+ do_sample=False,
151
+ )
152
+
153
+ new_tokens = output[0][inputs["input_ids"].shape[1]:]
154
+ print(tokenizer.decode(new_tokens, skip_special_tokens=True))
155
+ ```
156
+
157
+ ## Responsible Use
158
+
159
+ Do not use this model as the sole authority for medical, legal, financial, emergency, employment, identity-verification, or other high-impact decisions.
160
+
161
+ Never provide passwords, PINs, one-time passwords, bank verification codes, private keys, or other sensitive credentials to the model.
162
+
163
+ ## Author
164
+
165
+ Developed by **Oluwafemi Idiakhoa** under the **GaiaLab AI** initiative.
166
+
167
+
168
+ ## Project Links
169
+
170
+ - GitHub: https://github.com/oluwafemidiakhoa/gaialab-naija-assistant
171
+ - Model: https://huggingface.co/mgbam/gaialab-naija-adapter-v0.5
172
+ - GaiaLab AI: https://www.gailabai.com