31/31
Part 6 of 6 · What interviewers ask nextCheck yourself
Check yourself
5 questions
1.You initialize
Bwithtorch.randn(out, r) * 0.01instead of zeros. What happens?2.You wrap
nn.Linear(16, 12)with r = 4 and forget to freeze the base. How many parameters reportrequires_grad=True?3.With alpha = 8 and r = 4, merge() runs
W += B @ Aand forgets the scale. What does the merged layer compute?4.After merge(), your forward still adds the LoRA branch. What do you get?
5.Your layer multiplies the update by 1 instead of alpha / r. Which check catches it?
That's the lesson.Next lesson: Debug a broken miniGPT, then add a KV cache
Now the problem this lesson builds to: 16 LoRA from scratch (PyTorch)Practice it