Skip to content

Commit b062597

Browse files
authored
Merge pull request #128 from ricj/master
typos
2 parents 35057da + 56ed911 commit b062597

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

_pages/dat450/assignment4.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,14 +539,17 @@ You can use <code>nn.init.normal_</code> and <code>nn.init.zeros_</code> here.
539539

540540
### Fine-tuning with LoRA
541541

542-
Set up a model where you replace the query and value linear layers with LoRA layers. Use the following steps:
542+
Set up a model where you replace the four linear layers in attention blocks (query, key, value, and output) with LoRA layers. Use the following steps:
543543
- First use `extract_lora_targets` to get the relevant linear layers.
544544
- Each of the linear layers in the returned dictionary should be wrapped inside a LoRA layer.
545545
- Then use `replace_layers` to put them back into the model.
546546

547-
**Sanity check**: Use your function `num_trainable_parameters`. The number of trainable parameters should be less than in Step 1 but more than in Step 2. The exact number will depend on the rank.
547+
**Sanity check**: Use your function `num_trainable_parameters`. The number of trainable parameters should be less than in Step 3. The exact number will depend on the rank.
548+
549+
Train this model and compare the training speed, metrics, and outputs to the results from Step 3.
550+
551+
<span style="color: red;">**Correction (Nov. 28)**</span>: We fixed a couple of typos here, in particular a mistake in the instructions about which layers you should apply LoRA to.
548552

549-
Train this model and compare the training speed, metrics, and outputs to the results from Steps 1 and 2.
550553

551554
**Side notes:**
552555
-----

0 commit comments

Comments
 (0)