Answers · How models work
Does it matter which layers I attach adapters to?
In shortYes. For the same number of trainable parameters, adapters spread over more weight matrices, including the feed-forward ones, usually score higher than adapters concentrated on a few.
Yes. Two runs with the same number of trainable parameters can end at different scores if the corrections sit on different weight matrices, because a correction can only change the matrix it is attached to. The familiar default of correcting only the query and value projections is a habit from the first demonstration, not an optimum.
For a projection with input width and output width , a bottleneck of width trains numbers. Take a block where each corrected projection has . A width of 64 on two matrices costs trainable numbers. The same budget buys width 16 on eight matrices: . It also buys width 8 on sixteen: . The product is 128 in each case, so the budget is fixed and only the placement changes.
| Bottleneck width r | Weight matrices corrected | r times matrices | Trainable parameters | Score |
|---|---|---|---|---|
| 64 | 2 | 128 | 1,048,576 | 0.88 |
| 16 | 8 | 128 | 1,048,576 | 0.90 |
| 8 | 16 | 128 | 1,048,576 | 0.91 |
| 4 | 32 | 128 | 1,048,576 | 0.91 |
The natural guess fails because it treats placement as a labelling choice rather than a reachability choice. A correction is a low-rank change added to one weight matrix, so it can only move the function through that matrix. If the key projection or an output projection or a feed-forward matrix is left untouched, the adapted model has no route to whatever that matrix would have needed to do. Spending more parameters on a matrix that is already covered cannot compensate: a very wide correction on the query projection is still only a change to the query projection.
Given a fixed budget, breadth beats width. In one controlled comparison, every row spent 1,048,576 trainable numbers. Width 64 on 2 matrices scored 0.88; width 16 on 8 scored 0.90; width 8 on 16 scored 0.91; width 4 on 32 scored 0.91. The arithmetic for the budget is the same in every row: , , , , and . What changes is how many places the correction can act. The jump from 2 to 8 places is worth 0.02; from 8 to 16 is worth 0.01; from 16 to 32 is worth 0.00. That is why placement should be decided before width is tuned: widening a bottleneck that is already wide enough buys less than covering another matrix.
A detail that makes a placement mistake less catastrophic: one of the two thin matrices is initialised with small random numbers and the other with zeros, so their product is exactly zero. The adapted model therefore begins identical to the original, whether you attach to two matrices or sixteen. There is no shock at the start of training, and a run that goes badly degrades towards the pretrained model rather than away from it into something arbitrary.
The rule stops paying when breadth is already saturated. In the trace, 16 matrices at width 8 and 32 matrices at width 4 both scored 0.91, so sixteen places were already enough for that task and the extra coverage did nothing. If your budget is large enough to give every matrix a generous bottleneck, the choice between breadth and width stops being a trade. There is also a scale interaction: widening the bottleneck produces a larger correction for the same trained values, so raising the width without dividing the scale by that width quietly raises the effective training rate. A team that widens and sees a different run should check the scale before blaming the placement.
The order that follows is: cover all four attention projections at minimum, add the feed-forward matrices when the budget allows, make each bottleneck as narrow as that coverage requires, and only then tune how loudly the correction speaks. The worst case is still bounded by the pretrained model because the correction starts at zero.
Worth keeping
- At a fixed parameter budget, spreading adapters over more weight matrices usually beats making a few bottlenecks wider.
- A correction can only affect the matrix it is attached to, so untouched matrices are outside the adaptation's reach.
- Adapter corrections start at zero, so adding them does not change the pretrained model until training moves them.
Where this goes next
This question is one step of Adapting a Model You Did Not Train, a course that works through its subject from the beginning. The page that teaches this part of it is Which Weights, How Wide, How Loud, and it reads the whole way through whether or not you have an account.
What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.
Read that pageThe whole courseOther questions people ask about this
- When should I fine-tune a model instead of just prompting it better?Fine-tune only when the model has been told clearly what you want and still will not comply reliably; missing facts need retrieval, and unstated instructions need a better prompt.
- Why does the model get stuck repeating the same sentence over and over?The model is not stuck in a memory loop: once it has written a phrase, that phrase is in its context and makes writing it again more likely, so a decoder that always picks the top word cannot leave.
- Why does diffusion add Gaussian noise instead of any random corruption?Diffusion adds Gaussian noise because Gaussian errors combine exactly: each step keeps the spread fixed and gives a closed-form noisy picture at any later step, which makes the reverse step learnable.
- Why does the same request cost more tokens in some languages than in others?A token is learned from a corpus, so a language that was rare in the training text is split into many more pieces for the same meaning, and the price multiplier follows.
- How do you turn the predicted noise into the mean of the previous image?Subtract a small scheduled fraction of the predicted noise from the current image, then rescale to undo the forward step's shrinkage.
- Why does the forward noising process have to be a Markov chain?The forward process is made memoryless so that each step is a fixed random rule and any later state can be computed straight from the original picture.