LightMySky
به انگلیسی

Adapting a Pretrained Model: Fine-Tuning and Low-Rank Updates

Most work starts from weights someone else paid for. A full fine-tune moves every parameter and costs a whole copy to store, while a low-rank update trains a small factored correction and leaves the base weights alone.

شروع یادگیری این موضوعبه حساب کاربری نیازی نیست. پیشرفت در همین مرورگر ذخیره می‌شود.

کارهایی که یادگیرنده بعد از این درس می‌تواند انجام دهد

  • Compare parameter count and storage for a full fine-tune against a low-rank adapter
  • Say when adapting beats prompting for a task, and when it does not
  • Describe catastrophic forgetting and one measure that keeps it in check

۱ · بخوان

The scaling curve says what a fresh training run would cost, and most teams cannot pay it, so most work starts from weights someone else paid for. A full fine-tune moves every parameter and costs a whole copy to store. A low-rank update instead trains a small factored correction and leaves the base weights alone: the update is the product of two thin matrices, B times A.

Count the storage before you choose. A full n by n update stores n squared numbers, while the factored pair stores 2 times n times the rank. The adapter wins whenever the rank sits below half the size. A 4 by 4 layer with rank 2 stores 16 numbers, the same as full, while a 100 by 100 layer with rank 4 stores 800 against 10000, and rank 60 stores 12000, worse than full.

full: n times n numbersadapter: 2 times n times rcheaper when r < n/2100 by 100, r = 4: 800

Count the numbers stored before you choose: 2nr against n squared.

A rank 1 matrix is one column times one row, so each row is that row times a number, and some of those numbers can be zero: the rows [0, 0] and [1, 2] make a rank 1 matrix whose first row is zero. With rows [2, 4] and [3, x], the first row is not zero, so the second row must be a multiple of it: 3 is 1.5 times 2, so x is 1.5 times 4, which is 6. A rank r update stacks r such column-times-row products, which is why B has r columns and A has r rows.

Try it together

Pick prompting when the need is one-off or the budget is thin, since no training runs at all. Pick adapting when the task repeats often enough to repay training and prompting keeps missing. Between adapters, pick a low rank when storage and forgetting matter, and pay for fuller moves only when the task demands capacity the thin update cannot hold.

Full moves risk catastrophic forgetting: new training washes out old skills. Keep old-task checks running as you train, freeze more and train less where you can, and stop when the old scores start to slip.

Train a thin factored correction when it suffices, count 2 n r against n squared, and watch old tasks while you adapt.

۲ · ببین

به انگلیسی

دور از صفحه‌نمایش

چاپ کاربرگکاغذ A4، با یک صفحهٔ جواب‌ها برای بزرگ‌ترها. بدون صفحه‌نمایش، بدون اینترنت.

جایگاه این موضوع

سپس تمرین

۱۲ سؤال پشت این درس منتظرند، هر کدام با پاسخ توضیح‌داده‌شده. هر پاسخ آسمان را پر می‌کند: ستاره‌ها هنگام یادگیری روشن می‌شوند و وقتی زمان برگشتن است کمرنگ می‌شوند.

شروع یادگیری این موضوع