You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: labml_nn/lora/experiment.py
+53-13Lines changed: 53 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,16 @@
1
+
"""
2
+
---
3
+
title: Finetune GPT-2 with LoRA
4
+
summary: This is training code with notes for fine-tuning pre-trained GPT-2 model with LoRA.
5
+
---
6
+
7
+
# Finetune GPT-2 with [LoRA](index.html)
8
+
9
+
Here's a Colab notebook for training a feedback transformer on Tiny Shakespeare dataset.
10
+
11
+
[](https://colab.research.google.com/github/labmlai/annotated_deep_learning_paper_implementations/blob/master/labml_nn/lora/experiment.ipynb)
12
+
"""
13
+
1
14
importtorch
2
15
fromlabmlimportlab, monit, tracker
3
16
fromlabml.configsimportBaseConfigs, option
@@ -9,19 +22,31 @@
9
22
fromlabml_nn.lora.gpt2importGPTModel
10
23
11
24
12
-
classConfigs(BaseConfigs):
25
+
classTrainer(BaseConfigs):
26
+
"""
27
+
## Trainer configurations and the training loop
28
+
29
+
The default configs can and will be over-ridden when we start the experiment
0 commit comments