rainspeed commited on
Commit
6e9e155
·
verified ·
1 Parent(s): 05e3d6a

update readme

Browse files
Files changed (1) hide show
  1. README.md +152 -65
README.md CHANGED
@@ -9,13 +9,32 @@ tags:
9
  - transformers
10
  - trl
11
  - unsloth
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  ---
13
 
14
- # Model Card for Model ID
15
 
16
  <!-- Provide a quick summary of what the model is/does. -->
17
 
18
-
19
 
20
  ## Model Details
21
 
@@ -23,23 +42,23 @@ tags:
23
 
24
  <!-- Provide a longer summary of what this model is. -->
25
 
 
26
 
 
 
 
 
 
 
 
27
 
28
- - **Developed by:** [More Information Needed]
29
- - **Funded by [optional]:** [More Information Needed]
30
- - **Shared by [optional]:** [More Information Needed]
31
- - **Model type:** [More Information Needed]
32
- - **Language(s) (NLP):** [More Information Needed]
33
- - **License:** [More Information Needed]
34
- - **Finetuned from model [optional]:** [More Information Needed]
35
-
36
- ### Model Sources [optional]
37
 
38
  <!-- Provide the basic links for the model. -->
39
 
40
- - **Repository:** [More Information Needed]
41
- - **Paper [optional]:** [More Information Needed]
42
- - **Demo [optional]:** [More Information Needed]
43
 
44
  ## Uses
45
 
@@ -49,37 +68,73 @@ tags:
49
 
50
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
51
 
52
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
53
 
54
- ### Downstream Use [optional]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
57
 
58
- [More Information Needed]
59
 
60
  ### Out-of-Scope Use
61
 
62
  <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
63
 
64
- [More Information Needed]
 
 
65
 
66
  ## Bias, Risks, and Limitations
67
 
68
  <!-- This section is meant to convey both technical and sociotechnical limitations. -->
69
 
70
- [More Information Needed]
71
 
72
  ### Recommendations
73
 
74
  <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
75
 
76
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
77
 
78
  ## How to Get Started with the Model
79
 
80
  Use the code below to get started with the model.
81
 
82
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
83
 
84
  ## Training Details
85
 
@@ -87,26 +142,43 @@ Use the code below to get started with the model.
87
 
88
  <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
89
 
90
- [More Information Needed]
 
 
 
 
91
 
92
  ### Training Procedure
93
 
94
  <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
95
 
96
- #### Preprocessing [optional]
97
-
98
- [More Information Needed]
99
 
 
100
 
101
  #### Training Hyperparameters
102
 
103
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
104
-
105
- #### Speeds, Sizes, Times [optional]
106
-
107
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
108
-
109
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
 
111
  ## Evaluation
112
 
@@ -116,35 +188,34 @@ Use the code below to get started with the model.
116
 
117
  #### Testing Data
118
 
119
- <!-- This should link to a Dataset Card if possible. -->
120
-
121
- [More Information Needed]
122
 
123
  #### Factors
124
 
125
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
126
-
127
- [More Information Needed]
128
 
129
  #### Metrics
130
 
131
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
132
-
133
- [More Information Needed]
134
 
135
  ### Results
136
 
137
- [More Information Needed]
 
 
 
138
 
139
- #### Summary
140
 
 
141
 
 
142
 
143
- ## Model Examination [optional]
144
 
145
  <!-- Relevant interpretability work for the model goes here -->
146
 
147
- [More Information Needed]
148
 
149
  ## Environmental Impact
150
 
@@ -152,59 +223,75 @@ Use the code below to get started with the model.
152
 
153
  Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
154
 
155
- - **Hardware Type:** [More Information Needed]
156
- - **Hours used:** [More Information Needed]
157
- - **Cloud Provider:** [More Information Needed]
158
- - **Compute Region:** [More Information Needed]
159
- - **Carbon Emitted:** [More Information Needed]
160
 
161
- ## Technical Specifications [optional]
162
 
163
  ### Model Architecture and Objective
164
 
165
- [More Information Needed]
166
 
167
  ### Compute Infrastructure
168
 
169
- [More Information Needed]
170
-
171
  #### Hardware
172
 
173
- [More Information Needed]
 
 
174
 
175
  #### Software
176
 
177
- [More Information Needed]
 
 
 
 
 
 
178
 
179
- ## Citation [optional]
180
 
181
  <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
182
 
183
  **BibTeX:**
184
 
185
- [More Information Needed]
 
 
 
 
 
 
 
 
186
 
187
  **APA:**
188
 
189
- [More Information Needed]
190
 
191
- ## Glossary [optional]
192
 
193
  <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
194
 
195
  [More Information Needed]
196
 
197
- ## More Information [optional]
198
 
199
  [More Information Needed]
200
 
201
- ## Model Card Authors [optional]
202
 
203
- [More Information Needed]
204
 
205
  ## Model Card Contact
206
 
207
- [More Information Needed]
 
208
  ### Framework versions
209
 
210
- - PEFT 0.19.1
 
 
9
  - transformers
10
  - trl
11
  - unsloth
12
+ license: apache-2.0
13
+ language:
14
+ - ms
15
+ ---
16
+ ```markdown
17
+ ---
18
+ base_model: unsloth/qwen2.5-7b-unsloth-bnb-4bit
19
+ library_name: peft
20
+ pipeline_tag: text-generation
21
+ tags:
22
+ - base_model:adapter:unsloth/qwen2.5-7b-unsloth-bnb-4bit
23
+ - lora
24
+ - sft
25
+ - transformers
26
+ - trl
27
+ - unsloth
28
+ - malaysian
29
+ - bahasa-melayu
30
+ - atlasflux
31
  ---
32
 
33
+ # Model Card for AtlasFlux Qwen 2.5 7B – LoRA Adapter for Malaysian Context
34
 
35
  <!-- Provide a quick summary of what the model is/does. -->
36
 
37
+ This is a **LoRA adapter** fine-tuned on `unsloth/qwen2.5-7b-unsloth-bnb-4bit` to improve understanding of Malaysian Bahasa Melayu, colloquial slang (Manglish), and regional dialects (Kelantan, Kedah, Terengganu, Johor, Sabah, Sarawak). The adapter is designed for chatbots and AI applications serving Malaysian users.
38
 
39
  ## Model Details
40
 
 
42
 
43
  <!-- Provide a longer summary of what this model is. -->
44
 
45
+ The model was fine-tuned using **QLoRA (4-bit quantisation)** on a custom instruction‑response dataset of **2,968 examples** covering general knowledge, local culture, everyday conversations, and the personal branding of AtlasFlux AI and Rainspeed Labs. The base model is `unsloth/qwen2.5-7b-unsloth-bnb-4bit`, an optimised 4‑bit version of Qwen2.5‑7B. Training was done on a single Google Colab T4 GPU (16GB VRAM) in about 90 minutes.
46
 
47
+ - **Developed by:** Muhammad Nabil (Rainspeed Labs / AtlasFlux AI)
48
+ - **Funded by:** Self‑funded
49
+ - **Shared by:** Muhammad Nabil
50
+ - **Model type:** LoRA adapter for decoder‑only transformer
51
+ - **Language(s) (NLP):** Bahasa Melayu (Standard, Colloquial, Regional dialects) and English
52
+ - **License:** Apache 2.0
53
+ - **Finetuned from model:** `unsloth/qwen2.5-7b-unsloth-bnb-4bit`
54
 
55
+ ### Model Sources
 
 
 
 
 
 
 
 
56
 
57
  <!-- Provide the basic links for the model. -->
58
 
59
+ - **Repository:** [rainspeed/atlasflux-qwen-7b-1.0](https://huggingface.co/rainspeed/atlasflux-qwen-7b-1.0)
60
+ - **Paper:** Included as `README.md` and research paper within the repo
61
+ - **Demo:** Not yet hosted – see usage instructions
62
 
63
  ## Uses
64
 
 
68
 
69
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
70
 
71
+ Load the adapter with the base model for text generation. **Required prompt format:**
72
+
73
+ ```
74
+ ### Instruction:\n{user question}\n\n### Response:\n
75
+ ```
76
+
77
+ Example code:
78
+
79
+ ```python
80
+ from transformers import AutoModelForCausalLM, AutoTokenizer
81
+ from peft import PeftModel
82
 
83
+ base = AutoModelForCausalLM.from_pretrained(
84
+ "unsloth/qwen2.5-7b-unsloth-bnb-4bit",
85
+ torch_dtype=torch.float16,
86
+ device_map="auto"
87
+ )
88
+ tokenizer = AutoTokenizer.from_pretrained("unsloth/qwen2.5-7b-unsloth-bnb-4bit")
89
+ model = PeftModel.from_pretrained(base, "rainspeed/atlasflux-qwen-7b-1.0")
90
+
91
+ prompt = "### Instruction:\nSiapa yang membina AtlasFlux AI?\n\n### Response:\n"
92
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
93
+ outputs = model.generate(**inputs, max_new_tokens=256)
94
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
95
+ ```
96
+
97
+ ### Downstream Use
98
 
99
  <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
100
 
101
+ The adapter can be merged into the base model for full‑weight deployment, or used as‑is with PEFT. Suitable for Malaysian customer support bots, localised Q&A, and educational tools.
102
 
103
  ### Out-of-Scope Use
104
 
105
  <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
106
 
107
+ - Generating harmful, discriminatory, or illegal content
108
+ - High‑stakes decisions (medical, legal, financial) without human verification
109
+ - Unauthorised commercial use that violates Apache 2.0
110
 
111
  ## Bias, Risks, and Limitations
112
 
113
  <!-- This section is meant to convey both technical and sociotechnical limitations. -->
114
 
115
+ The model was fine‑tuned on a **small dataset (2,968 examples)**, which may cause limited coverage of certain dialects or topics, occasional repetition, factual errors (hallucinations), and biases present in the training data (e.g., from public forums). No explicit safety alignment was performed.
116
 
117
  ### Recommendations
118
 
119
  <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
120
 
121
+ Users should always validate important outputs before acting on them. For production systems, consider augmenting with retrieval‑augmented generation (RAG) to ground answers in trusted sources. Periodically evaluate model outputs on representative Malaysian user inputs.
122
 
123
  ## How to Get Started with the Model
124
 
125
  Use the code below to get started with the model.
126
 
127
+ See the `Direct Use` section above for inference. To merge the adapter into a full model:
128
+
129
+ ```python
130
+ from peft import PeftModel
131
+ from transformers import AutoModelForCausalLM
132
+
133
+ base = AutoModelForCausalLM.from_pretrained("unsloth/qwen2.5-7b-unsloth-bnb-4bit")
134
+ model = PeftModel.from_pretrained(base, "rainspeed/atlasflux-qwen-7b-1.0")
135
+ merged = model.merge_and_unload()
136
+ merged.save_pretrained("atlasflux_merged")
137
+ ```
138
 
139
  ## Training Details
140
 
 
142
 
143
  <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
144
 
145
+ - **Size:** 2,968 instruction‑response pairs
146
+ - **Sources:** Public online forums, social media (Twitter, Facebook public pages, Lowyat.net), synthetic generation using Qwen2.5‑3B
147
+ - **Composition:** ~70% Standard Bahasa Melayu, ~20% Colloquial slang (Manglish), ~10% Regional dialects (Kelantan, Kedah, Terengganu, Johor, Sabah, Sarawak)
148
+ - **Format:** JSONL with fields `instruction` and `response`
149
+ - **Preprocessing:** Manual cleaning to remove personally identifiable information (PII) and noise
150
 
151
  ### Training Procedure
152
 
153
  <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
154
 
155
+ #### Preprocessing
 
 
156
 
157
+ Prompts were formatted as `### Instruction:\n{instruction}\n\n### Response:\n{response}`. The dataset was split into training only; no validation split was used.
158
 
159
  #### Training Hyperparameters
160
 
161
+ - **Training regime:** fp16 mixed precision
162
+ - **LoRA rank (r):** 16
163
+ - **LoRA alpha:** 16
164
+ - **Target modules:** q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
165
+ - **Dropout:** 0.0
166
+ - **Bias:** none
167
+ - **Gradient checkpointing:** enabled (Unsloth)
168
+ - **Per‑device batch size:** 1
169
+ - **Gradient accumulation steps:** 8
170
+ - **Learning rate:** 2e‑4
171
+ - **Optimiser:** AdamW 8‑bit
172
+ - **Warmup steps:** 5
173
+ - **Max steps:** 500
174
+ - **Random seed:** 3407
175
+
176
+ #### Speeds, Sizes, Times
177
+
178
+ - **Trainable parameters:** ~20.2 million (0.26% of full model)
179
+ - **Training time:** ~90 minutes on Google Colab T4 GPU
180
+ - **Adapter size:** ~80 MB (safetensors)
181
+ - **Full merged model size:** ~15 GB (FP16)
182
 
183
  ## Evaluation
184
 
 
188
 
189
  #### Testing Data
190
 
191
+ A held‑out set of 100 Malaysian prompts (not seen during training) was used for qualitative evaluation.
 
 
192
 
193
  #### Factors
194
 
195
+ Performance was assessed on factual recall of personal branding (AtlasFlux, Rainspeed Labs, Muhammad Nabil), colloquial slang, and dialect responses.
 
 
196
 
197
  #### Metrics
198
 
199
+ Qualitative assessment only (no quantitative benchmarks due to resource constraints).
 
 
200
 
201
  ### Results
202
 
203
+ The model correctly answered:
204
+ - “Siapa yang membina AtlasFlux AI?” → returns factual answer with name, UiTM, course
205
+ - “Aku nak gi mana?” (Kelantan dialect) → appropriate dialect response
206
+ - “Line internet aku slow gila.” → helpful troubleshooting advice
207
 
208
+ Limitations: small dataset leads to occasional generic English answers for very rare dialect phrases.
209
 
210
+ #### Summary
211
 
212
+ The fine‑tuned adapter successfully improves Malaysian cultural and linguistic understanding over the base Qwen2.5‑7B model, within the scope of a small‑scale fine‑tuning project.
213
 
214
+ ## Model Examination
215
 
216
  <!-- Relevant interpretability work for the model goes here -->
217
 
218
+ Not performed.
219
 
220
  ## Environmental Impact
221
 
 
223
 
224
  Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
225
 
226
+ - **Hardware Type:** NVIDIA T4
227
+ - **Hours used:** 1.5 hours
228
+ - **Cloud Provider:** Google Colab (assumed US‑central region)
229
+ - **Compute Region:** US‑central (estimated)
230
+ - **Carbon Emitted:** ~0.06 kg CO₂ (approx.)
231
 
232
+ ## Technical Specifications
233
 
234
  ### Model Architecture and Objective
235
 
236
+ Base architecture: Qwen 2.5‑7B (28 layers, 7.6B parameters). LoRA matrices injected into Q, K, V, O, and MLP projection layers. Training objective: next‑token prediction (causal language modelling).
237
 
238
  ### Compute Infrastructure
239
 
 
 
240
  #### Hardware
241
 
242
+ - GPU: NVIDIA T4 (16 GB VRAM)
243
+ - RAM: 12 GB (Colab runtime)
244
+ - Disk: ~78 GB temporary storage
245
 
246
  #### Software
247
 
248
+ - Python 3.12
249
+ - PyTorch 2.1.0
250
+ - Transformers 4.36.0
251
+ - PEFT 0.12.0
252
+ - Unsloth 2026.5.9
253
+ - bitsandbytes 0.49.2
254
+ - accelerate 0.25.0
255
 
256
+ ## Citation
257
 
258
  <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
259
 
260
  **BibTeX:**
261
 
262
+ ```bibtex
263
+ @misc{atlasflux2026,
264
+ author = {Muhammad Nabil},
265
+ title = {AtlasFlux Qwen 2.5 7B – LoRA adapter for Malaysian cultural and linguistic contexts},
266
+ year = {2026},
267
+ publisher = {Hugging Face},
268
+ url = {https://huggingface.co/rainspeed/atlasflux-qwen-7b-1.0}
269
+ }
270
+ ```
271
 
272
  **APA:**
273
 
274
+ Muhammad Nabil. (2026). *AtlasFlux Qwen 2.5 7B – LoRA adapter for Malaysian contexts*. Hugging Face. https://huggingface.co/rainspeed/atlasflux-qwen-7b-1.0
275
 
276
+ ## Glossary
277
 
278
  <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
279
 
280
  [More Information Needed]
281
 
282
+ ## More Information
283
 
284
  [More Information Needed]
285
 
286
+ ## Model Card Authors
287
 
288
+ Muhammad Nabil (Rainspeed Labs / AtlasFlux AI)
289
 
290
  ## Model Card Contact
291
 
292
+ support.atlasflux@gmail.com or via ticket system at [ai.atlasflux.my](https://ai.atlasflux.my)
293
+
294
  ### Framework versions
295
 
296
+ - PEFT 0.19.1
297
+ ```