پیشآموزش، فاینتیونینگ و بازخورد
هوش مصنوعی برای همه: هوش مصنوعی چطور باهوش شد؟
- Self-supervised learning: deriving training targets from the data itself.
- Pretraining a language model on next-token prediction across large text collections.
- Why pretraining is different from installing a searchable copy of every source document.
- Supervised fine-tuning on examples of instructions and desired responses.
- Preference-based training, including methods that use reinforcement learning and methods that do not.
- Adaptation with a smaller specialized dataset and the possibility of losing other capabilities.
- The difference between parameter changes during training and instructions supplied only at inference time.
از متن تا تنظیم پارامترها
```svg
<svg viewBox="0 0 800 450" xmlns="http://www.w3.org/2000/svg"><defs><marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto"><path d="M0,0 L0,6 L9,3 z" class="tm-arrow"/></marker></defs><rect x="70" y="90" width="180" height="70" rx="12" class="tm-surface"/><text x="160" y="132" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">این گیاه به</text><rect x="320" y="90" width="130" height="70" rx="12" class="tm-accent tm-pulse"/><text x="385" y="132" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">نور</text><line x1="250" y1="125" x2="315" y2="125" class="tm-line-accent" marker-end="url(#arrow)"/><text x="520" y="132" font-size="18" class="tm-muted" direction="rtl">هدف بعدی</text><rect x="70" y="230" width="310" height="70" rx="12" class="tm-soft"/><text x="225" y="272" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">این گیاه به نور</text><rect x="440" y="230" width="130" height="70" rx="12" class="tm-gold tm-pulse"/><text x="505" y="272" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">نیاز</text><line x1="380" y1="265" x2="435" y2="265" class="tm-line" marker-end="url(#arrow)"/><text x="610" y="272" font-size="18" class="tm-muted" direction="rtl">هدف بعدی</text><rect x="250" y="350" width="300" height="62" rx="12" class="tm-green tm-enter"/><text x="400" y="388" text-anchor="middle" font-size="19" class="tm-text" direction="rtl">خطا ↓ پارامترها تغییر میکنند</text></svg>
```
الگو یا آرشیو؟
```svg
<svg viewBox="0 0 800 450" xmlns="http://www.w3.org/2000/svg"><defs><marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto"><path class="tm-arrow" d="M0,0 L0,6 L9,3 z"/></marker></defs><text class="tm-text" font-size="20" x="200" y="45" text-anchor="middle" direction="rtl">آرشیو</text><text class="tm-text" font-size="20" x="600" y="45" text-anchor="middle">pretraining</text><rect class="tm-surface" rx="12" x="55" y="85" width="290" height="90"/><text class="tm-text" font-size="17" x="200" y="120" text-anchor="middle" direction="rtl">راهنمای نگهداری گیاه</text><text class="tm-text2" font-size="15" x="200" y="150" text-anchor="middle" direction="rtl">فایلِ قابل بازگشت</text><rect class="tm-surface" rx="12" x="455" y="85" width="290" height="90"/><text class="tm-text" font-size="17" x="600" y="120" text-anchor="middle" direction="rtl">تکههای متن</text><text class="tm-text2" font-size="15" x="600" y="150" text-anchor="middle" direction="rtl">تمرین پیشبینی</text><path class="tm-line" marker-end="url(#arrow)" d="M200 180 L200 225"/><path class="tm-line" marker-end="url(#arrow)" d="M600 180 L600 225"/><rect class="tm-accent" rx="12" x="90" y="235" width="220" height="70"/><text class="tm-text" font-size="16" x="200" y="278" text-anchor="middle" direction="rtl">جستوجو: «نور غیرمستقیم»</text><rect class="tm-accent" rx="12" x="490" y="235" width="220" height="70"/><text class="tm-text" font-size="16" x="600" y="270" text-anchor="middle" direction="rtl">پارامترها</text><text class="tm-text2" font-size="14" x="600" y="292" text-anchor="middle" direction="rtl">عددهای تنظیمشده</text><text class="tm-text-accent" font-size="16" x="400" y="365" text-anchor="middle" direction="rtl">پاسخ روان ≠ مدرک قابل بررسی</text></svg>
```
آموزش با نمونههای مطلوب
```svg
<svg viewBox="0 0 800 450" xmlns="http://www.w3.org/2000/svg"><defs><marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto"><path d="M0,0 L0,6 L9,3 z" class="tm-arrow"/></marker></defs><rect x="40" y="85" width="190" height="90" rx="12" class="tm-soft"/><text x="135" y="120" text-anchor="middle" class="tm-text" font-size="18" direction="rtl">دستور</text><text x="135" y="150" text-anchor="middle" class="tm-text2" font-size="15" direction="rtl">دربارهی گیاه بپرس</text><rect x="305" y="85" width="190" height="90" rx="12" class="tm-accent"/><text x="400" y="120" text-anchor="middle" class="tm-text" font-size="18" direction="rtl">پاسخ مطلوب</text><text x="400" y="150" text-anchor="middle" class="tm-text2" font-size="15" direction="rtl">نوع گیاه چیه؟</text><path d="M230 130 H300" class="tm-line-accent" marker-end="url(#arrow)"/><rect x="570" y="85" width="190" height="90" rx="12" class="tm-accent"/><text x="665" y="120" text-anchor="middle" class="tm-text" font-size="18" direction="rtl">پیشبینی</text><text x="665" y="150" text-anchor="middle" class="tm-text2" font-size="15" direction="rtl">tokenهای پاسخ</text><path d="M495 130 H565" class="tm-line-accent" marker-end="url(#arrow)"/><text x="400" y="235" text-anchor="middle" class="tm-muted" font-size="16" direction="rtl">نمونههای متنوع؛ پاسخگویی بهتر، نه تضمین</text><rect x="305" y="275" width="190" height="75" rx="12" class="tm-accent"/><text x="400" y="320" text-anchor="middle" class="tm-text" font-size="18" direction="rtl">خطای پیشبینی</text><path d="M665 175 C665 245 550 300 500 310" class="tm-line-accent" marker-end="url(#arrow)"/><rect x="570" y="275" width="190" height="75" rx="12" class="tm-accent"/><text x="665" y="310" text-anchor="middle" class="tm-text" font-size="18" direction="rtl">پارامترها</text><text x="665" y="335" text-anchor="middle" class="tm-text2" font-size="14" direction="rtl">تغییر</text><path d="M495 312 H565" class="tm-line-accent" marker-end="url(#arrow)"/><rect x="40" y="375" width="345" height="45" rx="10" class="tm-green"/><text x="212" y="404" text-anchor="middle" class="tm-text" font-size="15" direction="rtl">توانایی تخصصی: بررسی</text><rect x="415" y="375" width="345" height="45" rx="10" class="tm-gold"/><text x="587" y="404" text-anchor="middle" class="tm-text" font-size="15" direction="rtl">تواناییهای قبلی: بررسی</text></svg>
```
ترجیح، آموزش و محدودیت
```svg
<svg viewBox="0 0 800 450" xmlns="http://www.w3.org/2000/svg"><rect class="tm-soft" x="35" y="40" width="730" height="365" rx="18"/><text class="tm-text" x="400" y="75" text-anchor="middle" font-size="19" direction="rtl">دو مسیر برای preference training</text><rect class="tm-surface" x="65" y="105" width="310" height="115" rx="12"/><text class="tm-text" x="220" y="137" text-anchor="middle" font-size="16" direction="rtl">مقایسهها</text><text class="tm-text2" x="220" y="166" text-anchor="middle" font-size="15" direction="rtl">مدل پاداش ← امتیاز پاسخ</text><text class="tm-muted" x="220" y="195" text-anchor="middle" font-size="14" direction="rtl">مدل پاسخگو تنظیم میشود</text><rect class="tm-surface" x="425" y="105" width="310" height="115" rx="12"/><text class="tm-text" x="580" y="137" text-anchor="middle" font-size="16">DPO</text><text class="tm-text2" x="580" y="166" text-anchor="middle" font-size="15" direction="rtl">جفت ترجیحی ← تنظیم مدل</text><text class="tm-muted" x="580" y="195" text-anchor="middle" font-size="14" direction="rtl">بدون مدل پاداش جداگانه</text><rect class="tm-green" x="185" y="260" width="430" height="55" rx="12"/><text class="tm-text-green" x="400" y="294" text-anchor="middle" font-size="17" direction="rtl">هر دو مسیر: تغییر پارامترها</text><rect class="tm-gold" x="185" y="335" width="430" height="48" rx="12"/><text class="tm-text-gold" x="400" y="365" text-anchor="middle" font-size="16" direction="rtl">ترجیح ≠ تضمین درستی</text></svg>
```
مسیر آموزش تا inference
```svg
<svg viewBox="0 0 800 450" xmlns="http://www.w3.org/2000/svg"><defs><marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="5" orient="auto"><path d="M0,0 L10,5 L0,10 z" class="tm-arrow"/></marker></defs><rect x="30" y="145" width="165" height="90" rx="12" class="tm-surface"/><text x="112" y="182" class="tm-text" font-size="17" text-anchor="middle">pretraining</text><text x="112" y="208" class="tm-text2" font-size="14" text-anchor="middle" direction="rtl">تغییر پارامترها</text><rect x="240" y="145" width="165" height="90" rx="12" class="tm-surface"/><text x="322" y="182" class="tm-text" font-size="16" text-anchor="middle">instruction</text><text x="322" y="205" class="tm-text" font-size="16" text-anchor="middle">fine-tuning</text><rect x="450" y="145" width="150" height="90" rx="12" class="tm-surface"/><text x="525" y="182" class="tm-text" font-size="16" text-anchor="middle">preference</text><text x="525" y="205" class="tm-text" font-size="16" text-anchor="middle">training</text><rect x="645" y="145" width="125" height="90" rx="12" class="tm-accent tm-pulse"/><text x="707" y="190" class="tm-text" font-size="17" text-anchor="middle">inference</text><path d="M195 190 H232" class="tm-line" marker-end="url(#arrow)"/><path d="M405 190 H442" class="tm-line" marker-end="url(#arrow)"/><path d="M600 190 H637" class="tm-line" marker-end="url(#arrow)"/><text x="112" y="278" class="tm-muted" font-size="14" text-anchor="middle" direction="rtl">پیشبینی متن</text><text x="322" y="278" class="tm-muted" font-size="14" text-anchor="middle" direction="rtl">دستور و پاسخ مطلوب</text><text x="525" y="278" class="tm-muted" font-size="14" text-anchor="middle" direction="rtl">ترجیح پاسخها</text><text x="707" y="278" class="tm-muted" font-size="14" text-anchor="middle" direction="rtl">پاسخدادن</text><text x="400" y="355" class="tm-text2" font-size="16" text-anchor="middle" direction="rtl">آموزش: بهروزرسانی پارامترها</text><rect x="630" y="320" width="155" height="54" rx="10" class="tm-soft"/><text x="707" y="353" class="tm-text2" font-size="14" text-anchor="middle" direction="rtl">پارامترها ثابتاند</text></svg>
```
بازگشت به دوره