Commit
·
0ff8eb6
1
Parent(s):
5f7c500
Update README.md
Browse files
README.md
CHANGED
@@ -1,6 +1,33 @@
|
|
1 |
---
|
2 |
library_name: peft
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
## Training procedure
|
5 |
|
6 |
|
|
|
1 |
---
|
2 |
library_name: peft
|
3 |
---
|
4 |
+
## LoraConfig arguments
|
5 |
+
config = LoraConfig(r=32,
|
6 |
+
lora_alpha=64,
|
7 |
+
#target_modules=".*decoder.*(self_attn|encoder_attn).*(q_proj|v_proj)$",#["q_proj", "v_proj"],
|
8 |
+
target_modules=["q_proj", "v_proj"],
|
9 |
+
lora_dropout=0.05,
|
10 |
+
bias="none")
|
11 |
+
|
12 |
+
|
13 |
+
## Training arguments
|
14 |
+
training_args = TrainingArguments(
|
15 |
+
output_dir="temp", # change to a repo name of your choice
|
16 |
+
per_device_train_batch_size=8,
|
17 |
+
gradient_accumulation_steps=2, # increase by 2x for every 2x decrease in batch size
|
18 |
+
learning_rate=1e-3,
|
19 |
+
warmup_steps=10,
|
20 |
+
max_steps=400, #1500
|
21 |
+
#evaluation_strategy="steps",
|
22 |
+
fp16=True,
|
23 |
+
per_device_eval_batch_size=8,
|
24 |
+
#generation_max_length=128,
|
25 |
+
eval_steps=100,
|
26 |
+
logging_steps=25,
|
27 |
+
remove_unused_columns=False, # required as the PeftModel forward doesn't have the signature of the wrapped model's forward
|
28 |
+
label_names=["label"], # same reason as above
|
29 |
+
)
|
30 |
+
|
31 |
## Training procedure
|
32 |
|
33 |
|