File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ The args used in the command above are:
34
34
35
35
* ` --use_peft ` boolean flag to enable PEFT methods in the script
36
36
37
- * ` --peft_method ` to specify the PEFT method, here we use ` lora ` other options are ` llama_adapter ` , ` prefix ` .
37
+ * ` --peft_method ` to specify the PEFT method, here we use ` lora ` other options are ` llama_adapter ` .
38
38
39
39
We use ` torchrun ` here to spawn multiple processes for FSDP.
40
40
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ The args used in the command above are:
27
27
28
28
* ` --use_peft ` boolean flag to enable PEFT methods in the script
29
29
30
- * ` --peft_method ` to specify the PEFT method, here we use ` lora ` other options are ` llama_adapter ` , ` prefix ` .
30
+ * ` --peft_method ` to specify the PEFT method, here we use ` lora ` other options are ` llama_adapter ` .
31
31
32
32
* ` --quantization ` boolean flag to enable int8 quantization
33
33
Original file line number Diff line number Diff line change @@ -154,12 +154,13 @@ def main(**kwargs):
154
154
# Load the pre-trained peft model checkpoint and setup its configuration
155
155
if train_config .from_peft_checkpoint :
156
156
model = PeftModel .from_pretrained (model , train_config .from_peft_checkpoint , is_trainable = True )
157
+ peft_config = model .peft_config ()
157
158
# Generate the peft config and start fine-tuning from original model
158
159
else :
159
160
peft_config = generate_peft_config (train_config , kwargs )
160
161
model = get_peft_model (model , peft_config )
161
- if wandb_run :
162
- wandb_run .config .update (peft_config )
162
+ if wandb_run :
163
+ wandb_run .config .update (peft_config )
163
164
model .print_trainable_parameters ()
164
165
165
166
You can’t perform that action at this time.
0 commit comments