Log inStart free
LESSON 12.C1 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Parameter-efficient fine-tuning compared

Watch six fine-tuning methods train one toy model side by side.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 12.C1 · PEFT BAY175 NUMBERS · BASE LOSS 6.67
01
Stage 1 of 6 · Shared model
One row per method. All start from one 175-number model; QLoRA from a 4-bit copy.
Explain it simply

Every row starts from the same small language model. It already knows that the sky is blue, but it does not follow the chat format. Ask it the chat question at the top, and it writes more question words. Each method teaches it the format in its own way.

Six rows, one per method. Each row shows the same four weight grids in grey: E, W1, W2 and U. At the top, the chat pair and the base model's answer.

prompt wordstrained numbersfrozen numbersresponse lossanswers
chat pairuserwhatcoloristhesky?botblue<end>base modelwhatcoloristheFull fine-tuningall 175 numbersLoRArank 2 on W1, W2, UQLoRALoRA on a 4-bit baseAdapter tuningbottleneck 2, end tokenPrefix tuning2 vectors a layer, lr 0.3Prompt tuning2 virtual words, lr 0.3one shared base modelEW1, b1W2, b2U, cchat pairuserwhatcoloristhesky?botblue<end>base modelwhatcoloristheFull fine-tuningall 175 numbersLoRArank 2 on W1, W2, UQLoRALoRA on a 4-bit baseAdapter tuningbottleneck 2, end tokenPrefix tuning2 vectors a layer, lr 0.3Prompt tuning2 virtual words, lr 0.3one shared base modelEW1, b1W2, b2U, c
Toy: the 2-layer model of 12.01 (175 numbers), 3 chat pairs, 100 AdamW steps
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
hl=hl−1+tanh⁡(Wl m+bl),p=softmax(U h2+c)h_l = h_{l-1} + \tanh(\sy{w}{param}{W_l}\, m + \sy{w}{param}{b_l}),\quad p = \mathrm{softmax}(\sy{w}{param}{U}\, h_2 + \sy{w}{param}{c})
N=60+20+20+75=175N = 60 + 20 + 20 + 75 = 175

Each layer adds a tanh of the mixed words; the head picks the next word.

Common mix-ups

MYTHAny method learns the answer if it trains long enough.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01After 10 steps, which has the lower response loss: full fine-tuning or LoRA?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.