mgbam commited on
Commit
2b02347
·
verified ·
1 Parent(s): 7e11350

Upload README_v0.4.md

Browse files
Files changed (1) hide show
  1. README_v0.4.md +145 -0
README_v0.4.md ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ license: apache-2.0
16
+ ---
17
+
18
+ # GaiaLab Naija Assistant v0.4
19
+
20
+ GaiaLab Naija Assistant v0.4 is an experimental LoRA adapter for `Qwen/Qwen2.5-0.5B-Instruct`.
21
+
22
+ This release introduced a more structured review and benchmarking process for Nigerian-context conversational AI.
23
+
24
+ ## Model Details
25
+
26
+ | Field | Value |
27
+ |---|---|
28
+ | Version | v0.4 |
29
+ | Base model | `Qwen/Qwen2.5-0.5B-Instruct` |
30
+ | Fine-tuning method | LoRA / PEFT |
31
+ | Model type | Causal language model adapter |
32
+ | Reviewed dataset size | 50 examples |
33
+ | Training split | 45 examples |
34
+ | Validation split | 5 examples |
35
+ | Developer | Oluwafemi Idiakhoa |
36
+ | Project | GaiaLab AI |
37
+
38
+ ## Benchmark Summary
39
+
40
+ The recorded v0.4 benchmark produced:
41
+
42
+ | Result | Count |
43
+ |---|---:|
44
+ | Pass | 8 |
45
+ | Fail | 11 |
46
+ | Needs review | 31 |
47
+ | Total | 50 |
48
+
49
+ 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.
50
+
51
+ ## Intended Uses
52
+
53
+ - Research and education
54
+ - Nigerian customer-service experiments
55
+ - Scam-awareness demonstrations
56
+ - Professional communication prototypes
57
+ - Nigerian English and basic Pidgin exploration
58
+
59
+ ## Limitations
60
+
61
+ - The dataset is small
62
+ - Many benchmark responses required review
63
+ - The model may overfit specific examples
64
+ - Cultural and language coverage remains narrow
65
+ - The model may hallucinate
66
+ - Important outputs require human review
67
+
68
+ ## Installation
69
+
70
+ ```bash
71
+ pip install torch transformers peft
72
+ ```
73
+
74
+ ## Usage
75
+
76
+ ```python
77
+ import torch
78
+ from peft import PeftModel
79
+ from transformers import AutoModelForCausalLM, AutoTokenizer
80
+
81
+ base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
82
+ adapter_id = "mgbam/gaialab-naija-adapter-v0.4"
83
+
84
+ tokenizer = AutoTokenizer.from_pretrained(
85
+ base_model_id,
86
+ trust_remote_code=True,
87
+ )
88
+
89
+ base_model = AutoModelForCausalLM.from_pretrained(
90
+ base_model_id,
91
+ torch_dtype=torch.float32,
92
+ trust_remote_code=True,
93
+ )
94
+
95
+ model = PeftModel.from_pretrained(base_model, adapter_id)
96
+
97
+ messages = [
98
+ {
99
+ "role": "system",
100
+ "content": (
101
+ "You are GaiaLab Naija Assistant. Be helpful, concise, "
102
+ "culturally aware, truthful, and safe."
103
+ ),
104
+ },
105
+ {
106
+ "role": "user",
107
+ "content": "Write a polite payment reminder for a customer.",
108
+ },
109
+ ]
110
+
111
+ text = tokenizer.apply_chat_template(
112
+ messages,
113
+ tokenize=False,
114
+ add_generation_prompt=True,
115
+ )
116
+
117
+ inputs = tokenizer(text, return_tensors="pt")
118
+
119
+ with torch.no_grad():
120
+ output = model.generate(
121
+ **inputs,
122
+ max_new_tokens=120,
123
+ do_sample=False,
124
+ )
125
+
126
+ new_tokens = output[0][inputs["input_ids"].shape[1]:]
127
+ print(tokenizer.decode(new_tokens, skip_special_tokens=True))
128
+ ```
129
+
130
+ ## Responsible Use
131
+
132
+ Do not use this model as the sole authority for medical, legal, financial, emergency, employment, identity-verification, or other high-impact decisions.
133
+
134
+ Never provide passwords, PINs, one-time passwords, bank verification codes, private keys, or other sensitive credentials to the model.
135
+
136
+ ## Author
137
+
138
+ Developed by **Oluwafemi Idiakhoa** under the **GaiaLab AI** initiative.
139
+
140
+
141
+ ## Project Links
142
+
143
+ - GitHub: https://github.com/oluwafemidiakhoa/gaialab-naija-assistant
144
+ - Model: https://huggingface.co/mgbam/gaialab-naija-adapter-v0.4
145
+ - GaiaLab AI: https://www.gailabai.com