LoRA: Count Trainable Parameters

easy
Unit 4 · Fine-Tuning & Evaluation0/2 to milestone

LoRA fine-tunes a frozen weight matrix W∈Rdout×dinW \in \mathbb{R}^{d_{out} \times d_{in}} by learning a low-rank update ΔW=BA\Delta W = BA where B∈Rdout×rB \in \mathbb{R}^{d_{out} \times r} and A∈Rr×dinA \in \mathbb{R}^{r \times d_{in}}.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
LoRA: Count Trainable Parameters · TechGradify