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: recipes/finetuning/quickstart_peft_finetuning.ipynb
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,11 @@
16
16
"source": [
17
17
"## PEFT Finetuning Quick Start Notebook\n",
18
18
"\n",
19
-
"This notebook shows how to train a Meta Llama 3 model on a single GPU (e.g. A10 with 24GB) using int8 quantization and LoRA."
19
+
"This notebook shows how to train a Meta Llama 3 model on a single GPU (e.g. A10 with 24GB) using int8 quantization and LoRA finetuning.\n",
20
+
"\n",
21
+
"**_Note:_** To run this notebook on a machine with less than 24GB VRAM (e.g. T4 with 15GB) the context length of the training dataset needs to be adapted.\n",
22
+
"We do this based on the available VRAM during execution.\n",
23
+
"If you run into OOM issues try to further lower the value of train_config.context_length."
20
24
]
21
25
},
22
26
{
@@ -91,7 +95,7 @@
91
95
"train_config.lr = 3e-4\n",
92
96
"train_config.use_fast_kernels = True\n",
93
97
"train_config.use_fp16 = True\n",
94
-
"train_config.context_length = 2048\n",
98
+
"train_config.context_length = 1024 if torch.cuda.get_device_properties(0).total_memory < 16e9 else 2048 # T4 15GB or A10 24GB\n",
0 commit comments