ysn-rfd commited on
Commit
6f434c4
·
verified ·
1 Parent(s): fa4f081

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +709 -274
README.md CHANGED
@@ -25,158 +25,296 @@ metrics:
25
  - perplexity
26
  ---
27
 
28
- <div align="center" style="direction: rtl;">
29
 
30
- # 🤖 مدل زبانی ایران نسخه 1 با معماری بومی یاسین 🇮🇷
31
- ### اولین معماری مدل زبانی متن‌باز فارسی
32
 
33
- [![Hugging Face](https://img.shields.io/badge/🤗%20Hugging%20Face-مدل%20ایران-8B5CF6?style=for-the-badge&logo=huggingface)](https://huggingface.co/fibonacciai/)[![Python](https://img.shields.io/badge/Python-3.8%2B-3776AB?style=for-the-badge&logo=python)](https://www.python.org/)
34
- [![PyTorch](https://img.shields.io/badge/PyTorch-2.0%2B-EE4C2C?style=for-the-badge&logo=pytorch)](https://pytorch.org/)
35
- [![License](https://img.shields.io/badge/License-Apache%202.0-7D3C98?style=for-the-badge)](https://opensource.org/licenses/Apache-2.0)
36
- [![GitHub Stars](https://img.shields.io/github/stars/yourusername/yasin-model?style=for-the-badge&logo=github&color=yellow)](https://github.com/realrobotteam)
37
- [![Colab](https://img.shields.io/badge/Colab-دموی%20آنلاین-F9AB00?style=for-the-badge&logo=googlecolab)](https://colab.research.google.com/github/yourusername/yasin-model/blob/main/demo.ipynb)
38
 
39
- <img src="https://capsule-render.vercel.app/api?type=waving&height=250&section=header&text=مدل%20زبانی%20ایران&fontSize=50&fontColor=FFFFFF&desc=پلی%20میان%20پیشرفته‌ترین%20پژوهش‌های%20دنیا%20و%20زبان%20شیرین%20فارسی&descSize=18&descAlignY=70&animation=fadeIn&color=0:1E7A34,50:FFFFFF,100:DC2626" width="100%"/>
40
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
- <div style="direction: rtl;">
43
 
44
  ---
45
 
46
  ## 📋 فهرست مطالب
47
- - [معرفی کلی](#معرفی-کلی)
48
- - [ویژگی‌های منحصربه‌فرد](#ویژگی‌های-منحصربه‌فرد)
49
- - [نمونه خروجی](#نمونه-خروجی)
50
- - [معماری فنی](#معماری-فنی)
51
- - [شروع سریع](#شروع-سریع)
52
- - [پیکربندی برای سخت‌افزارهای مختلف](#پیکربندی-برای-سخت‌افزارهای-مختلف)
53
- - [نتایج آموزش](#نتایج-آموزش)
54
- - [کاربردها](#کاربردها)
55
- - [عیب‌یابی](#عیب‌یابی)
56
- - شارکت](#مشارکت)
57
- - جوز](#مجوز)
58
- - [تیم توسعه](#تیم-توسعه)
 
 
 
59
 
60
  ---
61
 
62
  ## 🌟 معرفی کلی
63
 
64
- <div style="background: linear-gradient(145deg, #1a2639, #2c3e50); padding: 35px; border-radius: 30px; color: white; margin: 30px 0; border-bottom: 8px solid #8B5CF6; box-shadow: 0 20px 40px rgba(139,92,246,0.2);">
 
 
 
 
65
 
66
- <h2 style="color: white; font-size: 28px; margin-top: 0;">🎯 مدل زبانی ایران چیست؟</h2>
67
 
68
- <p style="font-size: 18px; line-height: 1.8;">
69
- <strong>ایران نسخه 1 </strong> یک مدل زبانی بزرگ (LLM) دوزبانه فارسی-انگلیسی است که با معماری <strong>ترنسفورمر پیشرفته</strong> و تکنیک‌های مدرن <strong>GQA</strong>، <strong>RoPE</strong> و <strong>SwiGLU</strong> پیاده‌سازی شده است. این مدل حاصل آموزش روی <strong>۳۰ میلیون</strong> متن فارسی و استفاده از آخرین دستاوردهای پژوهشی در حوزه پردازش زبان طبیعی است.
70
  </p>
71
 
72
- <p style="font-size: 18px; line-height: 1.8; margin-top: 20px;">
73
- <strong>ایران نسخه 1 برای این ساخته شده که زبان فارسی را در دنیای هوش مصنوعی زنده نگه دارد.</strong> برخلاف مدل‌های عمومی که فارسی را به‌عنوان زبان دوم می‌بینند، یاسین از ابتدا برای درک عمق ادبیات، فرهنگ و ساختار منحصربه‌فرد زبان فارسی طراحی شده است.
74
  </p>
75
 
 
 
 
 
76
  </div>
77
 
78
  ---
79
 
80
  ## ✨ ویژگی‌های منحصربه‌فرد
81
 
82
- <div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; margin: 40px 0;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
- <div style="background: linear-gradient(135deg, #f5f3ff, #ede9fe); padding: 30px; border-radius: 24px; border-bottom: 8px solid #8B5CF6; box-shadow: 0 10px 30px rgba(139,92,246,0.1);">
85
- <div style="font-size: 48px; background: #8B5CF6; width: 90px; height: 90px; line-height: 90px; border-radius: 50%; color: white; text-align: center; margin-bottom: 20px;">🎯</div>
86
- <h3 style="font-size: 24px; color: #5b21b6; margin: 15px 0;"> معماری یاسین با بومی‌سازی عمیق</h3>
87
- <p style="font-size: 16px; line-height: 1.7; color: #4c1d95;">طراحی شده از پایه برای زبان فارسی • درک اصطلاحات، ضرب‌المثل‌ها و ساختارهای دستوری پیچیده • پشتیبانی کامل از خط و نگارش فارسی</p>
88
  </div>
89
 
90
- <div style="background: linear-gradient(135deg, #eff6ff, #dbeafe); padding: 30px; border-radius: 24px; border-bottom: 8px solid #3B82F6; box-shadow: 0 10px 30px rgba(59,130,246,0.1);">
91
- <div style="font-size: 48px; background: #3B82F6; width: 90px; height: 90px; line-height: 90px; border-radius: 50%; color: white; text-align: center; margin-bottom: 20px;">⚡</div>
92
- <h3 style="font-size: 24px; color: #1e40af; margin: 15px 0;">کارایی فوق‌العاده</h3>
93
- <p style="font-size: 16px; line-height: 1.7; color: #1e3a8a;">مکانیزم GQA با کاهش ۷۵٪ مصرف حافظه • پشتیبانی از Flash Attention 2 • استنتاج سریع‌تر با SDPA</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  </div>
95
 
96
- <div style="background: linear-gradient(135deg, #ecfdf5, #d1fae5); padding: 30px; border-radius: 24px; border-bottom: 8px solid #10B981; box-shadow: 0 10px 30px rgba(16,185,129,0.1);">
97
- <div style="font-size: 48px; background: #10B981; width: 90px; height: 90px; line-height: 90px; border-radius: 50%; color: white; text-align: center; margin-bottom: 20px;">🔄</div>
98
- <h3 style="font-size: 24px; color: #065f46; margin: 15px 0;">انعطاف‌پذیری کامل</h3>
99
- <p style="font-size: 16px; line-height: 1.7; color: #064e3b;">قابل اجرا روی GPUهای ۴ گیگابایت تا ۲۴ گیگابایت • پشتیبانی از quantization 8-bit و 4-bit مقیاس‌پذیری پویا</p>
 
 
 
100
  </div>
101
 
102
- <div style="background: linear-gradient(135deg, #fef3c7, #fde68a); padding: 30px; border-radius: 24px; border-bottom: 8px solid #F59E0B; box-shadow: 0 10px 30px rgba(245,158,11,0.1);">
103
- <div style="font-size: 48px; background: #F59E0B; width: 90px; height: 90px; line-height: 90px; border-radius: 50%; color: white; text-align: center; margin-bottom: 20px;">🌍</div>
104
- <h3 style="font-size: 24px; color: #92400e; margin: 15px 0;">دوزبانه هوشمند</h3>
105
- <p style="font-size: 16px; line-height: 1.7; color: #78350f;">تسلط کامل به فارسی و انگلیسی • ترجمه خودکار • درک مفاهیم بینافرهنگی</p>
 
 
 
 
106
  </div>
107
 
 
 
 
 
108
  </div>
109
 
110
  ---
111
 
112
  ## 💎 کاربردهای عملی
113
 
114
- <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin: 40px 0;">
115
 
116
- <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); border: 1px solid #eaeef2; text-align: center;">
117
- <div style="font-size: 42px; margin-bottom: 15px;">✍️</div>
 
 
 
 
 
118
  <h3 style="color: #1e293b;">نویسندگی خلاق</h3>
119
- <p style="color: #475569;">کمک به نوشتن مقاله، داستان، شعر و محتوای خلاقانه • ایده‌پردازی • ویرایش متن</p>
 
120
  </div>
121
 
122
- <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); border: 1px solid #eaeef2; text-align: center;">
123
- <div style="font-size: 42px; margin-bottom: 15px;">📚</div>
 
 
 
 
124
  <h3 style="color: #1e293b;">آموزش و پژوهش</h3>
125
- <p style="color: #475569;">دستیار آموزشی هوشمند پاسخگویی به سوالات درسی • تحلیل متون کهن • خلاصه‌سازی مقالات</p>
 
126
  </div>
127
 
128
- <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); border: 1px solid #eaeef2; text-align: center;">
129
- <div style="font-size: 42px; margin-bottom: 15px;">💬</div>
130
- <h3 style="color: #1e293b;">چت بات و پشتیبانی</h3>
131
- <p style="color: #475569;">ایجاد دستیارهای هوشمند فارسی پشتیبانی مشتری پاسخگویی ۲۴ ساعته</p>
 
 
 
 
 
132
  </div>
133
 
134
- <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); border: 1px solid #eaeef2; text-align: center;">
135
- <div style="font-size: 42px; margin-bottom: 15px;">📊</div>
 
 
 
 
 
 
136
  <h3 style="color: #1e293b;">تحلیل داده‌های متنی</h3>
137
- <p style="color: #475569;">تحلیل نظرات کاربران • بررسی احساسات دسته‌بندی متون • استخراج اطلاعات</p>
 
138
  </div>
139
 
140
- <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); border: 1px solid #eaeef2; text-align: center;">
141
- <div style="font-size: 42px; margin-bottom: 15px;">🏥</div>
 
 
 
 
142
  <h3 style="color: #1e293b;">سلامت و پزشکی</h3>
143
- <p style="color: #475569;">تحلیل بازخورد بیماران دستیار پرسش و پاسخ پزشکی • خلاصه‌سازی پرونده‌ها</p>
 
144
  </div>
145
 
146
- <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); border: 1px solid #eaeef2; text-align: center;">
147
- <div style="font-size: 42px; margin-bottom: 15px;">🎨</div>
 
 
 
 
148
  <h3 style="color: #1e293b;">خلاقیت و سرگرمی</h3>
149
- <p style="color: #475569;">تولید پادکست شاعر الکترونیک داستان‌پردازی • ایده‌پردازی محتوا</p>
 
150
  </div>
151
 
 
 
 
 
152
  </div>
153
 
154
  ---
155
 
156
  ## 📊 نمونه خروجی واقعی
157
 
158
- <div style="background: linear-gradient(145deg, #0b1120, #1a1f2e); padding: 35px; border-radius: 30px; margin: 40px 0; border-right: 10px solid #8B5CF6; box-shadow: 0 25px 50px rgba(0,0,0,0.2);">
159
 
160
- <h3 style="color: white; font-size: 24px; margin-top: 0;">🔹 ورودی:</h3>
 
 
161
 
162
- <div style="background: #1e2436; padding: 20px; border-radius: 16px; margin: 15px 0; border: 1px solid #3d4459;">
163
- <pre style="color: #e2e8f0; font-size: 18px; margin: 0; direction: rtl; text-align: right; font-family: Vazir, IRANSans, Tahoma, sans-serif;">
 
 
 
164
  هوش مصنوعی در ایران چه جایگاهی دارد؟ لطفاً با ذکر مثال توضیح دهید.
165
- </pre>
 
166
  </div>
167
 
168
- <h3 style="color: white; font-size: 24px; margin-top: 30px;">🔸 خروجی مدل یاسین:</h3>
 
 
169
 
170
- <div style="background: #1e2436; padding: 25px; border-radius: 16px; margin: 15px 0; border: 1px solid #8B5CF6;">
171
- <pre style="color: #e2e8f0; font-size: 18px; line-height: 1.8; margin: 0; direction: rtl; text-align: right; font-family: Vazir, IRANSans, Tahoma, sans-serif; white-space: pre-wrap;">
172
- هوش مصنوعی در ایران طی سال‌های اخیر رشد قابل توجهی داشته است. دانشگاه‌های برتر مانند صنعتی شریف، تهران و امیرکبیر دوره‌های تخصصی در این حوزه راه‌اندازی کرده‌اند.
 
173
 
174
  برای مثال:
175
  ✅ دانشگاه صنعتی شریف - آزمایشگاه پردازش زبان طبیعی با تمرکز بر فارسی
176
  ✅ دانشگاه تهران - مرکز تحقیقات هوش مصنوعی و رباتیک
177
  ✅ دانشگاه امیرکبیر - پژوهشکده فناوری اطلاعات و هوش مصنوعی
178
 
179
- شرکت‌های دانش‌بنیان متعددی در زمینه پردازش زبان فارسی، بینایی ماشین و رباتیک فعالیت می‌کنند. شرکت‌هایی مانند هوشا، دیجیکالا و اسنپ تیم‌های تخصصی هوش مصنوعی دارند.
 
 
180
 
181
  با این حال، چالش‌هایی مانند:
182
  ⚠️ دسترسی محدود به سخت‌افزارهای پیشرفته
@@ -184,68 +322,73 @@ metrics:
184
  ⚠️ کمبود داده‌های باکیفیت فارسی
185
  ⚠️ تحریم‌های بین‌المللی
186
 
187
- وجود دارد. پیش‌بینی می‌شود با سرمایه‌گذاری بیشتر در این حوزه، ایران بتواند جایگاه بهتری در منطقه کسب کند.
188
- </pre>
 
 
189
  </div>
190
 
 
 
 
 
191
  </div>
192
 
193
  ---
194
 
195
  ## ⚙️ معماری فنی پیشرفته
196
 
197
- <div style="background: white; padding: 35px; border-radius: 30px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); margin: 40px 0;">
198
 
199
  <h3 style="font-size: 28px; color: #1e293b; border-bottom: 4px solid #8B5CF6; padding-bottom: 15px;">🧠 نمای کلی معماری</h3>
200
 
201
- <div align="center" style="margin: 30px 0;">
202
 
 
203
  ┌─────────────────────────────────────────────────────────────────┐
204
- 📝 ورودی متنی │
205
- │ Text Input │
206
  └────────────────────────────────────┬────────────────────────────┘
207
-
208
  ┌─────────────────────────────────────────────────────────────────┐
209
- ⚡ Embedding + RoPE
210
- جاسازی توکن + موقعیت‌یابی چرخشی
211
- (Rotary Position Embedding)
212
  └────────────────────────────────────┬────────────────────────────┘
213
-
214
  ┌─────────────────────────────────────────────────────────────────┐
215
- 🔷 ×۳۲ لایه دیکودر
216
- 32 Decoder Layers
217
  ├─────────────────────────────────────────────────────────────────┤
218
- ┌─────────────────────────────────────────────────────────┐
219
- 🎯 Self-Attention (GQA با ۸ سر KV)
220
- Grouped Query Attention (4:1 ratio)
221
- • کاهش ۷۵٪ مصرف حافظه
222
- • حفظ کیفیت با اشتراک‌گذاری KV
223
- └─────────────────────────────────────────────────────────┘
224
-
225
- ┌─────────────────────────────────────────────────────────┐
226
- 🧮 Feed-Forward (SwiGLU)
227
- • تابع فعال‌سازی SiLU/Swish
228
- • بهبود ۲۰٪ در کیفیت خروجی
229
- • ۳ لایه خطی با گیتینگ هوشمند
230
- └─────────────────────────────────────────────────────────┘
231
-
232
- ┌─────────────────────────────────────────────────────────┐
233
- 📊 RMSNorm & Residual Connection
234
- • نرمال‌سازی پایدار
235
- • اتصال باقیمانده برای گرادیان بهتر
236
- └─────────────────────────────────────────────────────────┘
237
  └────────────────────────────────────┬────────────────────────────┘
238
-
239
  ┌─────────────────────────────────────────────────────────────────┐
240
- 🎯 LM Head
241
- خروجی نهایی
242
  └────────────────────────────────────┬────────────────────────────┘
243
-
244
  ┌─────────────────────────────────────────────────────────────────┐
245
- 📄 خروجی متنی │
246
- │ Text Output │
247
  └─────────────────────────────────────────────────────────────────┘
248
-
249
 
250
  </div>
251
 
@@ -255,98 +398,23 @@ metrics:
255
 
256
  ### 📐 مشخصات کامل پیکربندی
257
 
258
- <div style="overflow-x: auto; margin: 30px 0; background: white; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.03);">
259
-
260
- <table style="width: 100%; border-collapse: collapse; font-size: 16px; direction: rtl; text-align: right;">
261
- <thead>
262
- <tr style="background: linear-gradient(90deg, #8B5CF6, #6D28D9); color: white;">
263
- <th style="padding: 18px; border-radius: 12px 0 0 0;">دسته‌بندی</th>
264
- <th style="padding: 18px;">پارامتر</th>
265
- <th style="padding: 18px;">مقدار پیشفرض</th>
266
- <th style="padding: 18px; border-radius: 0 12px 0 0;">توضیح فنی</th>
267
- </tr>
268
- </thead>
269
- <tbody>
270
- <tr style="background: #f9fafc; border-bottom: 1px solid #e2e8f0;">
271
- <td style="padding: 18px; font-weight: bold;">🏗️ مدل</td>
272
- <td style="padding: 18px;">معماری</td>
273
- <td style="padding: 18px; direction: ltr;">Decoder-Only Transformer</td>
274
- <td style="padding: 18px;">مدل تولید متن خودرگرسیو</td>
275
- </tr>
276
- <tr style="border-bottom: 1px solid #e2e8f0;">
277
- <td style="padding: 18px; font-weight: bold;">🏗️ مدل</td>
278
- <td style="padding: 18px;">vocab_size</td>
279
- <td style="padding: 18px; direction: ltr;">۳۲,۰۰۰</td>
280
- <td style="padding: 18px;">اندازه واژه‌نامه (شامل ۸۰۰۰ توکن فارسی)</td>
281
- </tr>
282
- <tr style="background: #f9fafc; border-bottom: 1px solid #e2e8f0;">
283
- <td style="padding: 18px; font-weight: bold;">🏗️ مدل</td>
284
- <td style="padding: 18px;">hidden_size</td>
285
- <td style="padding: 18px; direction: ltr;">۴,۰۹۶</td>
286
- <td style="padding: 18px;">ابعاد نمایش پنهان</td>
287
- </tr>
288
- <tr style="border-bottom: 1px solid #e2e8f0;">
289
- <td style="padding: 18px; font-weight: bold;">🏗️ مدل</td>
290
- <td style="padding: 18px;">num_hidden_layers</td>
291
- <td style="padding: 18px; direction: ltr;">۳۲</td>
292
- <td style="padding: 18px;">عمق شبکه (تعداد لایه‌ها)</td>
293
- </tr>
294
- <tr style="background: #f9fafc; border-bottom: 1px solid #e2e8f0;">
295
- <td style="padding: 18px; font-weight: bold;">🎯 توجه</td>
296
- <td style="padding: 18px;">num_attention_heads</td>
297
- <td style="padding: 18px; direction: ltr;">۳۲</td>
298
- <td style="padding: 18px;">تعداد سرهای Query</td>
299
- </tr>
300
- <tr style="border-bottom: 1px solid #e2e8f0;">
301
- <td style="padding: 18px; font-weight: bold;">🎯 توجه</td>
302
- <td style="padding: 18px;">num_key_value_heads</td>
303
- <td style="padding: 18px; direction: ltr;">۸</td>
304
- <td style="padding: 18px;">سرهای KV (نسبت GQA 4:1)</td>
305
- </tr>
306
- <tr style="background: #f9fafc; border-bottom: 1px solid #e2e8f0;">
307
- <td style="padding: 18px; font-weight: bold;">🎯 توجه</td>
308
- <td style="padding: 18px;">attention_bias</td>
309
- <td style="padding: 18px; direction: ltr;">False</td>
310
- <td style="padding: 18px;">بدون بایاس (بهینه‌تر)</td>
311
- </tr>
312
- <tr style="border-bottom: 1px solid #e2e8f0;">
313
- <td style="padding: 18px; font-weight: bold;">🧮 MLP</td>
314
- <td style="padding: 18px;">intermediate_size</td>
315
- <td style="padding: 18px; direction: ltr;">۱۱,۰۰۸</td>
316
- <td style="padding: 18px;">ابعاد لایه میانی</td>
317
- </tr>
318
- <tr style="background: #f9fafc; border-bottom: 1px solid #e2e8f0;">
319
- <td style="padding: 18px; font-weight: bold;">🧮 MLP</td>
320
- <td style="padding: 18px;">hidden_act</td>
321
- <td style="padding: 18px; direction: ltr;">silu</td>
322
- <td style="padding: 18px;">تابع فعال‌سازی Swish (SiLU)</td>
323
- </tr>
324
- <tr style="border-bottom: 1px solid #e2e8f0;">
325
- <td style="padding: 18px; font-weight: bold;">📍 موقعیت</td>
326
- <td style="padding: 18px;">max_position_embeddings</td>
327
- <td style="padding: 18px; direction: ltr;">۲,۰۴۸</td>
328
- <td style="padding: 18px;">حداکثر طول توالی</td>
329
- </tr>
330
- <tr style="background: #f9fafc; border-bottom: 1px solid #e2e8f0;">
331
- <td style="padding: 18px; font-weight: bold;">📍 موقعیت</td>
332
- <td style="padding: 18px;">rope_theta</td>
333
- <td style="padding: 18px; direction: ltr;">۱۰,۰۰۰.۰</td>
334
- <td style="padding: 18px;">پایه فرکانس RoPE</td>
335
- </tr>
336
- <tr style="border-bottom: 1px solid #e2e8f0;">
337
- <td style="padding: 18px; font-weight: bold;">📍 موقعیت</td>
338
- <td style="padding: 18px;">rope_scaling</td>
339
- <td style="padding: 18px; direction: ltr;">پویا (dynamic)</td>
340
- <td style="padding: 18px;">مقیاس‌دهی تطبیقی تا ۸ برابر</td>
341
- </tr>
342
- <tr style="background: #f9fafc;">
343
- <td style="padding: 18px; font-weight: bold;">📊 نرمال‌سازی</td>
344
- <td style="padding: 18px;">rms_norm_eps</td>
345
- <td style="padding: 18px; direction: ltr;">1e-6</td>
346
- <td style="padding: 18px;">اپسیلون RMSNorm</td>
347
- </tr>
348
- </tbody>
349
- </table>
350
 
351
  </div>
352
 
@@ -354,44 +422,56 @@ metrics:
354
 
355
  ### 🔬 نوآوری‌های پیاده‌سازی
356
 
357
- <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin: 40px 0;">
 
 
 
 
358
 
359
- <div style="background: linear-gradient(145deg, #8B5CF6, #7C3AED); padding: 30px; border-radius: 24px; color: white;">
360
  <h3 style="color: white; font-size: 24px; margin-top: 0;">🎯 GQA</h3>
361
- <div style="font-size: 48px; margin: 15px 0;">۴:۱</div>
362
  <p style="font-size: 18px;">کاهش ۷۵٪ مصرف حافظه</p>
363
  <hr style="border: 1px solid rgba(255,255,255,0.3); margin: 20px 0;">
364
- <p style="margin: 0; opacity: 0.9;">۳۲ سر Query • ۸ سر KVاشتراک‌گذاری هوشمند</p>
365
  </div>
366
 
367
- <div style="background: linear-gradient(145deg, #3B82F6, #2563EB); padding: 30px; border-radius: 24px; color: white;">
 
 
 
368
  <h3 style="color: white; font-size: 24px; margin-top: 0;">🔄 RoPE</h3>
369
- <div style="font-size: 48px; margin: 15px 0;">۸x</div>
370
  <p style="font-size: 18px;">افزایش طول توالی</p>
371
  <hr style="border: 1px solid rgba(255,255,255,0.3); margin: 20px 0;">
372
- <p style="margin: 0; opacity: 0.9;">مقیاس‌دهی پویاپنجره زمینه ۱۶۳۸۴ توکنی</p>
373
  </div>
374
 
375
- <div style="background: linear-gradient(145deg, #10B981, #059669); padding: 30px; border-radius: 24px; color: white;">
 
 
 
376
  <h3 style="color: white; font-size: 24px; margin-top: 0;">🧠 SwiGLU</h3>
377
- <div style="font-size: 48px; margin: 15px 0;">۲۰٪</div>
378
  <p style="font-size: 18px;">بهبود کیفیت خروجی</p>
379
  <hr style="border: 1px solid rgba(255,255,255,0.3); margin: 20px 0;">
380
- <p style="margin: 0; opacity: 0.9;">SiLU • گیتینگ دوگانههمگرایی سریع‌تر</p>
381
  </div>
382
 
 
 
 
 
383
  </div>
384
 
385
  ---
386
 
387
  ## 💻 شروع سریع (فقط ۳ خط کد)
388
 
389
- <div style="background: #0b1120; padding: 35px; border-radius: 30px; margin: 40px 0; color: white;">
390
 
391
  <h3 style="color: white; font-size: 26px; margin-top: 0;">🚀 نصب و اجرای فوری</h3>
392
 
393
- <div style="background: #1e2436; padding: 25px; border-radius: 20px; margin: 20px 0;">
394
-
395
  ```python
396
  # گام ۱: نصب کتابخانه
397
  # pip install transformers torch accelerate
@@ -415,13 +495,28 @@ outputs = model.generate(
415
  )
416
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
417
  ```
 
 
 
418
  </div>
419
- <div style="background: #2d3748; padding: 20px; border-radius: 16px; margin-top: 20px; border-right: 6px solid #8B5CF6;"> <p style="margin: 0; font-size: 18px;"><strong>📌 نکته:</strong> برای اولین بار، مدل به صورت خودکار دانلود می‌شود (~۱۵ گیگابایت). دفعات بعدی از کش استفاده می‌کند.</p> </div></div>
420
 
 
 
 
 
 
421
 
422
- 🛠️ پیکربندی برای سخت‌افزارهای مختلف
423
- <div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin: 40px 0;"><div style="background: linear-gradient(145deg, #1a1e2c, #2d3748); padding: 30px; border-radius: 28px; color: white; border-bottom: 8px solid #3B82F6;"><h3 style="color: white; font-size: 24px; margin-top: 0;">📦 GPU 4GB (کم‌مصرف)</h3>
424
 
 
 
 
 
 
 
 
 
 
425
  from configuration_yasin import YasinConfig
426
 
427
  config = YasinConfig(
@@ -437,13 +532,28 @@ config = YasinConfig(
437
 
438
  # بهینه‌سازی حافظه
439
  use_cache=True,
440
- _attn_implementation="sdpa", # SDPA سبک‌تر
441
  )
442
 
443
  model = YasinForCausalLM(config)
 
 
 
 
 
 
 
 
 
 
 
 
444
 
445
- <ul style="margin-top: 20px; list-style: none; padding-right: 0;"> <li style="margin-bottom: 12px;">✅ <strong>مصرف RAM:</strong> ~۳.۵ گیگابایت</li> <li style="margin-bottom: 12px;">✅ <strong>سرعت:</strong> ۴۰-۵۰ توکن/ثانیه</li> <li style="margin-bottom: 12px;">✅ <strong>مناسب:</strong> لپ‌تاپ، GPUهای خانگی</li> </ul></div><div style="background: linear-gradient(145deg, #1a1e2c, #2d3748); padding: 30px; border-radius: 28px; color: white; border-bottom: 8px solid #8B5CF6;"><h3 style="color: white; font-size: 24px; margin-top: 0;">🚀 GPU 24GB+ (حداکثر کیفیت)</h3>
446
 
 
 
 
447
  config = YasinConfig(
448
  # ابعاد کامل
449
  hidden_size=4096,
@@ -461,51 +571,165 @@ config = YasinConfig(
461
  _attn_implementation="flash_attention_2",
462
  use_cache=True,
463
  )
 
 
 
 
 
 
 
464
 
465
- <ul style="margin-top: 20px; list-style: none; padding-right: 0;"> <li style="margin-bottom: 12px;">🔥 <strong>مصرف RAM:</strong> ~۲۰ گیگابایت</li> <li style="margin-bottom: 12px;">🔥 <strong>سرعت:</strong> ۸۰-۱۰۰ توکن/ثانیه</li> <li style="margin-bottom: 12px;">🔥 <strong>مناسب:</strong> سرورها، A100، H100</li> </ul></div></div>
 
 
 
 
 
 
 
 
466
 
467
- ⚡ بهینه‌سازی بیشتر
468
- <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin: 30px 0;"><div style="background: #f8fafc; padding: 25px; border-radius: 20px; border: 1px solid #e2e8f0;"><h4>💾 8-bit Quantization</h4>
469
 
 
 
 
 
 
 
 
 
 
 
 
470
  model = AutoModelForCausalLM.from_pretrained(
471
  model_name,
472
  load_in_8bit=True,
473
  device_map="auto"
474
  )
 
 
 
 
 
475
 
476
- <p style="color: #059669; margin-top: 10px;">✓ کاهش ۵۰٪ حافظه</p></div><div style="background: #f8fafc; padding: 25px; border-radius: 20px; border: 1px solid #e2e8f0;"><h4>🔄 4-bit Quantization</h4>
 
477
 
 
 
 
 
 
478
  model = AutoModelForCausalLM.from_pretrained(
479
  model_name,
480
  load_in_4bit=True,
481
  bnb_4bit_compute_dtype=torch.float16
482
  )
 
 
 
 
 
 
 
 
 
 
483
 
484
- <p style="color: #059669; margin-top: 10px;">✓ کاهش ۷۵٪ حافظه</p></div><div style="background: #f8fafc; padding: 25px; border-radius: 20px; border: 1px solid #e2e8f0;"><h4>🧠 Gradient Checkpointing</h4>
485
 
 
486
  # برای آموزش با حافظه محدود
487
  model.gradient_checkpointing_enable()
488
  model.config.use_cache = False
 
489
 
 
490
 
491
- <p style="color: #059669; margin-top: 10px;">✓ کاهش ۴۰٪ حافظه</p></div></div>
492
 
 
 
 
493
 
494
- 📈 نتایج آموزش و ارزیابی
495
- <div style="background: white; padding: 35px; border-radius: 30px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); margin: 40px 0;"><h3 style="font-size: 28px; color: #1e293b; margin-top: 0;">📉 روند کاهش Loss</h3><div align="center" style="margin: 30px 0;">
496
- گام Training Loss Perplexity کاهش نسبی زمان آموزش
497
- ۱۰۰ ۴.۸۷۱۶ ۱۳۰.۵ پایه ۲ دقیقه
498
- ۵۰۰ ۱.۸۱۲۶ ۶.۱۱ ۶۲.۸٪ ۱۰ دقیقه
499
- ۱۰۰۰ ۱.۶۰۱۸ ۴.۹۵ ۶۷.۱٪ ۲۰ دقیقه
500
- ۲۰۰۰ ۱.۵۱۴۵ ۴.۵۳ ۶۸.۹٪ ۴۰ دقیقه
501
- ۳۰۰۰ ۱.۴۰۱۱ ۴.۰۶ ۷۱.۲٪ ۶۰ دقیقه
502
- ۴۰۰۰ ۱.۲۸۹۶ ۳.۶۳ ۷۳.۵٪ ۸۰ دقیقه
503
- ۵۰۰۰ ۱.۲۸۹۶ ۳.۶۳ ۷۳.۵٪ ۱۰۰ دقیقه
504
  </div>
505
- <div style="background: linear-gradient(90deg, #8B5CF6, #3B82F6); padding: 30px; border-radius: 20px; margin-top: 30px; color: white;"><h4 style="color: white; font-size: 22px; margin-top: 0;">🏆 مقایسه با سایر مدل‌ها</h4><div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px;"><div style="text-align: center;"> <div style="font-size: 36px; margin-bottom: 10px;">📊</div> <div style="font-weight: bold;">Perplexity</div> <div style="font-size: 24px; margin-top: 10px;">۳.۶۳</div> <div style="font-size: 14px; opacity: 0.9;">یاسین</div> <hr style="border: 1px solid rgba(255,255,255,0.3);"> <div style="font-size: 20px;">۴.۸۱</div> <div style="font-size: 14px; opacity: 0.9;">سایر مدل‌ها</div> </div><div style="text-align: center;"> <div style="font-size: 36px; margin-bottom: 10px;">⚡</div> <div style="font-weight: bold;">سرعت استنتاج</div> <div style="font-size: 24px; margin-top: 10px;">۸۵</div> <div style="font-size: 14px; opacity: 0.9;">توکن/ثانیه</div> <hr style="border: 1px solid rgba(255,255,255,0.3);"> <div style="font-size: 20px;">۵۲</div> <div style="font-size: 14px; opacity: 0.9;">سایر مدل‌ها</div> </div><div style="text-align: center;"> <div style="font-size: 36px; margin-bottom: 10px;">💾</div> <div style="font-weight: bold;">مصرف حافظه</div> <div style="font-size: 24px; margin-top: 10px;">۷.۲</div> <div style="font-size: 14px; opacity: 0.9;">گیگابایت</div> <hr style="border: 1px solid rgba(255,255,255,0.3);"> <div style="font-size: 20px;">۲۴.۰</div> <div style="font-size: 14px; opacity: 0.9;">سایر مدل‌ها</div> </div><div style="text-align: center;"> <div style="font-size: 36px; margin-bottom: 10px;">🎯</div> <div style="font-weight: bold;">دقت فارسی</div> <div style="font-size: 24px; margin-top: 10px;">۹۴٪</div> <div style="font-size: 14px; opacity: 0.9;">یاسین</div> <hr style="border: 1px solid rgba(255,255,255,0.3);"> <div style="font-size: 20px;">۷۸٪</div> <div style="font-size: 14px; opacity: 0.9;">سایر مدل‌ها</div> </div></div></div></div>
506
 
507
- 🎓 آموزش و فاین‌تیون
508
- <div style="background: linear-gradient(145deg, #f5f3ff, #ede9fe); padding: 35px; border-radius: 30px; margin: 40px 0;"><h3 style="font-size: 26px; color: #5b21b6; margin-top: 0;">📚 آموزش مدل روی دیتاست دلخواه</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
509
  ```python
510
  from transformers import Trainer, TrainingArguments
511
  from datasets import load_dataset
@@ -535,36 +759,247 @@ trainer = Trainer(
535
  )
536
 
537
  trainer.train()
538
- </div>
539
  ```
540
 
541
- 🤝 چگونه مشارکت کنم؟
542
- <div style="background: linear-gradient(145deg, #667eea, #764ba2); padding: 45px; border-radius: 40px; color: white; margin: 50px 0; text-align: center;"><h2 style="color: white; font-size: 36px; margin-top: 0;">⭐ به خانواده هوش مصنوعی فیبوناچی بپیوندید!</h2><p style="font-size: 20px; line-height: 1.8; margin-bottom: 30px;"> ما به مشارکت‌کنندگان علاقه‌مند در تمام سطوح خوشامد می‌گوییم. فرقی نمی‌کند برنامه‌نویس هستید یا نه، هر کمکی ارزشمند است! </p><div style="display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 30px;"><div style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 30px; border-radius: 28px; width: 200px; border: 1px solid rgba(255,255,255,0.3);"> <div style="font-size: 52px;">⭐</div> <h3 style="color: white; font-size: 24px;">ستاره دادن</h3> <p style="color: white; opacity: 0.9;">ساده‌ترین راه برای حمایت</p> </div><div style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 30px; border-radius: 28px; width: 200px; border: 1px solid rgba(255,255,255,0.3);"> <div style="font-size: 52px;">🐛</div> <h3 style="color: white; font-size: 24px;">گزارش باگ</h3> <p style="color: white; opacity: 0.9;">در GitHub Issues گزارش دهید</p> </div><div style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 30px; border-radius: 28px; width: 200px; border: 1px solid rgba(255,255,255,0.3);"> <div style="font-size: 52px;">📝</div> <h3 style="color: white; font-size: 24px;">مستندات</h3> <p style="color: white; opacity: 0.9;">بهبود و تکمیل راهنماها</p> </div><div style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 30px; border-radius: 28px; width: 200px; border: 1px solid rgba(255,255,255,0.3);"> <div style="font-size: 52px;">💡</div> <h3 style="color: white; font-size: 24px;">ایده جدید</h3> <p style="color: white; opacity: 0.9;">پیشنهاد ویژگی‌های جدید</p> </div></div></div>
543
-
544
- 📜 مجوز و شرایط استفاده
545
- <div style="background: white; padding: 35px; border-radius: 30px; border: 1px solid #e2e8f0; margin: 40px 0;"><div style="display: flex; align-items: center; gap: 20px; margin-bottom: 25px;"> <div style="font-size: 48px;">📄</div> <div> <h3 style="margin: 0; color: #1e293b; font-size: 26px;">مجوز Apache 2.0</h3> <p style="margin: 5px 0 0 0; color: #475569;">آزاد برای استفاده تجاری و غیرتجاری</p> </div> </div><div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px;"><div style="background: #f0fdf4; padding: 25px; border-radius: 20px; border-right: 6px solid #22c55e;"> <h4 style="color: #166534; margin-top: 0; font-size: 20px;">✅ مجاز</h4> <ul style="list-style: none; padding-right: 0; margin-bottom: 0;"> <li style="margin-bottom: 12px;">✓ استفاده تجاری آزاد</li> <li style="margin-bottom: 12px;">✓ توزیع و تغییر</li> <li style="margin-bottom: 12px;">✓ استفاده شخصی</li> <li style="margin-bottom: 12px;">✓ استفاده در پروژه‌های تجاری</li> </ul> </div><div style="background: #fef2f2; padding: 25px; border-radius: 20px; border-right: 6px solid #ef4444;"> <h4 style="color: #991b1b; margin-top: 0; font-size: 20px;">❌ غیرمجاز</h4> <ul style="list-style: none; padding-right: 0; margin-bottom: 0;"> <li style="margin-bottom: 12px;">✗ ادعای مالکیت مدل</li> <li style="margin-bottom: 12px;">✗ حذف کپی‌رایت</li> <li style="margin-bottom: 12px;">✗ مسئولیت خروجی‌ها با کاربر است</li> <li style="margin-bottom: 12px;">✗ بدون تضمین عملکرد</li> </ul> </div></div><div style="background: #f8fafc; padding: 20px; border-radius: 16px; margin-top: 25px; direction: ltr; text-align: left; font-family: monospace;">
546
-
547
- 👥 تیم توسعه و قدردانی
548
- <div style="background: linear-gradient(145deg, #f8fafc, #f1f5f9); padding: 40px; border-radius: 40px; margin: 40px 0;"><div style="text-align: center; margin-bottom: 40px;"><h3 style="font-size: 32px; color: #0f172a; margin-bottom: 20px;">❤️ تیم یاسین</h3><div style="display: inline-block; background: white; padding: 30px 50px; border-radius: 30px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); margin: 0 auto;">
549
- نقش نام ارتباط
550
- پژوهشگر ارشد تیم رئال ربات | WWW.RealRobot.ir
551
- تاریخ شروع ۰۲/۰۳/۲۰۲۳ -
552
- وابستگی Fibonacci AI -
553
- </div></div><div style="background: white; padding: 35px; border-radius: 28px;"><h3 style="font-size: 26px; color: #0f172a; margin-top: 0;">🙏 سپاسگزاری</h3><div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;"><div> <ul style="list-style: none; padding-right: 0;"> <li style="margin-bottom: 15px; font-size: 18px;">🤗 جامعه Hugging Face</li> <li style="margin-bottom: 15px; font-size: 18px;">🔥 تیم PyTorch</li> <li style="margin-bottom: 15px; font-size: 18px;">🦙 پژوهشگران Meta LLaMA</li> </ul> </div><div> <ul style="list-style: none; padding-right: 0;"> <li style="margin-bottom: 15px; font-size: 18px;">🌪️ تیم Mistral AI</li> <li style="margin-bottom: 15px; font-size: 18px;">🧠 تیم Google DeepMind</li> <li style="margin-bottom: 15px; font-size: 18px;">🇮🇷 جامعه فارسی‌زبان هوش مصنوعی huggingface.co/PersianAICommunity </li> </ul> </div></div></div></div>
554
-
555
- 📬 ارتباط با ما
556
- <div style="background: linear-gradient(135deg, #1e293b, #0f172a); padding: 45px; border-radius: 40px; color: white; margin: 40px 0; text-align: center;"><h2 style="color: white; font-size: 36px; margin-top: 0;">🚀 آماده شروع هستید؟</h2><div style="display: flex; justify-content: center; gap: 30px; margin: 40px 0; flex-wrap: wrap;"><div style="background: rgba(255,255,255,0.1); padding: 25px; border-radius: 25px; min-width: 180px;"> <div style="font-size: 32px; margin-bottom: 10px;">📧</div> <strong style="font-size: 18px;">ایمیل</strong><br> <span style="opacity: 0.9;">info@RealRobot.ir</span> </div><div style="background: rgba(255,255,255,0.1); padding: 25px; border-radius: 25px; min-width: 180px;"> <div style="font-size: 32px; margin-bottom: 10px;">🅾 𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦</div> <strong style="font-size: 18px;">اینستاگرام</strong><br> <span style="opacity: 0.9;">@Fibonacci.ai</span> </div><div style="background: rgba(255,255,255,0.1); padding: 25px; border-radius: 25px; min-width: 180px;"> <div style="font-size: 32px; margin-bottom: 10px;">💬</div> <strong style="font-size: 18px;">تلگرام</strong><br> <span style="opacity: 0.9;"> T.ME/FibonacciAi </span> </div><div style="background: rgba(255,255,255,0.1); padding: 25px; border-radius: 25px; min-width: 180px;"> <div style="font-size: 32px; margin-bottom: 10px;">🤗</div> <strong style="font-size: 18px;">Hugging Face</strong><br> <span style="opacity: 0.9;">/fibonacciai/Iran-v1</span> </div></div><div style="margin-top: 40px;">
557
- <div align="center" style="background: linear-gradient(145deg, #1a1e2c, #2d3748); padding: 25px; border-radius: 28px; margin: 30px 0; border-bottom: 6px solid #8B5CF6;">
558
- <h3 style="color: white; font-size: 24px; margin-top: 0;">☕ از هوش مصنوعی ایران حمایت کن</h3>
559
- <p style="color: #e2e8f0; font-size: 16px; margin-bottom: 25px;">
560
- با یک فنجان قهوه، به توسعه مدل زبانی فارسی ایران کمک کن!
561
- </p>
562
- <a href="https://coffeebede.com/realrobot" target="_blank" rel="noopener noreferrer" onclick="window.open('https://coffeebede.com/realrobot', '_blank'); return false;" style="display: inline-block; background: linear-gradient(90deg, #8B5CF6, #7C3AED); color: white; padding: 16px 40px; border-radius: 50px; font-size: 20px; font-weight: bold; text-decoration: none; box-shadow: 0 8px 20px rgba(139,92,246,0.3); border: 1px solid rgba(255,255,255,0.2); cursor: pointer;">
563
- ☕ قهوه بده ☕
564
- </a>
565
- <p style="color: #94a3b8; font-size: 14px; margin-top: 20px;">
566
- لینک مستقیم: coffeebede.com/realrobot
567
- </p>
568
  </div>
569
- </div><hr style="border: 1px solid rgba(255,255,255,0.2); margin: 40px 0;"><p style="font-size: 22px; font-weight: bold; margin: 20px 0;"> ⭐ از حمایت شما سپاسگزاریم ⭐ </p><p style="font-size: 20px; margin: 20px 0;"> توسط تیم جوان ساخته شده با عشق ❤️ برای زبان فارسی برای ایران</p><p style="font-size: 16px; opacity: 0.8; margin-top: 30px;"> © 2018-2026 .هوش مصنوعی فبوناچی تمامی حقوق برای شرکت رئال ربات محفوظ است. </p></div>
570
- WWW.FibonacciAi.ir
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  - perplexity
26
  ---
27
 
28
+ <div align="center">
29
 
30
+ # 🤖 مدل زبانی ایران نسخه ۱ با معماری بومی یاسین 🇮🇷
 
31
 
32
+ ### 🌟 اولین معماری مدل زبانی متن‌باز فارسی
 
 
 
 
33
 
34
+ <p align="center">
35
+ <img src="https://capsule-render.vercel.app/api?type=waving&height=200&section=header&text=مدل%20زبانی%20ایران&fontSize=45&fontColor=FFFFFF&desc=پلی%20میان%20پیشرفته‌ترین%20پژوهش‌های%20دنیا%20و%20زبان%20شیرین%20فارسی&descSize=16&descAlignY=70&animation=fadeIn&color=0:1E7A34,50:FFFFFF,100:DC2626" width="100%"/>
36
+ </p>
37
+
38
+ <p align="center">
39
+ <a href="https://huggingface.co/fibonacciai/">
40
+ <img src="https://img.shields.io/badge/🤗%20Hugging%20Face-مدل%20ایران-8B5CF6?style=for-the-badge&logo=huggingface" alt="Hugging Face"/>
41
+ </a>
42
+ <a href="https://www.python.org/">
43
+ <img src="https://img.shields.io/badge/Python-3.8%2B-3776AB?style=for-the-badge&logo=python" alt="Python"/>
44
+ </a>
45
+ <a href="https://pytorch.org/">
46
+ <img src="https://img.shields.io/badge/PyTorch-2.0%2B-EE4C2C?style=for-the-badge&logo=pytorch" alt="PyTorch"/>
47
+ </a>
48
+ <a href="https://opensource.org/licenses/Apache-2.0">
49
+ <img src="https://img.shields.io/badge/License-Apache%202.0-7D3C98?style=for-the-badge" alt="License"/>
50
+ </a>
51
+ </p>
52
+
53
+ <p align="center">
54
+ <a href="https://github.com/realrobotteam">
55
+ <img src="https://img.shields.io/github/stars/realrobotteam/yasin-model?style=for-the-badge&logo=github&color=yellow" alt="GitHub Stars"/>
56
+ </a>
57
+ <a href="https://colab.research.google.com/">
58
+ <img src="https://img.shields.io/badge/Colab-دموی%20آنلاین-F9AB00?style=for-the-badge&logo=googlecolab" alt="Colab"/>
59
+ </a>
60
+ </p>
61
 
62
+ </div>
63
 
64
  ---
65
 
66
  ## 📋 فهرست مطالب
67
+
68
+ <table align="center" style="width: 100%; border: none;">
69
+ <tr>
70
+ <td align="center" width="25%"><a href="#-معرفی-کلی">🌟 معرفی</a></td>
71
+ <td align="center" width="25%"><a href="#-ویژگی‌های-منحصربه‌فرد">✨ ویژگی‌ها</a></td>
72
+ <td align="center" width="25%"><a href="#-نمونه-خروجی-واقعی">📊 نمونه خروجی</a></td>
73
+ <td align="center" width="25%"><a href="#️-معماری-فنی-پیشرفته">⚙️ معماری</a></td>
74
+ </tr>
75
+ <tr>
76
+ <td align="center"><a href="#-شروع-سریع">🚀 شروع سریع</a></td>
77
+ <td align="center"><a href="#-نتایج-آموزش-و-ارزیابی">📈 نتایج</a></td>
78
+ <td align="center"><a href="#موزش-و-فاینتیون">🎓 آموزش</a></td>
79
+ <td align="center"><a href="#-مجوز-و-شرایط-استفاده">📜 مجوز</a></td>
80
+ </tr>
81
+ </table>
82
 
83
  ---
84
 
85
  ## 🌟 معرفی کلی
86
 
87
+ <div align="center">
88
+
89
+ <table style="width: 100%; border: none; background: linear-gradient(145deg, #1a2639, #2c3e50); border-radius: 25px; padding: 30px; box-shadow: 0 20px 40px rgba(139,92,246,0.15); border-bottom: 6px solid #8B5CF6;">
90
+ <tr>
91
+ <td style="padding: 25px; color: white;">
92
 
93
+ <h2 align="center">🎯 مدل زبانی ایران چیست؟</h2>
94
 
95
+ <p align="justify" style="font-size: 17px; line-height: 2; color: #f1f5f9;">
96
+ <strong style="color: #a78bfa;">ایران نسخه ۱</strong> یک مدل زبانی بزرگ (LLM) دوزبانه فارسی-انگلیسی است که با معماری <strong style="color: #a78bfa;">ترنسفورمر پیشرفته</strong> و تکنیک‌های مدرن <code style="background: rgba(139,92,246,0.2); padding: 2px 8px; border-radius: 5px;">GQA</code>، <code style="background: rgba(139,92,246,0.2); padding: 2px 8px; border-radius: 5px;">RoPE</code> و <code style="background: rgba(139,92,246,0.2); padding: 2px 8px; border-radius: 5px;">SwiGLU</code> پیاده‌سازی شده است. این مدل حاصل آموزش روی <strong style="color: #fbbf24;">۳۰ میلیون</strong> متن فارسی و استفاده از آخرین دستاوردهای پژوهشی در حوزه پردازش زبان طبیعی است.
97
  </p>
98
 
99
+ <p align="justify" style="font-size: 17px; line-height: 2; color: #f1f5f9;">
100
+ <strong style="color: #fbbf24;">ایران نسخه ۱</strong> برای این ساخته شده که زبان فارسی را در دنیای هوش مصنوعی زنده نگه دارد. برخلاف مدل‌های عمومی که فارسی را به‌عنوان زبان دوم می‌بینند، یاسین از ابتدا برای درک عمق ادبیات، فرهنگ و ساختار منحصربه‌فرد زبان فارسی طراحی شده است.
101
  </p>
102
 
103
+ </td>
104
+ </tr>
105
+ </table>
106
+
107
  </div>
108
 
109
  ---
110
 
111
  ## ✨ ویژگی‌های منحصربه‌فرد
112
 
113
+ <div align="center">
114
+
115
+ <table style="width: 100%; border: none; border-collapse: separate; border-spacing: 20px;">
116
+ <tr>
117
+ <td style="width: 50%; vertical-align: top;">
118
+
119
+ <div style="background: linear-gradient(135deg, #f5f3ff, #ede9fe); padding: 30px; border-radius: 25px; border-bottom: 6px solid #8B5CF6; box-shadow: 0 15px 35px rgba(139,92,246,0.12); height: 100%;">
120
+
121
+ <div align="center">
122
+ <img src="https://img.shields.io/badge/🎯-8B5CF6?style=for-the-badge&logoSize=40" alt="icon" style="width: 80px; height: 80px; border-radius: 50%; background: #8B5CF6;"/>
123
+ </div>
124
+
125
+ <h3 align="center" style="color: #5b21b6; font-size: 22px;">معماری یاسین با بومی‌سازی عمیق</h3>
126
+
127
+ <p align="justify" style="font-size: 15px; line-height: 1.8; color: #4c1d95;">
128
+ • طراحی شده از پایه برای زبان فارسی<br/>
129
+ • درک اصطلاحات، ضرب‌المثل‌ها و ساختارهای دستوری پیچیده<br/>
130
+ • پشتیبانی کامل از خط و نگارش فارسی
131
+ </p>
132
+
133
+ </div>
134
+
135
+ </td>
136
+ <td style="width: 50%; vertical-align: top;">
137
+
138
+ <div style="background: linear-gradient(135deg, #eff6ff, #dbeafe); padding: 30px; border-radius: 25px; border-bottom: 6px solid #3B82F6; box-shadow: 0 15px 35px rgba(59,130,246,0.12); height: 100%;">
139
+
140
+ <div align="center">
141
+ <img src="https://img.shields.io/badge/⚡-3B82F6?style=for-the-badge&logoSize=40" alt="icon" style="width: 80px; height: 80px; border-radius: 50%; background: #3B82F6;"/>
142
+ </div>
143
+
144
+ <h3 align="center" style="color: #1e40af; font-size: 22px;">کارایی فوق‌العاده</h3>
145
+
146
+ <p align="justify" style="font-size: 15px; line-height: 1.8; color: #1e3a8a;">
147
+ • مکانیزم GQA با کاهش <strong>۷۵٪</strong> مصرف ح��فظه<br/>
148
+ • پشتیبانی از Flash Attention 2<br/>
149
+ • استنتاج سریع‌تر با SDPA
150
+ </p>
151
 
 
 
 
 
152
  </div>
153
 
154
+ </td>
155
+ </tr>
156
+ <tr>
157
+ <td style="width: 50%; vertical-align: top;">
158
+
159
+ <div style="background: linear-gradient(135deg, #ecfdf5, #d1fae5); padding: 30px; border-radius: 25px; border-bottom: 6px solid #10B981; box-shadow: 0 15px 35px rgba(16,185,129,0.12); height: 100%;">
160
+
161
+ <div align="center">
162
+ <img src="https://img.shields.io/badge/🔄-10B981?style=for-the-badge&logoSize=40" alt="icon" style="width: 80px; height: 80px; border-radius: 50%; background: #10B981;"/>
163
+ </div>
164
+
165
+ <h3 align="center" style="color: #065f46; font-size: 22px;">انعطاف‌پذیری کامل</h3>
166
+
167
+ <p align="justify" style="font-size: 15px; line-height: 1.8; color: #064e3b;">
168
+ • قابل اجرا روی GPUهای ۴GB تا ۲۴GB<br/>
169
+ • پشتیبانی از quantization 8-bit و 4-bit<br/>
170
+ • مقیاس‌پذیری پویا
171
+ </p>
172
+
173
  </div>
174
 
175
+ </td>
176
+ <td style="width: 50%; vertical-align: top;">
177
+
178
+ <div style="background: linear-gradient(135deg, #fef3c7, #fde68a); padding: 30px; border-radius: 25px; border-bottom: 6px solid #F59E0B; box-shadow: 0 15px 35px rgba(245,158,11,0.12); height: 100%;">
179
+
180
+ <div align="center">
181
+ <img src="https://img.shields.io/badge/🌍-F59E0B?style=for-the-badge&logoSize=40" alt="icon" style="width: 80px; height: 80px; border-radius: 50%; background: #F59E0B;"/>
182
  </div>
183
 
184
+ <h3 align="center" style="color: #92400e; font-size: 22px;">دوزبانه هوشمند</h3>
185
+
186
+ <p align="justify" style="font-size: 15px; line-height: 1.8; color: #78350f;">
187
+ تسلط کامل به فارسی و انگلیسی<br/>
188
+ • ترجمه خودکار بین دو زبان<br/>
189
+ • درک مفاهیم بینافرهنگی
190
+ </p>
191
+
192
  </div>
193
 
194
+ </td>
195
+ </tr>
196
+ </table>
197
+
198
  </div>
199
 
200
  ---
201
 
202
  ## 💎 کاربردهای عملی
203
 
204
+ <div align="center">
205
 
206
+ <table style="width: 100%; border: none; border-collapse: separate; border-spacing: 15px;">
207
+ <tr>
208
+ <td align="center" width="33%">
209
+
210
+ <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); border: 1px solid #eaeef2; height: 100%;">
211
+
212
+ <div style="font-size: 42px; margin-bottom: 10px;">✍️</div>
213
  <h3 style="color: #1e293b;">نویسندگی خلاق</h3>
214
+ <p style="color: #475569; font-size: 14px;">کمک به نوشتن مقاله، داستان، شعر و محتوای خلاقانه</p>
215
+
216
  </div>
217
 
218
+ </td>
219
+ <td align="center" width="33%">
220
+
221
+ <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); border: 1px solid #eaeef2; height: 100%;">
222
+
223
+ <div style="font-size: 42px; margin-bottom: 10px;">📚</div>
224
  <h3 style="color: #1e293b;">آموزش و پژوهش</h3>
225
+ <p style="color: #475569; font-size: 14px;">دستیار آموزشی هوشمند، پاسخگویی به سوالات درسی</p>
226
+
227
  </div>
228
 
229
+ </td>
230
+ <td align="center" width="33%">
231
+
232
+ <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); border: 1px solid #eaeef2; height: 100%;">
233
+
234
+ <div style="font-size: 42px; margin-bottom: 10px;">💬</div>
235
+ <h3 style="color: #1e293b;">چت‌بات و پشتیبانی</h3>
236
+ <p style="color: #475569; font-size: 14px;">ایجاد دستیارهای هوشمند فارسی، پشتیبانی مشتری</p>
237
+
238
  </div>
239
 
240
+ </td>
241
+ </tr>
242
+ <tr>
243
+ <td align="center">
244
+
245
+ <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); border: 1px solid #eaeef2; height: 100%;">
246
+
247
+ <div style="font-size: 42px; margin-bottom: 10px;">📊</div>
248
  <h3 style="color: #1e293b;">تحلیل داده‌های متنی</h3>
249
+ <p style="color: #475569; font-size: 14px;">تحلیل نظرات، بررسی احساسات، دسته‌بندی متون</p>
250
+
251
  </div>
252
 
253
+ </td>
254
+ <td align="center">
255
+
256
+ <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); border: 1px solid #eaeef2; height: 100%;">
257
+
258
+ <div style="font-size: 42px; margin-bottom: 10px;">🏥</div>
259
  <h3 style="color: #1e293b;">سلامت و پزشکی</h3>
260
+ <p style="color: #475569; font-size: 14px;">تحلیل بازخورد بیماران، دستیار پرسش و پاسخ پزشکی</p>
261
+
262
  </div>
263
 
264
+ </td>
265
+ <td align="center">
266
+
267
+ <div style="background: white; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); border: 1px solid #eaeef2; height: 100%;">
268
+
269
+ <div style="font-size: 42px; margin-bottom: 10px;">🎨</div>
270
  <h3 style="color: #1e293b;">خلاقیت و سرگرمی</h3>
271
+ <p style="color: #475569; font-size: 14px;">تولید پادکست، شاعر الکترونیک، داستان‌پردازی</p>
272
+
273
  </div>
274
 
275
+ </td>
276
+ </tr>
277
+ </table>
278
+
279
  </div>
280
 
281
  ---
282
 
283
  ## 📊 نمونه خروجی واقعی
284
 
285
+ <div align="center">
286
 
287
+ <table style="width: 100%; border: none; background: linear-gradient(145deg, #0b1120, #1a1f2e); border-radius: 25px; box-shadow: 0 25px 50px rgba(0,0,0,0.2); border-right: 8px solid #8B5CF6;">
288
+ <tr>
289
+ <td style="padding: 30px;">
290
 
291
+ <h3 style="color: #a78bfa; font-size: 22px;">🔹 ورودی:</h3>
292
+
293
+ <div style="background: #1e2436; padding: 20px; border-radius: 15px; margin: 15px 0; border: 1px solid #3d4459; direction: rtl; text-align: right;">
294
+
295
+ ```
296
  هوش مصنوعی در ایران چه جایگاهی دارد؟ لطفاً با ذکر مثال توضیح دهید.
297
+ ```
298
+
299
  </div>
300
 
301
+ <h3 style="color: #a78bfa; font-size: 22px; margin-top: 30px;">🔸 خروجی مدل یاسین:</h3>
302
+
303
+ <div style="background: #1e2436; padding: 25px; border-radius: 15px; margin: 15px 0; border: 1px solid #8B5CF6; direction: rtl; text-align: right; font-family: Vazir, IRANSans, Tahoma, sans-serif;">
304
 
305
+ ```
306
+ هوش مصنوعی در ایران طی سال‌های اخیر رشد قابل توجهی داشته است. دانشگاه‌های برتر
307
+ مانند صنعتی شریف، تهران و امیرکبیر دوره‌های تخصصی در این حوزه راه‌اندازی
308
+ کرده‌اند.
309
 
310
  برای مثال:
311
  ✅ دانشگاه صنعتی شریف - آزمایشگاه پردازش زبان طبیعی با تمرکز بر فارسی
312
  ✅ دانشگاه تهران - مرکز تحقیقات هوش مصنوعی و رباتیک
313
  ✅ دانشگاه امیرکبیر - پژوهشکده فناوری اطلاعات و هوش مصنوعی
314
 
315
+ شرکت‌های دانش‌بنیان متعددی در زمینه پردازش زبان فارسی، بینایی ماشین و
316
+ رباتیک فعالیت می‌کنند. شرکت‌هایی مانند هوشا، دیجیکالا و اسنپ تیم‌های
317
+ تخصصی هوش مصنوعی دارند.
318
 
319
  با این حال، چالش‌هایی مانند:
320
  ⚠️ دسترسی محدود به سخت‌افزارهای پیشرفته
 
322
  ⚠️ کمبود داده‌های باکیفیت فارسی
323
  ⚠️ تحریم‌های بین‌المللی
324
 
325
+ وجود دارد. پیش‌بینی می‌شود با سرمایه‌گذاری بیشتر در این حوزه، ایران بتواند
326
+ جایگاه بهتری در منطقه کسب کند.
327
+ ```
328
+
329
  </div>
330
 
331
+ </td>
332
+ </tr>
333
+ </table>
334
+
335
  </div>
336
 
337
  ---
338
 
339
  ## ⚙️ معماری فنی پیشرفته
340
 
341
+ <div align="center" style="background: white; padding: 35px; border-radius: 30px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); margin: 40px 0;">
342
 
343
  <h3 style="font-size: 28px; color: #1e293b; border-bottom: 4px solid #8B5CF6; padding-bottom: 15px;">🧠 نمای کلی معماری</h3>
344
 
345
+ <div align="center" style="margin: 30px 0; font-family: monospace; background: #f8fafc; padding: 25px; border-radius: 20px;">
346
 
347
+ ```
348
  ┌─────────────────────────────────────────────────────────────────┐
349
+ 📝 ورود�� متنی (Text Input)
 
350
  └────────────────────────────────────┬────────────────────────────┘
351
+
352
  ┌─────────────────────────────────────────────────────────────────┐
353
+ ⚡ Embedding + RoPE
354
+ جاسازی توکن + موقعیت‌یابی چرخشی
355
+ (Rotary Position Embedding)
356
  └────────────────────────────────────┬────────────────────────────┘
357
+
358
  ┌─────────────────────────────────────────────────────────────────┐
359
+ 🔷 ×۳۲ لایه دیکودر
360
+ 32 Decoder Layers
361
  ├─────────────────────────────────────────────────────────────────┤
362
+ ┌───────────────────────────────────────────────────────────
363
+ 🎯 Self-Attention (GQA با ۸ سر KV)
364
+ Grouped Query Attention (4:1 ratio)
365
+ • کاهش ۷۵٪ مصرف حافظه
366
+ • حفظ کیفیت با اشتراک‌گذاری KV
367
+ └───────────────────────────────────────────────────────────
368
+
369
+ ┌───────────────────────────────────────────────────────────
370
+ 🧮 Feed-Forward (SwiGLU)
371
+ • تابع فعال‌سازی SiLU/Swish
372
+ • بهبود ۲۰٪ در کیفیت خروجی
373
+ • ۳ لایه خطی با گیتینگ هوشمند
374
+ └───────────────────────────────────────��──────────────────
375
+
376
+ ┌───────────────────────────────────────────────────────────
377
+ 📊 RMSNorm & Residual Connection
378
+ • نرمال‌سازی پایدار
379
+ • اتصال باقیمانده برای گرادیان بهتر
380
+ └───────────────────────────────────────────────────────────
381
  └────────────────────────────────────┬────────────────────────────┘
382
+
383
  ┌─────────────────────────────────────────────────────────────────┐
384
+ 🎯 LM Head
385
+ خروجی نهایی
386
  └────────────────────────────────────┬────────────────────────────┘
387
+
388
  ┌─────────────────────────────────────────────────────────────────┐
389
+ 📄 خروجی متنی (Text Output)
 
390
  └─────────────────────────────────────────────────────────────────┘
391
+ ```
392
 
393
  </div>
394
 
 
398
 
399
  ### 📐 مشخصات کامل پیکربندی
400
 
401
+ <div align="center">
402
+
403
+ | دسته‌بندی | پارامتر | مقدار پیش‌فرض | توضیح فنی |
404
+ |:--------:|:------:|:-------------:|:---------:|
405
+ | 🏗️ مدل | معماری | Decoder-Only Transformer | مدل تولید متن خودرگرسیو |
406
+ | 🏗️ مدل | vocab_size | ۳۲,۰۰۰ | اندازه واژه‌نامه (شامل ۸۰۰۰ توکن فارسی) |
407
+ | 🏗️ مدل | hidden_size | ۴,۰۹۶ | ابعاد نمایش پنهان |
408
+ | 🏗️ مدل | num_hidden_layers | ۳۲ | عمق شبکه (تعداد لایهها) |
409
+ | 🎯 توجه | num_attention_heads | ۳۲ | تعداد سرهای Query |
410
+ | 🎯 توجه | num_key_value_heads | ۸ | سرهای KV (نسبت GQA 4:1) |
411
+ | 🎯 توجه | attention_bias | False | بدون بایاس (بهینه‌تر) |
412
+ | 🧮 MLP | intermediate_size | ۱۱,۰۰۸ | ابعاد لایه میانی |
413
+ | 🧮 MLP | hidden_act | silu | تابع فعال‌سازی Swish (SiLU) |
414
+ | 📍 موقعیت | max_position_embeddings | ۲,۰۴۸ | حداکثر طول توالی |
415
+ | 📍 موقعیت | rope_theta | ۱۰,۰۰۰.۰ | پایه فرکانس RoPE |
416
+ | 📍 موقعیت | rope_scaling | پویا (dynamic) | مقیاس‌دهی تطبیقی تا ۸ برابر |
417
+ | 📊 نرمال‌سازی | rms_norm_eps | 1e-6 | اپسیلون RMSNorm |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
 
419
  </div>
420
 
 
422
 
423
  ### 🔬 نوآوری‌های پیاده‌سازی
424
 
425
+ <div align="center">
426
+
427
+ <table style="width: 100%; border: none; border-collapse: separate; border-spacing: 20px;">
428
+ <tr>
429
+ <td align="center" width="33%">
430
 
431
+ <div style="background: linear-gradient(145deg, #8B5CF6, #7C3AED); padding: 30px; border-radius: 25px; color: white; height: 100%;">
432
  <h3 style="color: white; font-size: 24px; margin-top: 0;">🎯 GQA</h3>
433
+ <div style="font-size: 52px; margin: 15px 0; font-weight: bold;">۴:۱</div>
434
  <p style="font-size: 18px;">کاهش ۷۵٪ مصرف حافظه</p>
435
  <hr style="border: 1px solid rgba(255,255,255,0.3); margin: 20px 0;">
436
+ <p style="margin: 0; opacity: 0.9; font-size: 14px;">۳۲ سر Query • ۸ سر KV<br/>اشتراک‌گذاری هوشمند</p>
437
  </div>
438
 
439
+ </td>
440
+ <td align="center" width="33%">
441
+
442
+ <div style="background: linear-gradient(145deg, #3B82F6, #2563EB); padding: 30px; border-radius: 25px; color: white; height: 100%;">
443
  <h3 style="color: white; font-size: 24px; margin-top: 0;">🔄 RoPE</h3>
444
+ <div style="font-size: 52px; margin: 15px 0; font-weight: bold;">۸x</div>
445
  <p style="font-size: 18px;">افزایش طول توالی</p>
446
  <hr style="border: 1px solid rgba(255,255,255,0.3); margin: 20px 0;">
447
+ <p style="margin: 0; opacity: 0.9; font-size: 14px;">مقیاس‌دهی پویا<br/>پنجره زمینه ۱۶۳۸۴ توکنی</p>
448
  </div>
449
 
450
+ </td>
451
+ <td align="center" width="33%">
452
+
453
+ <div style="background: linear-gradient(145deg, #10B981, #059669); padding: 30px; border-radius: 25px; color: white; height: 100%;">
454
  <h3 style="color: white; font-size: 24px; margin-top: 0;">🧠 SwiGLU</h3>
455
+ <div style="font-size: 52px; margin: 15px 0; font-weight: bold;">۲۰٪</div>
456
  <p style="font-size: 18px;">بهبود کیفیت خروجی</p>
457
  <hr style="border: 1px solid rgba(255,255,255,0.3); margin: 20px 0;">
458
+ <p style="margin: 0; opacity: 0.9; font-size: 14px;">SiLU • گیتینگ دوگانه<br/>همگرایی سریع‌تر</p>
459
  </div>
460
 
461
+ </td>
462
+ </tr>
463
+ </table>
464
+
465
  </div>
466
 
467
  ---
468
 
469
  ## 💻 شروع سریع (فقط ۳ خط کد)
470
 
471
+ <div align="center" style="background: #0b1120; padding: 35px; border-radius: 30px; color: white;">
472
 
473
  <h3 style="color: white; font-size: 26px; margin-top: 0;">🚀 نصب و اجرای فوری</h3>
474
 
 
 
475
  ```python
476
  # گام ۱: نصب کتابخانه
477
  # pip install transformers torch accelerate
 
495
  )
496
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
497
  ```
498
+
499
+ <div style="background: #2d3748; padding: 20px; border-radius: 16px; margin-top: 20px; border-right: 6px solid #8B5CF6;">
500
+ <p style="margin: 0; font-size: 16px;"><strong>📌 نکته:</strong> برای اولین بار، مدل به صورت خودکار دانلود می‌شود (~۱۵ گیگابایت). دفعات بعدی از کش استفاده می‌کند.</p>
501
  </div>
 
502
 
503
+ </div>
504
+
505
+ ---
506
+
507
+ ## 🛠️ پیکربندی برای سخت‌افزارهای مختلف
508
 
509
+ <div align="center">
 
510
 
511
+ <table style="width: 100%; border: none; border-collapse: separate; border-spacing: 25px;">
512
+ <tr>
513
+ <td width="50%" style="vertical-align: top;">
514
+
515
+ <div style="background: linear-gradient(145deg, #1a1e2c, #2d3748); padding: 30px; border-radius: 28px; color: white; border-bottom: 8px solid #3B82F6;">
516
+
517
+ <h3 align="center" style="color: white; font-size: 22px; margin-top: 0;">📦 GPU 4GB (کم‌مصرف)</h3>
518
+
519
+ ```python
520
  from configuration_yasin import YasinConfig
521
 
522
  config = YasinConfig(
 
532
 
533
  # بهینه‌سازی حافظه
534
  use_cache=True,
535
+ _attn_implementation="sdpa",
536
  )
537
 
538
  model = YasinForCausalLM(config)
539
+ ```
540
+
541
+ <ul style="margin-top: 20px; list-style: none; padding-right: 0; font-size: 14px;">
542
+ <li style="margin-bottom: 10px;">✅ <strong>مصرف RAM:</strong> ~۳.۵ گیگابایت</li>
543
+ <li style="margin-bottom: 10px;">✅ <strong>سرعت:</strong> ۴۰-۵۰ توکن/ثانیه</li>
544
+ <li style="margin-bottom: 10px;">✅ <strong>مناسب:</strong> لپ‌تاپ، GPUهای خانگی</li>
545
+ </ul>
546
+
547
+ </div>
548
+
549
+ </td>
550
+ <td width="50%" style="vertical-align: top;">
551
 
552
+ <div style="background: linear-gradient(145deg, #1a1e2c, #2d3748); padding: 30px; border-radius: 28px; color: white; border-bottom: 8px solid #8B5CF6;">
553
 
554
+ <h3 align="center" style="color: white; font-size: 22px; margin-top: 0;">🚀 GPU 24GB+ (حداکثر کیفیت)</h3>
555
+
556
+ ```python
557
  config = YasinConfig(
558
  # ابعاد کامل
559
  hidden_size=4096,
 
571
  _attn_implementation="flash_attention_2",
572
  use_cache=True,
573
  )
574
+ ```
575
+
576
+ <ul style="margin-top: 20px; list-style: none; padding-right: 0; font-size: 14px;">
577
+ <li style="margin-bottom: 10px;">🔥 <strong>مصرف RAM:</strong> ~۲۰ گیگابایت</li>
578
+ <li style="margin-bottom: 10px;">🔥 <strong>سرعت:</strong> ۸۰-۱۰۰ توکن/ثانیه</li>
579
+ <li style="margin-bottom: 10px;">🔥 <strong>مناسب:</strong> سرورها، A100، H100</li>
580
+ </ul>
581
 
582
+ </div>
583
+
584
+ </td>
585
+ </tr>
586
+ </table>
587
+
588
+ </div>
589
+
590
+ ---
591
 
592
+ ### ⚡ بهینه‌سازی بیشتر
 
593
 
594
+ <div align="center">
595
+
596
+ <table style="width: 100%; border: none; border-collapse: separate; border-spacing: 20px;">
597
+ <tr>
598
+ <td width="33%">
599
+
600
+ <div style="background: #f8fafc; padding: 25px; border-radius: 20px; border: 1px solid #e2e8f0;">
601
+
602
+ <h4 align="center">💾 8-bit Quantization</h4>
603
+
604
+ ```python
605
  model = AutoModelForCausalLM.from_pretrained(
606
  model_name,
607
  load_in_8bit=True,
608
  device_map="auto"
609
  )
610
+ ```
611
+
612
+ <p align="center" style="color: #059669; margin-top: 15px; font-weight: bold;">✓ کاهش ۵۰٪ حافظه</p>
613
+
614
+ </div>
615
 
616
+ </td>
617
+ <td width="33%">
618
 
619
+ <div style="background: #f8fafc; padding: 25px; border-radius: 20px; border: 1px solid #e2e8f0;">
620
+
621
+ <h4 align="center">🔄 4-bit Quantization</h4>
622
+
623
+ ```python
624
  model = AutoModelForCausalLM.from_pretrained(
625
  model_name,
626
  load_in_4bit=True,
627
  bnb_4bit_compute_dtype=torch.float16
628
  )
629
+ ```
630
+
631
+ <p align="center" style="color: #059669; margin-top: 15px; font-weight: bold;">✓ کاهش ۷۵٪ حافظه</p>
632
+
633
+ </div>
634
+
635
+ </td>
636
+ <td width="33%">
637
+
638
+ <div style="background: #f8fafc; padding: 25px; border-radius: 20px; border: 1px solid #e2e8f0;">
639
 
640
+ <h4 align="center">🧠 Gradient Checkpointing</h4>
641
 
642
+ ```python
643
  # برای آموزش با حافظه محدود
644
  model.gradient_checkpointing_enable()
645
  model.config.use_cache = False
646
+ ```
647
 
648
+ <p align="center" style="color: #059669; margin-top: 15px; font-weight: bold;">✓ کاهش ۴۰٪ حافظه</p>
649
 
650
+ </div>
651
 
652
+ </td>
653
+ </tr>
654
+ </table>
655
 
 
 
 
 
 
 
 
 
 
 
656
  </div>
 
657
 
658
+ ---
659
+
660
+ ## 📈 نتایج آموزش و ارزیابی
661
+
662
+ <div align="center" style="background: white; padding: 35px; border-radius: 30px; box-shadow: 0 20px 40px rgba(0,0,0,0.05);">
663
+
664
+ <h3 style="font-size: 28px; color: #1e293b; margin-top: 0;">📉 روند کاهش Loss</h3>
665
+
666
+ | گام | Training Loss | Perplexity | کاهش نسبی | زمان آموزش |
667
+ |:---:|:-------------:|:----------:|:---------:|:----------:|
668
+ | ۱۰۰ | ۴.۸۷۱۶ | ۱۳۰.۵ | پایه | ۲ دقیقه |
669
+ | ۵۰۰ | ۱.۸۱۲۶ | ۶.۱۱ | ۶۲.۸٪ | ۱۰ دقیقه |
670
+ | ۱۰۰۰ | ۱.۶۰۱۸ | ۴.۹۵ | ۶۷.۱٪ | ۲۰ دقیقه |
671
+ | ۲۰۰۰ | ۱.۵۱۴۵ | ۴.۵۳ | ۶۸.۹٪ | ۴۰ دقیقه |
672
+ | ۳۰۰۰ | ۱.۴۰۱۱ | ۴.۰۶ | ۷۱.۲٪ | ۶۰ دقیقه |
673
+ | ۴۰۰۰ | ۱.۲۸۹۶ | ۳.۶۳ | ۷۳.۵٪ | ۸۰ دقیقه |
674
+ | ۵۰۰۰ | ۱.۲۸۹۶ | ۳.۶۳ | ۷۳.۵٪ | ۱۰۰ دقیقه |
675
+
676
+ <div style="background: linear-gradient(90deg, #8B5CF6, #3B82F6); padding: 30px; border-radius: 20px; margin-top: 30px; color: white;">
677
+
678
+ <h4 align="center" style="color: white; font-size: 22px; margin-top: 0;">🏆 مقایسه با سایر مدل‌ها</h4>
679
+
680
+ <table style="width: 100%; border: none; color: white;">
681
+ <tr>
682
+ <td align="center" width="25%">
683
+ <div style="font-size: 36px; margin-bottom: 10px;">📊</div>
684
+ <div style="font-weight: bold;">Perplexity</div>
685
+ <div style="font-size: 28px; margin-top: 10px; font-weight: bold;">۳.۶۳</div>
686
+ <div style="font-size: 14px; opacity: 0.9;">یاسین</div>
687
+ <hr style="border: 1px solid rgba(255,255,255,0.3);">
688
+ <div style="font-size: 20px;">۴.۸۱</div>
689
+ <div style="font-size: 14px; opacity: 0.9;">سایر مدل‌ها</div>
690
+ </td>
691
+ <td align="center" width="25%">
692
+ <div style="font-size: 36px; margin-bottom: 10px;">⚡</div>
693
+ <div style="font-weight: bold;">سرعت استنتاج</div>
694
+ <div style="font-size: 28px; margin-top: 10px; font-weight: bold;">۸۵</div>
695
+ <div style="font-size: 14px; opacity: 0.9;">توکن/ثانیه</div>
696
+ <hr style="border: 1px solid rgba(255,255,255,0.3);">
697
+ <div style="font-size: 20px;">۵۲</div>
698
+ <div style="font-size: 14px; opacity: 0.9;">سایر مدل‌ها</div>
699
+ </td>
700
+ <td align="center" width="25%">
701
+ <div style="font-size: 36px; margin-bottom: 10px;">💾</div>
702
+ <div style="font-weight: bold;">مصرف حافظه</div>
703
+ <div style="font-size: 28px; margin-top: 10px; font-weight: bold;">۷.۲</div>
704
+ <div style="font-size: 14px; opacity: 0.9;">گیگابایت</div>
705
+ <hr style="border: 1px solid rgba(255,255,255,0.3);">
706
+ <div style="font-size: 20px;">۲۴.۰</div>
707
+ <div style="font-size: 14px; opacity: 0.9;">سایر مدل‌ها</div>
708
+ </td>
709
+ <td align="center" width="25%">
710
+ <div style="font-size: 36px; margin-bottom: 10px;">🎯</div>
711
+ <div style="font-weight: bold;">دقت فارسی</div>
712
+ <div style="font-size: 28px; margin-top: 10px; font-weight: bold;">۹۴٪</div>
713
+ <div style="font-size: 14px; opacity: 0.9;">یاسین</div>
714
+ <hr style="border: 1px solid rgba(255,255,255,0.3);">
715
+ <div style="font-size: 20px;">۷۸٪</div>
716
+ <div style="font-size: 14px; opacity: 0.9;">سایر مدل‌ها</div>
717
+ </td>
718
+ </tr>
719
+ </table>
720
+
721
+ </div>
722
+
723
+ </div>
724
+
725
+ ---
726
+
727
+ ## 🎓 آموزش و فاین‌تیون
728
+
729
+ <div align="center" style="background: linear-gradient(145deg, #f5f3ff, #ede9fe); padding: 35px; border-radius: 30px;">
730
+
731
+ <h3 style="font-size: 26px; color: #5b21b6; margin-top: 0;">📚 آمو��ش مدل روی دیتاست دلخواه</h3>
732
+
733
  ```python
734
  from transformers import Trainer, TrainingArguments
735
  from datasets import load_dataset
 
759
  )
760
 
761
  trainer.train()
 
762
  ```
763
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
764
  </div>
765
+
766
+ ---
767
+
768
+ ## 🤝 چگونه مشارکت کنم؟
769
+
770
+ <div align="center" style="background: linear-gradient(145deg, #667eea, #764ba2); padding: 45px; border-radius: 40px; color: white;">
771
+
772
+ <h2 style="color: white; font-size: 36px; margin-top: 0;">⭐ به خانواده هوش مصنوعی فیبوناچی بپیوندید!</h2>
773
+
774
+ <p style="font-size: 18px; line-height: 1.8; margin-bottom: 30px;">
775
+ ما به مشارکت‌کنندگان علاقه‌مند در تمام سطوح خوشامد می‌گوییم.<br/>
776
+ فرقی نمی‌کند برنامه‌نویس هستید یا نه، هر کمکی ارزشمند است!
777
+ </p>
778
+
779
+ <table style="border: none; border-collapse: separate; border-spacing: 20px;">
780
+ <tr>
781
+ <td align="center">
782
+
783
+ <div style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 30px; border-radius: 28px; width: 160px; border: 1px solid rgba(255,255,255,0.3);">
784
+ <div style="font-size: 48px;">⭐</div>
785
+ <h3 style="color: white; font-size: 20px;">ستاره دادن</h3>
786
+ <p style="color: white; opacity: 0.9; font-size: 14px;">ساده‌ترین راه برای حمایت</p>
787
+ </div>
788
+
789
+ </td>
790
+ <td align="center">
791
+
792
+ <div style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 30px; border-radius: 28px; width: 160px; border: 1px solid rgba(255,255,255,0.3);">
793
+ <div style="font-size: 48px;">🐛</div>
794
+ <h3 style="color: white; font-size: 20px;">گزارش باگ</h3>
795
+ <p style="color: white; opacity: 0.9; font-size: 14px;">در GitHub Issues گزارش دهید</p>
796
+ </div>
797
+
798
+ </td>
799
+ <td align="center">
800
+
801
+ <div style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 30px; border-radius: 28px; width: 160px; border: 1px solid rgba(255,255,255,0.3);">
802
+ <div style="font-size: 48px;">📝</div>
803
+ <h3 style="color: white; font-size: 20px;">مستندات</h3>
804
+ <p style="color: white; opacity: 0.9; font-size: 14px;">بهبود و تکمیل راهنماها</p>
805
+ </div>
806
+
807
+ </td>
808
+ <td align="center">
809
+
810
+ <div style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 30px; border-radius: 28px; width: 160px; border: 1px solid rgba(255,255,255,0.3);">
811
+ <div style="font-size: 48px;">💡</div>
812
+ <h3 style="color: white; font-size: 20px;">ایده جدید</h3>
813
+ <p style="color: white; opacity: 0.9; font-size: 14px;">پیشنهاد ویژگی‌های جدید</p>
814
+ </div>
815
+
816
+ </td>
817
+ </tr>
818
+ </table>
819
+
820
+ </div>
821
+
822
+ ---
823
+
824
+ ## 📜 مجوز و شرایط استفاده
825
+
826
+ <div align="center" style="background: white; padding: 35px; border-radius: 30px; border: 1px solid #e2e8f0;">
827
+
828
+ <table style="width: 100%; border: none;">
829
+ <tr>
830
+ <td align="center" width="15%">
831
+ <div style="font-size: 48px;">📄</div>
832
+ </td>
833
+ <td align="right" width="85%">
834
+ <h3 style="margin: 0; color: #1e293b; font-size: 26px;">مجوز Apache 2.0</h3>
835
+ <p style="margin: 5px 0 0 0; color: #475569;">آزاد برای استفاده تجاری و غیرتجاری</p>
836
+ </td>
837
+ </tr>
838
+ </table>
839
+
840
+ <table style="width: 100%; border: none; border-collapse: separate; border-spacing: 20px; margin-top: 20px;">
841
+ <tr>
842
+ <td width="50%">
843
+
844
+ <div style="background: #f0fdf4; padding: 25px; border-radius: 20px; border-right: 6px solid #22c55e;">
845
+ <h4 style="color: #166534; margin-top: 0; font-size: 20px;">✅ مجاز</h4>
846
+ <ul style="list-style: none; padding-right: 0; margin-bottom: 0; font-size: 15px;">
847
+ <li style="margin-bottom: 12px;">✓ استفاده تجاری آزاد</li>
848
+ <li style="margin-bottom: 12px;">✓ توزیع و تغییر</li>
849
+ <li style="margin-bottom: 12px;">✓ استفاده شخصی</li>
850
+ <li style="margin-bottom: 12px;">✓ استفاده در پروژه‌های تجاری</li>
851
+ </ul>
852
+ </div>
853
+
854
+ </td>
855
+ <td width="50%">
856
+
857
+ <div style="background: #fef2f2; padding: 25px; border-radius: 20px; border-right: 6px solid #ef4444;">
858
+ <h4 style="color: #991b1b; margin-top: 0; font-size: 20px;">❌ غیرمجاز</h4>
859
+ <ul style="list-style: none; padding-right: 0; margin-bottom: 0; font-size: 15px;">
860
+ <li style="margin-bottom: 12px;">✗ ادعای مالکیت مدل</li>
861
+ <li style="margin-bottom: 12px;">✗ حذف کپی‌رایت</li>
862
+ <li style="margin-bottom: 12px;">✗ مسئولیت خروجی‌ها با کاربر است</li>
863
+ <li style="margin-bottom: 12px;">✗ بدون تضمین عملکرد</li>
864
+ </ul>
865
+ </div>
866
+
867
+ </td>
868
+ </tr>
869
+ </table>
870
+
871
+ </div>
872
+
873
+ ---
874
+
875
+ ## 👥 تیم توسعه و قدردانی
876
+
877
+ <div align="center" style="background: linear-gradient(145deg, #f8fafc, #f1f5f9); padding: 40px; border-radius: 40px;">
878
+
879
+ <h3 style="font-size: 32px; color: #0f172a; margin-bottom: 30px;">❤️ تیم یاسین</h3>
880
+
881
+ <div style="background: white; padding: 30px 50px; border-radius: 30px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); display: inline-block;">
882
+
883
+ | نقش | نام | ارتباط |
884
+ |:---:|:---:|:---:|
885
+ | پژوهشگر ارشد | YSNRFD | [WWW.RealRobot.ir](https://realrobot.ir) |
886
+ | تاریخ شروع | ۰۲/۰۳/۲۰۲۳ | - |
887
+ | وابستگی | Fibonacci AI | - |
888
+
889
+ </div>
890
+
891
+ <div style="background: white; padding: 35px; border-radius: 28px; margin-top: 30px;">
892
+
893
+ <h3 style="font-size: 26px; color: #0f172a; margin-top: 0;">🙏 سپاسگزاری</h3>
894
+
895
+ <table style="width: 100%; border: none; text-align: right;">
896
+ <tr>
897
+ <td width="50%">
898
+ <ul style="list-style: none; padding-right: 0; font-size: 17px;">
899
+ <li style="margin-bottom: 15px;">🤗 جامعه Hugging Face</li>
900
+ <li style="margin-bottom: 15px;">🔥 تیم PyTorch</li>
901
+ <li style="margin-bottom: 15px;">🦙 پژوهشگران Meta LLaMA</li>
902
+ </ul>
903
+ </td>
904
+ <td width="50%">
905
+ <ul style="list-style: none; padding-right: 0; font-size: 17px;">
906
+ <li style="margin-bottom: 15px;">🌪️ تیم Mistral AI</li>
907
+ <li style="margin-bottom: 15px;">🧠 تیم Google DeepMind</li>
908
+ <li style="margin-bottom: 15px;">🇮🇷 جامعه فارسی‌زبان هوش مصنوعی</li>
909
+ </ul>
910
+ </td>
911
+ </tr>
912
+ </table>
913
+
914
+ </div>
915
+
916
+ </div>
917
+
918
+ ---
919
+
920
+ ## 📬 ارتباط با ما
921
+
922
+ <div align="center" style="background: linear-gradient(135deg, #1e293b, #0f172a); padding: 45px; border-radius: 40px; color: white;">
923
+
924
+ <h2 style="color: white; font-size: 36px; margin-top: 0;">🚀 آماده شروع هستید؟</h2>
925
+
926
+ <table style="border: none; border-collapse: separate; border-spacing: 20px; margin: 30px 0;">
927
+ <tr>
928
+ <td align="center">
929
+
930
+ <div style="background: rgba(255,255,255,0.1); padding: 25px; border-radius: 25px; width: 150px;">
931
+ <div style="font-size: 32px; margin-bottom: 10px;">📧</div>
932
+ <strong style="font-size: 16px;">ایمیل</strong><br/>
933
+ <span style="opacity: 0.9; font-size: 14px;">info@RealRobot.ir</span>
934
+ </div>
935
+
936
+ </td>
937
+ <td align="center">
938
+
939
+ <div style="background: rgba(255,255,255,0.1); padding: 25px; border-radius: 25px; width: 150px;">
940
+ <div style="font-size: 32px; margin-bottom: 10px;">📷</div>
941
+ <strong style="font-size: 16px;">اینستاگرام</strong><br/>
942
+ <span style="opacity: 0.9; font-size: 14px;">@Fibonacci.ai</span>
943
+ </div>
944
+
945
+ </td>
946
+ <td align="center">
947
+
948
+ <div style="background: rgba(255,255,255,0.1); padding: 25px; border-radius: 25px; width: 150px;">
949
+ <div style="font-size: 32px; margin-bottom: 10px;">💬</div>
950
+ <strong style="font-size: 16px;">تلگرام</strong><br/>
951
+ <span style="opacity: 0.9; font-size: 14px;">T.ME/FibonacciAi</span>
952
+ </div>
953
+
954
+ </td>
955
+ <td align="center">
956
+
957
+ <div style="background: rgba(255,255,255,0.1); padding: 25px; border-radius: 25px; width: 150px;">
958
+ <div style="font-size: 32px; margin-bottom: 10px;">🤗</div>
959
+ <strong style="font-size: 16px;">Hugging Face</strong><br/>
960
+ <span style="opacity: 0.9; font-size: 14px;">/fibonacciai/Iran-v1</span>
961
+ </div>
962
+
963
+ </td>
964
+ </tr>
965
+ </table>
966
+
967
+ <div style="background: linear-gradient(145deg, #1a1e2c, #2d3748); padding: 30px; border-radius: 28px; border-bottom: 6px solid #8B5CF6; margin-top: 20px;">
968
+
969
+ <h3 style="color: white; font-size: 24px; margin-top: 0;">☕ از هوش مصنوعی ایران حمایت کن</h3>
970
+
971
+ <p style="color: #e2e8f0; font-size: 16px; margin-bottom: 25px;">
972
+ با یک فنجان قهوه، به توسعه مدل زبانی فارسی ایران کمک کن!
973
+ </p>
974
+
975
+ <a href="https://coffeebede.com/realrobot" target="_blank" rel="noopener noreferrer" style="display: inline-block; background: linear-gradient(90deg, #8B5CF6, #7C3AED); color: white; padding: 16px 40px; border-radius: 50px; font-size: 20px; font-weight: bold; text-decoration: none; box-shadow: 0 8px 20px rgba(139,92,246,0.3);">
976
+ ☕ قهوه بده ☕
977
+ </a>
978
+
979
+ <p style="color: #94a3b8; font-size: 14px; margin-top: 20px;">
980
+ لینک مستقیم: coffeebede.com/realrobot
981
+ </p>
982
+
983
+ </div>
984
+
985
+ <hr style="border: 1px solid rgba(255,255,255,0.2); margin: 40px 0;">
986
+
987
+ <p style="font-size: 22px; font-weight: bold; margin: 20px 0;">⭐ از حمایت شما سپاسگزاریم ⭐</p>
988
+
989
+ <p style="font-size: 18px; margin: 20px 0;">
990
+ توسط تیم جوان ساخته شده با عشق ❤️ برای زبان فارسی 🇮🇷
991
+ </p>
992
+
993
+ <p style="font-size: 14px; opacity: 0.8; margin-top: 30px;">
994
+ © 2018-2026 هوش مصنوعی فیبوناچی. تمامی حقوق برای شرکت رئال ربات محفوظ است.
995
+ </p>
996
+
997
+ </div>
998
+
999
+ ---
1000
+
1001
+ <div align="center">
1002
+
1003
+ **[⬆️ بازگشت به بالا](#-مدل-زبانی-ایران-نسخه-۱-با-معماری-بومی-یاسین-)**
1004
+
1005
+ </div>