abdallah3id commited on
Commit
a8f109a
·
verified ·
1 Parent(s): 860fc1f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +643 -176
README.md CHANGED
@@ -1,454 +1,921 @@
1
  ---
2
  library_name: transformers
3
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  license_link: https://huggingface.co/abdallah3id/rawda-coder-30b-a3b/blob/main/LICENSE
 
5
  pipeline_tag: text-generation
 
6
  tags:
7
- - rawda-ai
8
- - islamic-ai
9
- - islam
10
- - sunnah
11
- - quran
12
- - arabic
13
- - qwen3
14
- - text-generation
 
 
 
 
 
 
 
15
  language:
16
- - ar
17
- - en
 
 
 
18
  base_model: abdallah3id/rawda-coder-30b-a3b
 
19
  ---
20
 
21
- <div align="center">
 
 
 
 
22
 
23
  <img src="RAWDAAI.png" width="100%" alt="RAWDA AI"/>
24
 
25
- # 🌿 RAWDA AI
26
 
27
- ### Islamic Knowledge • Qur'an • Sunnah • Arabic AI
28
 
29
- **RAWDA AI is an Islamic-oriented AI project designed to serve Islam and the Sunnah through careful, respectful, source-aware assistance.**
 
 
 
 
 
 
 
 
 
 
30
 
31
  ![RAWDA AI](https://img.shields.io/badge/RAWDA-AI-1f8b4c?style=for-the-badge)
 
32
  ![Focus](https://img.shields.io/badge/FOCUS-ISLAM%20%26%20SUNNAH-0b6e4f?style=for-the-badge)
 
33
  ![Arabic](https://img.shields.io/badge/LANGUAGE-ARABIC%20%7C%20ENGLISH-2563eb?style=for-the-badge)
34
- ![Base](https://img.shields.io/badge/BASE-QWEN3%20CODER%2030B-7c3aed?style=for-the-badge)
 
 
35
  ![License](https://img.shields.io/badge/LICENSE-APACHE%202.0-d97706?style=for-the-badge)
36
 
 
 
37
  </div>
38
 
39
- ---
40
 
41
- # 🕌 About RAWDA AI
42
 
43
- **RAWDA AI** is an Islamic-oriented artificial intelligence project maintained by **Abdalla Eid**.
 
 
 
 
 
 
 
 
 
 
44
 
45
  The project is designed to provide helpful assistance around Islamic learning, the Qur'an, the Sunnah, Arabic-language research, study organization, and general knowledge while emphasizing respect for Islamic sources and scholarly verification.
46
 
47
- The model repository is based on **Qwen3-Coder-30B-A3B-Instruct**. The underlying Qwen model was originally developed and trained by the **Qwen Team**.
 
 
 
 
48
 
49
  RAWDA AI aims to provide a clear Islamic-oriented identity and usage framework on top of this foundation.
50
 
51
- > **Important:** An AI model is not a mufti, scholar, or substitute for qualified Islamic scholarship. Religious rulings and sensitive matters should be verified with reliable primary sources and qualified scholars.
52
 
53
- ---
54
 
55
- # 🌙 Mission
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
- > **Technology in the service of beneficial knowledge.**
58
 
59
  RAWDA AI is intended to support Muslims, students, researchers, educators, and Arabic-speaking users with accessible AI assistance while encouraging verification and responsible use.
60
 
61
- ### Core objectives
 
 
 
 
62
 
63
  | Area | RAWDA AI Objective |
 
64
  |---|---|
 
65
  | 📖 Qur'an | Assist with study, explanation, themes, and references |
 
66
  | ﷺ Sunnah | Help organize and understand hadith-related information |
 
67
  | 🕌 Islamic Studies | Support structured learning and research |
 
68
  | 🔎 Source Awareness | Encourage citations and verification |
 
69
  | 📝 Arabic | Provide strong Arabic-language assistance |
 
70
  | 🎓 Education | Create summaries, questions, study plans, and explanations |
 
71
  | 💻 Technology | Assist with technical and programming tasks inherited from the base model |
 
72
  | 🌍 General Knowledge | Provide useful general-purpose assistance within the project's principles |
73
 
74
- ---
75
 
76
- # ☪️ Islamic Knowledge Principles
 
 
 
 
 
 
 
77
 
78
  RAWDA AI is designed around several important principles:
79
 
 
 
80
  ```text
81
- 🌿 RAWDA AI 🌿
82
- │
83
- ┌────────────────┼────────────────┐
84
- ▼ ▼ ▼
85
- القرآن السنة العلم النافع
86
- Qur'an Sunnah Beneficial Knowledge
87
- │ │ │
88
- └────────────────┼────────────────┘
89
- ▼
90
- SOURCE AWARENESS
91
- │
92
- ▼
93
- CONTEXT + VERIFICATION
94
- │
95
- ▼
96
- RESPECTFUL RESPONSE
97
- │
98
- ▼
99
- HUMAN / SCHOLAR REVIEW
100
- when religious judgment
101
- is significant
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  ```
103
 
 
 
104
  The desired response behavior is to distinguish between established source material, scholarly interpretation, uncertain information, and general AI-generated explanation.
105
 
106
- ---
107
 
108
- # 📖 Qur'an Assistance
 
 
 
 
 
 
 
109
 
110
  RAWDA AI can be used to assist with tasks such as:
111
 
 
 
112
  - Finding and organizing Qur'anic topics.
 
113
  - Explaining vocabulary and concepts.
 
114
  - Creating study notes.
 
115
  - Comparing themes across passages.
 
116
  - Producing Arabic/English study material.
 
117
  - Organizing references for further research.
 
118
  - Creating revision questions and educational summaries.
119
 
 
 
120
  When exact Qur'anic wording matters, users should verify the Arabic text against an authoritative mushaf or trusted Qur'an source.
121
 
122
- ---
123
 
124
- # ﷺ Sunnah & Hadith Assistance
 
 
 
 
 
 
 
125
 
126
  RAWDA AI is intended to help users navigate hadith-related study without presenting itself as an independent hadith authority.
127
 
 
 
128
  It may assist with:
129
 
 
 
130
  - Explaining the general meaning of a hadith.
 
131
  - Organizing hadith study notes.
 
132
  - Identifying information that requires source verification.
 
133
  - Comparing themes across narrations.
 
134
  - Summarizing scholarly material supplied by the user.
 
135
  - Producing structured research notes.
136
 
 
 
137
  > Hadith wording, attribution, grading, chains of transmission, and legal conclusions should be checked against recognized hadith collections and qualified scholarship.
138
 
139
- ---
140
 
141
- # 🧭 Religious Questions
 
 
 
 
 
 
 
142
 
143
  For ordinary educational questions, RAWDA AI aims to provide clear and respectful explanations.
144
 
145
- For questions involving **fatwa, halal/haram judgments, marriage, divorce, inheritance, financial rulings, creed disputes, or other consequential religious matters**, the model should avoid presenting uncertain generated content as a definitive ruling.
 
 
 
 
146
 
147
  A preferred structure is:
148
 
 
 
149
  ```text
150
- 1. QUESTION
151
- ↓
152
- 2. RELEVANT QUR'AN / SUNNAH CONTEXT
153
- ↓
154
- 3. SCHOLARLY CONTEXT WHEN KNOWN
155
- ↓
156
- 4. CLEARLY IDENTIFY UNCERTAINTY
157
- ↓
158
- 5. RECOMMEND VERIFICATION
159
- ↓
160
- 6. QUALIFIED SCHOLAR FOR A FORMAL RULING
 
 
 
 
 
 
 
 
 
 
 
 
161
  ```
162
 
163
- ---
164
 
165
- # 🧠 Model Architecture
166
 
167
- RAWDA AI uses **Qwen3-Coder-30B-A3B-Instruct** as its foundation model.
 
 
 
 
 
 
 
 
 
 
168
 
169
  | Specification | Value |
 
170
  |---|---|
 
171
  | Architecture | Causal Language Model / Mixture-of-Experts |
 
172
  | Total Parameters | 30.5B |
 
173
  | Activated Parameters | 3.3B |
 
174
  | Layers | 48 |
 
175
  | Attention Heads (GQA) | 32 Q / 4 KV |
 
176
  | Experts | 128 |
 
177
  | Activated Experts | 8 |
 
178
  | Native Context | 262,144 tokens |
 
179
  | Mode | Non-thinking |
180
- | Base Model | Qwen3-Coder-30B-A3B-Instruct |
181
 
182
- The architecture values above describe the underlying Qwen foundation model, not a separate RAWDA AI architecture.
 
 
 
 
 
 
 
 
 
 
 
 
183
 
184
- ---
185
 
186
- # 🏗️ RAWDA AI System Concept
187
 
188
  ```text
 
189
  ╔══════════════════════════════════════════════╗
190
- ║ QWEN3-CODER-30B-A3B-INSTRUCT ║
191
- ║ Foundation Model ║
 
 
 
192
  ╚══════════════════════╤═══════════════════════╝
193
- │
194
- ▼
 
 
 
195
  ┌──────────────────────────────────────────────┐
196
- │ RAWDA AI IDENTITY │
197
- │ │
198
- │ Islam • Sunnah • Arabic • Education │
199
- │ Respect • Source Awareness • Verification │
 
 
 
 
 
200
  └──────────────────────┬───────────────────────┘
201
- │
202
- ▼
 
 
 
203
  ╔══════════════════════════════════════════════╗
204
- ║ RESPONSE PRINCIPLES ║
205
- ║ ║
206
- ║ Evidence → Context → Clarity → Verification ║
 
 
 
 
207
  ╚══════════════════════╤═══════════════════════╝
208
- │
209
- ┌────────────┼────────────┐
210
- ▼ ▼ ▼
211
- Qur'an Sunnah Education
212
- │ │ │
213
- └────────────┼────────────┘
214
- ▼
215
- 🌿 RAWDA AI 🌿
 
 
 
 
 
 
 
 
 
216
  ```
217
 
218
- ---
219
 
220
- # ✨ Key Capabilities
221
 
222
- ### 🕌 Islamic-oriented assistance
 
 
 
 
 
 
 
 
 
223
  Structured assistance for Islamic study and educational workflows.
224
 
225
- ### 🇸🇦 Arabic-first usability
 
 
 
226
  Designed to be useful for Arabic questions and Arabic educational content while retaining English capability.
227
 
228
- ### 📚 Long-context research
229
- The underlying model supports a native context length of **262,144 tokens**, useful for working with large collections of notes and documents, subject to available hardware and inference configuration.
230
 
231
- ### 💻 Coding & technical capability
232
- Because RAWDA AI is based on Qwen3-Coder, it retains the foundation model's strong orientation toward coding and technical assistance.
233
 
234
- ### 🔎 Source-aware workflow
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  For religious topics, RAWDA AI encourages users to distinguish between exact source material, interpretation, and generated explanation.
236
 
237
- ---
238
 
239
- # 🚀 Quickstart
 
 
 
 
 
 
 
240
 
241
  We recommend using a recent version of `transformers`.
242
 
 
 
243
  ```python
 
244
  from transformers import AutoModelForCausalLM, AutoTokenizer
245
 
246
- model_name = "YOUR-HUGGINGFACE-USERNAME/YOUR-RAWDA-AI-REPOSITORY"
 
 
 
 
247
 
248
  tokenizer = AutoTokenizer.from_pretrained(model_name)
249
 
 
 
250
  model = AutoModelForCausalLM.from_pretrained(
251
- model_name,
252
- torch_dtype="auto",
253
- device_map="auto"
 
 
 
 
254
  )
255
 
 
 
256
  messages = [
257
- {
258
- "role": "user",
259
- "content": "اشرح لي مفهوم الإحسان في الإسلام بطريقة تعليمية مختصرة."
260
- }
 
 
 
 
 
261
  ]
262
 
 
 
263
  text = tokenizer.apply_chat_template(
264
- messages,
265
- tokenize=False,
266
- add_generation_prompt=True
 
 
 
 
267
  )
268
 
 
 
269
  model_inputs = tokenizer(
270
- [text],
271
- return_tensors="pt"
 
 
 
272
  ).to(model.device)
273
 
 
 
274
  generated_ids = model.generate(
275
- **model_inputs,
276
- max_new_tokens=2048
 
 
 
277
  )
278
 
 
 
279
  output_ids = generated_ids[0][len(model_inputs.input_ids[0]):]
280
 
 
 
281
  response = tokenizer.decode(
282
- output_ids,
283
- skip_special_tokens=True
 
 
 
284
  )
285
 
 
 
286
  print(response)
 
287
  ```
288
 
289
- > Replace `YOUR-HUGGINGFACE-USERNAME/YOUR-RAWDA-AI-REPOSITORY` with the exact Hugging Face repository ID.
290
 
291
- ---
292
 
293
- # 💡 Example 1 — Islamic Education
 
 
 
 
 
 
 
 
 
 
 
 
 
294
 
295
- ### User
296
 
297
  ```text
 
298
  ما معنى الإحسان في الإسلام؟
 
299
  ```
300
 
301
- ### Desired RAWDA AI response style
 
 
 
 
302
 
303
  ```text
 
304
  الإحسان من أعظم مراتب الدين.
305
 
 
 
306
  ومن أشهر ما يبين معناه حديث جبريل، وفيه أن النبي ﷺ بيّن
 
307
  الإحسان بمعنى عبادة الله على مقام المراقبة واستحضار اطلاع الله
 
308
  على العبد.
309
 
 
 
310
  ومن الناحية التعليمية يمكن فهم مراتب الدين المذكورة في الحديث
 
311
  على النحو الآتي:
312
 
313
- 1. الإسلام
314
- 2. الإيمان
315
- 3. الإحسان
 
 
 
 
 
 
316
 
317
  وللدراسة أو الاستدلال الشرعي الدقيق، ينبغي الرجوع إلى النص
 
318
  الكامل للحديث وشروح أهل العلم المعتبرة، وعدم الاعتماد على
 
319
  صياغة الذكاء الاصطناعي وحدها.
 
320
  ```
321
 
322
- ---
323
 
324
- # 💡 Example 2 — Hadith Research
325
 
326
- ### User
 
 
 
 
 
 
 
 
 
 
327
 
328
  ```text
 
329
  وجدت حديثاً على الإنترنت. كيف أتأكد من صحته؟
 
330
  ```
331
 
332
- ### Desired RAWDA AI response style
 
 
 
 
333
 
334
  ```text
 
335
  للتحقق من الحديث لا يكفي أن يكون النص منتشراً على الإنترنت.
336
 
 
 
337
  يمكن اتباع الخطوات التالية:
338
 
339
- 1. البحث عن نص الحديث في مصادر حديثية موثوقة.
340
- 2. معرفة الكتاب والباب ورقم الحديث إن أمكن.
341
- 3. التحقق من درجة الحديث عند أهل الاختصاص.
342
- 4. التفريق بين نص الحديث وبين شرح الكاتب أو الناقل.
343
- 5. مقارنة أكثر من مصدر عند وجود اختلاف.
344
- 6. الرجوع إلى أهل العلم في المسائل التي يترتب عليها حكم شرعي.
 
 
 
 
 
 
 
 
 
345
 
346
  إذا أرسلت نص الحديث ومصدره، يمكن تنظيم المعلومات المتاحة
 
347
  وتحديد النقاط التي تحتاج إلى تحقق إضافي.
 
348
  ```
349
 
350
- ---
351
 
352
- # ⚙️ Recommended Generation Settings
353
 
354
- For general use, a reasonable starting configuration inherited from the base model's guidance is:
 
 
 
 
 
 
 
 
 
 
355
 
356
  ```text
357
- temperature: 0.7
358
- top_p: 0.8
359
- top_k: 20
360
- repetition_penalty: 1.05
 
 
 
 
 
361
  ```
362
 
 
 
363
  For source-sensitive religious questions, lower randomness may be preferable when the goal is consistency, but generation settings do not guarantee factual or religious correctness.
364
 
365
- ---
366
 
367
- # 🛡️ Reliability & Safety
 
 
 
 
 
 
 
368
 
369
  RAWDA AI should:
370
 
 
 
371
  ```text
 
372
  ✓ Treat the Qur'an and authentic Sunnah with respect
 
373
  ✓ Distinguish quotation from explanation
 
374
  ✓ Avoid inventing citations
 
375
  ✓ State uncertainty when a source cannot be verified
 
376
  ✓ Encourage verification of hadith attribution and grading
 
377
  ✓ Avoid presenting itself as a qualified mufti
 
378
  ✓ Recommend qualified scholarship for consequential rulings
 
379
  ✓ Preserve context when discussing scholarly disagreement
 
380
  ✓ Support beneficial educational use
 
381
  ```
382
 
 
 
383
  Users should independently verify religious claims before teaching, publishing, issuing rulings, or making consequential decisions based on generated content.
384
 
385
- ---
386
 
387
- # ⚠️ Limitations
 
 
 
 
 
 
 
388
 
389
  RAWDA AI is an artificial intelligence system and can produce incorrect information, fabricated references, incomplete quotations, mistranslations, or misleading interpretations.
390
 
 
 
391
  In particular:
392
 
 
 
393
  - A generated Qur'an quotation may contain errors and should be verified.
 
394
  - Hadith attribution and grading may be incorrect.
 
395
  - Scholarly positions may be oversimplified.
 
396
  - Arabic wording may alter the meaning of a source.
 
397
  - Fiqh answers can depend on facts, school of jurisprudence, jurisdiction, and scholarly methodology.
 
398
  - The model does not replace a qualified scholar or recognized Islamic institution.
399
 
400
- **Do not treat generated text as a fatwa solely because it was produced by RAWDA AI.**
401
 
402
- ---
403
 
404
- # 📜 Base Model & Attribution
 
 
 
 
 
 
 
 
 
 
405
 
406
  RAWDA AI is based on:
407
 
408
- **Qwen/Qwen3-Coder-30B-A3B-Instruct**
409
 
410
- Original model development and training: **Qwen Team**.
411
 
412
- The base model is distributed under the **Apache License 2.0** according to its upstream model repository. Users should review the applicable upstream license and terms before redistribution or deployment.
 
 
 
 
 
 
 
 
 
 
 
 
 
413
 
414
- RAWDA AI repository and project presentation maintained by **Abdalla Eid**.
415
 
416
  This model card does not claim that the original Qwen model was trained by RAWDA AI.
417
 
418
- ---
419
 
420
- # 📚 Citation — Qwen Base Model
421
 
422
- If the underlying Qwen work is used in research, refer to the original Qwen materials and citation:
 
 
 
 
 
 
 
 
 
 
423
 
424
  ```bibtex
 
425
  @misc{qwen3technicalreport,
426
- title={Qwen3 Technical Report},
427
- author={Qwen Team},
428
- year={2025},
429
- eprint={2505.09388},
430
- archivePrefix={arXiv},
431
- primaryClass={cs.CL},
432
- url={https://arxiv.org/abs/2505.09388}
 
 
 
 
 
 
 
 
433
  }
 
434
  ```
435
 
436
- ---
437
 
438
- # 🌿 RAWDA AI
439
 
440
- <div align="center">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
 
442
- ## بِسْمِ اللهِ الرَّحْمَنِ الرَّحِيمِ
443
 
444
- ### RAWDA AI
445
 
446
- **Islamic Knowledge • Qur'an • Sunnah • Arabic AI**
447
 
448
- 🌙 **Technology in the service of beneficial knowledge** 🌙
449
 
450
- Maintained by **Abdalla Eid**
451
 
452
- *Verify sources • Respect scholarship • Seek beneficial knowledge*
453
 
454
  </div>
 
1
  ---
2
  library_name: transformers
3
  license: apache-2.0
4
+ pipeline_tag: text-generation
5
+ base_model: abdallah3id/rawda-coder-30b-a3b
6
+ language:
7
+ - ar
8
+ - en
9
+ tags:
10
+ - rawda-ai
11
+ - islamic-ai
12
+ - islam
13
+ - sunnah
14
+ - quran
15
+ - arabic
16
+ - text-generation
17
+ ---
18
+
19
+ library_name: transformers
20
+
21
+ license: apache-2.0
22
+
23
  license_link: https://huggingface.co/abdallah3id/rawda-coder-30b-a3b/blob/main/LICENSE
24
+
25
  pipeline_tag: text-generation
26
+
27
  tags:
28
+
29
+   - rawda-ai
30
+
31
+   - islamic-ai
32
+
33
+   - islam
34
+
35
+   - sunnah
36
+
37
+   - quran
38
+
39
+   - arabic
40
+
41
+   - text-generation
42
+
43
  language:
44
+
45
+   - ar
46
+
47
+   - en
48
+
49
  base_model: abdallah3id/rawda-coder-30b-a3b
50
+
51
  ---
52
 
53
+
54
+
55
+ <div *align*="center">
56
+
57
+
58
 
59
  <img src="RAWDAAI.png" width="100%" alt="RAWDA AI"/>
60
 
 
61
 
 
62
 
63
+ **# 🌿 RAWDA AI**
64
+
65
+
66
+
67
+ **### Islamic Knowledge • Qur'an • Sunnah • Arabic AI**
68
+
69
+
70
+
71
+ ****RAWDA AI is an Islamic-oriented AI project designed to serve Islam and the Sunnah through careful, respectful, source-aware assistance.****
72
+
73
+
74
 
75
  ![RAWDA AI](https://img.shields.io/badge/RAWDA-AI-1f8b4c?style=for-the-badge)
76
+
77
  ![Focus](https://img.shields.io/badge/FOCUS-ISLAM%20%26%20SUNNAH-0b6e4f?style=for-the-badge)
78
+
79
  ![Arabic](https://img.shields.io/badge/LANGUAGE-ARABIC%20%7C%20ENGLISH-2563eb?style=for-the-badge)
80
+
81
+ ![Model](https://img.shields.io/badge/MODEL-RAWDA%20AI%2030B-7c3aed?style=for-the-badge)
82
+
83
  ![License](https://img.shields.io/badge/LICENSE-APACHE%202.0-d97706?style=for-the-badge)
84
 
85
+
86
+
87
  </div>
88
 
 
89
 
 
90
 
91
+ **---**
92
+
93
+
94
+
95
+ **# 🕌 About RAWDA AI**
96
+
97
+
98
+
99
+ ****RAWDA AI**** is an Islamic-oriented artificial intelligence project maintained by ****Abdalla Eid****.
100
+
101
+
102
 
103
  The project is designed to provide helpful assistance around Islamic learning, the Qur'an, the Sunnah, Arabic-language research, study organization, and general knowledge while emphasizing respect for Islamic sources and scholarly verification.
104
 
105
+
106
+
107
+ The model repository is based on ****Qwen3-Coder-30B-A3B-Instruct****. The underlying Qwen model was originally developed and trained by the ****Qwen Team****.
108
+
109
+
110
 
111
  RAWDA AI aims to provide a clear Islamic-oriented identity and usage framework on top of this foundation.
112
 
 
113
 
 
114
 
115
+ > ****Important:**** An AI model is not a mufti, scholar, or substitute for qualified Islamic scholarship. Religious rulings and sensitive matters should be verified with reliable primary sources and qualified scholars.
116
+
117
+
118
+
119
+ **---**
120
+
121
+
122
+
123
+ **# 🌙 Mission**
124
+
125
+
126
+
127
+ > ****Technology in the service of beneficial knowledge.****
128
+
129
 
 
130
 
131
  RAWDA AI is intended to support Muslims, students, researchers, educators, and Arabic-speaking users with accessible AI assistance while encouraging verification and responsible use.
132
 
133
+
134
+
135
+ **### Core objectives**
136
+
137
+
138
 
139
  | Area | RAWDA AI Objective |
140
+
141
  |---|---|
142
+
143
  | 📖 Qur'an | Assist with study, explanation, themes, and references |
144
+
145
  | ﷺ Sunnah | Help organize and understand hadith-related information |
146
+
147
  | 🕌 Islamic Studies | Support structured learning and research |
148
+
149
  | 🔎 Source Awareness | Encourage citations and verification |
150
+
151
  | 📝 Arabic | Provide strong Arabic-language assistance |
152
+
153
  | 🎓 Education | Create summaries, questions, study plans, and explanations |
154
+
155
  | 💻 Technology | Assist with technical and programming tasks inherited from the base model |
156
+
157
  | 🌍 General Knowledge | Provide useful general-purpose assistance within the project's principles |
158
 
 
159
 
160
+
161
+ **---**
162
+
163
+
164
+
165
+ **# ☪️ Islamic Knowledge Principles**
166
+
167
+
168
 
169
  RAWDA AI is designed around several important principles:
170
 
171
+
172
+
173
  ```text
174
+
175
+                     🌿 RAWDA AI 🌿
176
+
177
+                          │
178
+
179
+         ┌────────────────┼────────────────┐
180
+
181
+         ▼                ▼                ▼
182
+
183
+      القرآن            السنة          العلم النافع
184
+
185
+     Qur'an            Sunnah      Beneficial Knowledge
186
+
187
+         │                │                │
188
+
189
+         └────────────────┼────────────────┘
190
+
191
+                          ▼
192
+
193
+                  SOURCE AWARENESS
194
+
195
+                          │
196
+
197
+                          ▼
198
+
199
+               CONTEXT + VERIFICATION
200
+
201
+                          │
202
+
203
+                          ▼
204
+
205
+                RESPECTFUL RESPONSE
206
+
207
+                          │
208
+
209
+                          ▼
210
+
211
+               HUMAN / SCHOLAR REVIEW
212
+
213
+               when religious judgment
214
+
215
+                   is significant
216
+
217
  ```
218
 
219
+
220
+
221
  The desired response behavior is to distinguish between established source material, scholarly interpretation, uncertain information, and general AI-generated explanation.
222
 
 
223
 
224
+
225
+ **---**
226
+
227
+
228
+
229
+ **# 📖 Qur'an Assistance**
230
+
231
+
232
 
233
  RAWDA AI can be used to assist with tasks such as:
234
 
235
+
236
+
237
  - Finding and organizing Qur'anic topics.
238
+
239
  - Explaining vocabulary and concepts.
240
+
241
  - Creating study notes.
242
+
243
  - Comparing themes across passages.
244
+
245
  - Producing Arabic/English study material.
246
+
247
  - Organizing references for further research.
248
+
249
  - Creating revision questions and educational summaries.
250
 
251
+
252
+
253
  When exact Qur'anic wording matters, users should verify the Arabic text against an authoritative mushaf or trusted Qur'an source.
254
 
 
255
 
256
+
257
+ **---**
258
+
259
+
260
+
261
+ **# ﷺ Sunnah & Hadith Assistance**
262
+
263
+
264
 
265
  RAWDA AI is intended to help users navigate hadith-related study without presenting itself as an independent hadith authority.
266
 
267
+
268
+
269
  It may assist with:
270
 
271
+
272
+
273
  - Explaining the general meaning of a hadith.
274
+
275
  - Organizing hadith study notes.
276
+
277
  - Identifying information that requires source verification.
278
+
279
  - Comparing themes across narrations.
280
+
281
  - Summarizing scholarly material supplied by the user.
282
+
283
  - Producing structured research notes.
284
 
285
+
286
+
287
  > Hadith wording, attribution, grading, chains of transmission, and legal conclusions should be checked against recognized hadith collections and qualified scholarship.
288
 
 
289
 
290
+
291
+ **---**
292
+
293
+
294
+
295
+ **# 🧭 Religious Questions**
296
+
297
+
298
 
299
  For ordinary educational questions, RAWDA AI aims to provide clear and respectful explanations.
300
 
301
+
302
+
303
+ For questions involving ****fatwa, halal/haram judgments, marriage, divorce, inheritance, financial rulings, creed disputes, or other consequential religious matters****, the model should avoid presenting uncertain generated content as a definitive ruling.
304
+
305
+
306
 
307
  A preferred structure is:
308
 
309
+
310
+
311
  ```text
312
+
313
+ 1\. QUESTION
314
+
315
+        ↓
316
+
317
+ 2\. RELEVANT QUR'AN / SUNNAH CONTEXT
318
+
319
+        ↓
320
+
321
+ 3\. SCHOLARLY CONTEXT WHEN KNOWN
322
+
323
+        ↓
324
+
325
+ 4\. CLEARLY IDENTIFY UNCERTAINTY
326
+
327
+        ↓
328
+
329
+ 5\. RECOMMEND VERIFICATION
330
+
331
+        ↓
332
+
333
+ 6\. QUALIFIED SCHOLAR FOR A FORMAL RULING
334
+
335
  ```
336
 
 
337
 
 
338
 
339
+ **---**
340
+
341
+
342
+
343
+ **# 🧠 Model Architecture**
344
+
345
+
346
+
347
+ RAWDA AI uses ****Qwen3-Coder-30B-A3B-Instruct**** as its foundation model.
348
+
349
+
350
 
351
  | Specification | Value |
352
+
353
  |---|---|
354
+
355
  | Architecture | Causal Language Model / Mixture-of-Experts |
356
+
357
  | Total Parameters | 30.5B |
358
+
359
  | Activated Parameters | 3.3B |
360
+
361
  | Layers | 48 |
362
+
363
  | Attention Heads (GQA) | 32 Q / 4 KV |
364
+
365
  | Experts | 128 |
366
+
367
  | Activated Experts | 8 |
368
+
369
  | Native Context | 262,144 tokens |
370
+
371
  | Mode | Non-thinking |
 
372
 
373
+ | Model Identity | RAWDA AI 30B |
374
+
375
+
376
+
377
+ The architecture values above are inherited from the upstream technical foundation and are listed for technical transparency.
378
+
379
+
380
+
381
+ **---**
382
+
383
+
384
+
385
+ **# 🏗️ RAWDA AI System Concept**
386
 
 
387
 
 
388
 
389
  ```text
390
+
391
  ╔══════════════════════════════════════════════╗
392
+
393
+ ║         QWEN3-CODER-30B-A3B-INSTRUCT        ║
394
+
395
+ ║              Foundation Model               ║
396
+
397
  ╚══════════════════════╤═══════════════════════╝
398
+
399
+                        │
400
+
401
+                        ▼
402
+
403
  ┌──────────────────────────────────────────────┐
404
+
405
+ │              RAWDA AI IDENTITY               │
406
+
407
+ │                                              │
408
+
409
+ │   Islam • Sunnah • Arabic • Education        │
410
+
411
+ │   Respect • Source Awareness • Verification  │
412
+
413
  └──────────────────────┬───────────────────────┘
414
+
415
+                        │
416
+
417
+                        ▼
418
+
419
  ╔══════════════════════════════════════════════╗
420
+
421
+ ║             RESPONSE PRINCIPLES              ║
422
+
423
+ ║                                              ║
424
+
425
+ ║  Evidence → Context → Clarity → Verification ║
426
+
427
  ╚══════════════════════╤═══════════════════════╝
428
+
429
+                        │
430
+
431
+           ┌────────────┼────────────┐
432
+
433
+           ▼            ▼            ▼
434
+
435
+        Qur'an        Sunnah       Education
436
+
437
+           │            │            │
438
+
439
+           └────────────┼────────────┘
440
+
441
+                        ▼
442
+
443
+                 🌿 RAWDA AI 🌿
444
+
445
  ```
446
 
 
447
 
 
448
 
449
+ **---**
450
+
451
+
452
+
453
+ **# ✨ Key Capabilities**
454
+
455
+
456
+
457
+ **### 🕌 Islamic-oriented assistance**
458
+
459
  Structured assistance for Islamic study and educational workflows.
460
 
461
+
462
+
463
+ **### 🇸🇦 Arabic-first usability**
464
+
465
  Designed to be useful for Arabic questions and Arabic educational content while retaining English capability.
466
 
 
 
467
 
 
 
468
 
469
+ **### 📚 Long-context research**
470
+
471
+ The underlying model supports a native context length of ****262,144 tokens****, useful for working with large collections of notes and documents, subject to available hardware and inference configuration.
472
+
473
+
474
+
475
+ **### 💻 Coding & technical capability**
476
+
477
+ RAWDA AI also retains strong coding and technical-assistance capabilities from its underlying architecture.
478
+
479
+
480
+
481
+ **### 🔎 Source-aware workflow**
482
+
483
  For religious topics, RAWDA AI encourages users to distinguish between exact source material, interpretation, and generated explanation.
484
 
 
485
 
486
+
487
+ **---**
488
+
489
+
490
+
491
+ **# 🚀 Quickstart**
492
+
493
+
494
 
495
  We recommend using a recent version of `transformers`.
496
 
497
+
498
+
499
  ```python
500
+
501
  from transformers import AutoModelForCausalLM, AutoTokenizer
502
 
503
+
504
+
505
+ model_name = "abdallah3id/rawda-coder-30b-a3b"
506
+
507
+
508
 
509
  tokenizer = AutoTokenizer.from_pretrained(model_name)
510
 
511
+
512
+
513
  model = AutoModelForCausalLM.from_pretrained(
514
+
515
+     model_name,
516
+
517
+     torch_dtype="auto",
518
+
519
+     device_map="auto"
520
+
521
  )
522
 
523
+
524
+
525
  messages = [
526
+
527
+     {
528
+
529
+         "role": "user",
530
+
531
+         "content": "اشرح لي مفهوم الإحسان في الإسلام بطريقة تعليمية مختصرة."
532
+
533
+     }
534
+
535
  ]
536
 
537
+
538
+
539
  text = tokenizer.apply_chat_template(
540
+
541
+     messages,
542
+
543
+     tokenize=False,
544
+
545
+     add_generation_prompt=True
546
+
547
  )
548
 
549
+
550
+
551
  model_inputs = tokenizer(
552
+
553
+     [text],
554
+
555
+     return_tensors="pt"
556
+
557
  ).to(model.device)
558
 
559
+
560
+
561
  generated_ids = model.generate(
562
+
563
+     **model_inputs,
564
+
565
+     max_new_tokens=2048
566
+
567
  )
568
 
569
+
570
+
571
  output_ids = generated_ids[0][len(model_inputs.input_ids[0]):]
572
 
573
+
574
+
575
  response = tokenizer.decode(
576
+
577
+     output_ids,
578
+
579
+     skip_special_tokens=True
580
+
581
  )
582
 
583
+
584
+
585
  print(response)
586
+
587
  ```
588
 
 
589
 
 
590
 
591
+ > Official RAWDA AI repository ID: `abdallah3id/rawda-coder-30b-a3b`.
592
+
593
+
594
+
595
+ **---**
596
+
597
+
598
+
599
+ **# 💡 Example 1 — Islamic Education**
600
+
601
+
602
+
603
+ **### User**
604
+
605
 
 
606
 
607
  ```text
608
+
609
  ما معنى الإحسان في الإسلام؟
610
+
611
  ```
612
 
613
+
614
+
615
+ **### Desired RAWDA AI response style**
616
+
617
+
618
 
619
  ```text
620
+
621
  الإحسان من أعظم مراتب الدين.
622
 
623
+
624
+
625
  ومن أشهر ما يبين معناه حديث جبريل، وفيه أن النبي ﷺ بيّن
626
+
627
  الإحسان بمعنى عبادة الله على مقام المراقبة واستحضار اطلاع الله
628
+
629
  على العبد.
630
 
631
+
632
+
633
  ومن الناحية التعليمية يمكن فهم مراتب الدين المذكورة في الحديث
634
+
635
  على النحو الآتي:
636
 
637
+
638
+
639
+ 1\. الإسلام
640
+
641
+ 2\. الإيمان
642
+
643
+ 3\. الإحسان
644
+
645
+
646
 
647
  وللدراسة أو الاستدلال الشرعي الدقيق، ينبغي الرجوع إلى النص
648
+
649
  الكامل للحديث وشروح أهل العلم المعتبرة، وعدم الاعتماد على
650
+
651
  صياغة الذكاء الاصطناعي وحدها.
652
+
653
  ```
654
 
 
655
 
 
656
 
657
+ **---**
658
+
659
+
660
+
661
+ **# 💡 Example 2 — Hadith Research**
662
+
663
+
664
+
665
+ **### User**
666
+
667
+
668
 
669
  ```text
670
+
671
  وجدت حديثاً على الإنترنت. كيف أتأكد من صحته؟
672
+
673
  ```
674
 
675
+
676
+
677
+ **### Desired RAWDA AI response style**
678
+
679
+
680
 
681
  ```text
682
+
683
  للتحقق من الحديث لا يكفي أن يكون النص منتشراً على الإنترنت.
684
 
685
+
686
+
687
  يمكن اتباع الخطوات التالية:
688
 
689
+
690
+
691
+ 1\. البحث عن نص الحديث في مصادر حديثية موثوقة.
692
+
693
+ 2\. معرفة الكتاب والباب ورقم الحديث إن أمكن.
694
+
695
+ 3\. التحقق من درجة الحديث عند أهل الاختصاص.
696
+
697
+ 4\. التفريق بين نص الحديث وبين شرح الكاتب أو الناقل.
698
+
699
+ 5\. مقارنة أكثر من مصدر عند وجود اختلاف.
700
+
701
+ 6\. الرجوع إلى أهل العلم في المسائل التي يترتب عليها حكم شرعي.
702
+
703
+
704
 
705
  إذا أرسلت نص الحديث ومصدره، يمكن تنظيم المعلومات المتاحة
706
+
707
  وتحديد النقاط التي تحتاج إلى تحقق إضافي.
708
+
709
  ```
710
 
 
711
 
 
712
 
713
+ **---**
714
+
715
+
716
+
717
+ **# ⚙️ Recommended Generation Settings**
718
+
719
+
720
+
721
+ For general RAWDA AI use, a reasonable starting configuration is:
722
+
723
+
724
 
725
  ```text
726
+
727
+ temperature:         0.7
728
+
729
+ top_p:               0.8
730
+
731
+ top_k:               20
732
+
733
+ repetition_penalty:  1.05
734
+
735
  ```
736
 
737
+
738
+
739
  For source-sensitive religious questions, lower randomness may be preferable when the goal is consistency, but generation settings do not guarantee factual or religious correctness.
740
 
 
741
 
742
+
743
+ **---**
744
+
745
+
746
+
747
+ **# 🛡️ Reliability & Safety**
748
+
749
+
750
 
751
  RAWDA AI should:
752
 
753
+
754
+
755
  ```text
756
+
757
  ✓ Treat the Qur'an and authentic Sunnah with respect
758
+
759
  ✓ Distinguish quotation from explanation
760
+
761
  ✓ Avoid inventing citations
762
+
763
  ✓ State uncertainty when a source cannot be verified
764
+
765
  ✓ Encourage verification of hadith attribution and grading
766
+
767
  ✓ Avoid presenting itself as a qualified mufti
768
+
769
  ✓ Recommend qualified scholarship for consequential rulings
770
+
771
  ✓ Preserve context when discussing scholarly disagreement
772
+
773
  ✓ Support beneficial educational use
774
+
775
  ```
776
 
777
+
778
+
779
  Users should independently verify religious claims before teaching, publishing, issuing rulings, or making consequential decisions based on generated content.
780
 
 
781
 
782
+
783
+ **---**
784
+
785
+
786
+
787
+ **# ⚠️ Limitations**
788
+
789
+
790
 
791
  RAWDA AI is an artificial intelligence system and can produce incorrect information, fabricated references, incomplete quotations, mistranslations, or misleading interpretations.
792
 
793
+
794
+
795
  In particular:
796
 
797
+
798
+
799
  - A generated Qur'an quotation may contain errors and should be verified.
800
+
801
  - Hadith attribution and grading may be incorrect.
802
+
803
  - Scholarly positions may be oversimplified.
804
+
805
  - Arabic wording may alter the meaning of a source.
806
+
807
  - Fiqh answers can depend on facts, school of jurisprudence, jurisdiction, and scholarly methodology.
808
+
809
  - The model does not replace a qualified scholar or recognized Islamic institution.
810
 
 
811
 
 
812
 
813
+ ****Do not treat generated text as a fatwa solely because it was produced by RAWDA AI.****
814
+
815
+
816
+
817
+ **---**
818
+
819
+
820
+
821
+ **# 📜 RAWDA AI License & Technical Attribution**
822
+
823
+
824
 
825
  RAWDA AI is based on:
826
 
 
827
 
 
828
 
829
+ ****Qwen/Qwen3-Coder-30B-A3B-Instruct****
830
+
831
+
832
+
833
+ Original model development and training: ****Qwen Team****.
834
+
835
+
836
+
837
+ The base model is distributed under the ****Apache License 2.0**** according to its upstream model repository. Users should review the applicable upstream license and terms before redistribution or deployment.
838
+
839
+
840
+
841
+ RAWDA AI repository and project presentation maintained by ****Abdalla Eid****.
842
+
843
 
 
844
 
845
  This model card does not claim that the original Qwen model was trained by RAWDA AI.
846
 
 
847
 
 
848
 
849
+ **---**
850
+
851
+
852
+
853
+ **# 📚 Upstream Technical Citation**
854
+
855
+
856
+
857
+ For academic work involving the underlying architecture, retain the upstream technical citation:
858
+
859
+
860
 
861
  ```bibtex
862
+
863
  @misc{qwen3technicalreport,
864
+
865
+     title={Qwen3 Technical Report},
866
+
867
+     author={Qwen Team},
868
+
869
+     year={2025},
870
+
871
+     eprint={2505.09388},
872
+
873
+     archivePrefix={arXiv},
874
+
875
+     primaryClass={cs.CL},
876
+
877
+     url={https://arxiv.org/abs/2505.09388}
878
+
879
  }
880
+
881
  ```
882
 
 
883
 
 
884
 
885
+ **---**
886
+
887
+
888
+
889
+ **# 🌿 RAWDA AI**
890
+
891
+
892
+
893
+ <div *align*="center">
894
+
895
+
896
+
897
+ **## بِسْمِ اللهِ الرَّحْمَنِ الرَّحِيمِ**
898
+
899
+
900
+
901
+ **### RAWDA AI**
902
+
903
+
904
+
905
+ ****Islamic Knowledge • Qur'an • Sunnah • Arabic AI****
906
+
907
+
908
+
909
+ 🌙 ****Technology in the service of beneficial knowledge**** 🌙
910
+
911
+
912
 
913
+ Maintained by ****Abdalla Eid****
914
 
 
915
 
 
916
 
917
+ **Verify sources • Respect scholarship • Seek beneficial knowledge**
918
 
 
919
 
 
920
 
921
  </div>