Update README.md
Browse files
README.md
CHANGED
@@ -42,4 +42,24 @@ base_model:
|
|
42 |
|
43 |
### Method
|
44 |
|
45 |
-
[QLoRA ORPO tune](https://mlabonne.github.io/blog/posts/2024-04-19_Fine_tune_Llama_3_with_ORPO.html) with 2x RTX 3090 for 2 epochs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
### Method
|
44 |
|
45 |
+
[QLoRA ORPO tune](https://mlabonne.github.io/blog/posts/2024-04-19_Fine_tune_Llama_3_with_ORPO.html) with 2x RTX 3090 for 2 epochs.
|
46 |
+
|
47 |
+
```
|
48 |
+
# QLoRA config
|
49 |
+
bnb_config = BitsAndBytesConfig(
|
50 |
+
load_in_4bit=True,
|
51 |
+
bnb_4bit_quant_type="nf4",
|
52 |
+
bnb_4bit_compute_dtype=torch_dtype,
|
53 |
+
bnb_4bit_use_double_quant=True,
|
54 |
+
)
|
55 |
+
|
56 |
+
# LoRA config
|
57 |
+
peft_config = LoraConfig(
|
58 |
+
r=16,
|
59 |
+
lora_alpha=32,
|
60 |
+
lora_dropout=0.05,
|
61 |
+
bias="none",
|
62 |
+
task_type="CAUSAL_LM",
|
63 |
+
target_modules=['up_proj', 'down_proj', 'gate_proj', 'k_proj', 'q_proj', 'v_proj', 'o_proj']
|
64 |
+
)
|
65 |
+
```
|