Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Llama-2-7b-chat-Calgary-Cambridge
|
2 |
+
[NousResearch/Llama-2-7b-chat-hf](https://huggingface.co/NousResearch/Llama-2-7b-chat-hf) fine-tuned on [kazcfz/Calgary-Cambridge-llama2-37](https://huggingface.co/datasets/kazcfz/Calgary-Cambridge-llama2-37)
|
3 |
+
|
4 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
5 |
+
|
6 |
+
**QLoRA parameters**
|
7 |
+
Parameter | Value
|
8 |
+
--- | ---
|
9 |
+
lora_r | 64
|
10 |
+
lora_alpha | 16
|
11 |
+
lora_dropout | 0.1
|
12 |
+
|
13 |
+
**bitsandbytes parameters**
|
14 |
+
Parameter | Value
|
15 |
+
--- | ---
|
16 |
+
use_4bit | True
|
17 |
+
bnb_4bit_compute_dtype | "float16"
|
18 |
+
bnb_4bit_quant_type | "nf4"
|
19 |
+
use_nested_quant | False
|
20 |
+
|
21 |
+
**TrainingArguments parameters**
|
22 |
+
Parameter | Value
|
23 |
+
--- | ---
|
24 |
+
num_train_epochs | 10
|
25 |
+
fp16 | False
|
26 |
+
bf16 | False
|
27 |
+
per_device_train_batch_size | 4
|
28 |
+
gradient_accumulation_steps | 1
|
29 |
+
gradient_checkpointing | True
|
30 |
+
max_grad_norm | 0.3
|
31 |
+
learning_rate | 2e-4
|
32 |
+
weight_decay | 0.001
|
33 |
+
optim | "paged_adamw_32bit"
|
34 |
+
lr_scheduler_type | "cosine"
|
35 |
+
max_steps | -1
|
36 |
+
warmup_ratio | 0.03
|
37 |
+
group_by_length | True
|
38 |
+
save_steps | 0
|
39 |
+
logging_steps | 25
|
40 |
+
|
41 |
+
**SFT parameters**
|
42 |
+
Parameter | Value
|
43 |
+
--- | ---
|
44 |
+
max_seq_length | None
|
45 |
+
packing | False
|
46 |
+
|
47 |
+
<br>
|
48 |
+
|
49 |
+
## Prompt template: Llama-2-Chat
|
50 |
+
```
|
51 |
+
<s>[INST] {prompt} [/INST]
|
52 |
+
```
|
53 |
+
|
54 |
+
<br>
|
55 |
+
|
56 |
+
## Sample (actual) output (Max length: 200)
|
57 |
+
**Base Model**
|
58 |
+
```
|
59 |
+
Query: <s>[INST] What? [/INST]
|
60 |
+
Response:
|
61 |
+
```
|
62 |
+
```
|
63 |
+
Query: <s>[INST] What? [/INST]
|
64 |
+
Response:
|
65 |
+
```
|
66 |
+
```
|
67 |
+
Query: <s>[INST] What? [/INST]
|
68 |
+
Response:
|
69 |
+
```
|
70 |
+
**Fine-tuned**
|
71 |
+
```
|
72 |
+
Query: <s>[INST] What? [/INST]
|
73 |
+
Response:
|
74 |
+
```
|
75 |
+
```
|
76 |
+
Query: <s>[INST] What? [/INST]
|
77 |
+
Response:
|
78 |
+
```
|
79 |
+
```
|
80 |
+
Query: <s>[INST] What? [/INST]
|
81 |
+
Response:
|
82 |
+
```
|
83 |
+
**Reload model + Merge LoRA weights?**
|
84 |
+
```
|
85 |
+
Query: <s>[INST] What? [/INST]
|
86 |
+
Response:
|
87 |
+
```
|
88 |
+
```
|
89 |
+
Query: <s>[INST] What? [/INST]
|
90 |
+
Response:
|
91 |
+
```
|
92 |
+
```
|
93 |
+
Query: <s>[INST] What? [/INST]
|
94 |
+
Response:
|
95 |
+
```
|
96 |
+
|
97 |
+
## Findings:
|
98 |
+
[Current]
|
99 |
+
- Increasing epochs from 5 (previous) to 20 (current) sure made the fine-tuned appear to respond a lot better on Golaif Virus and Dr. Golaif Pootis.
|
100 |
+
- However, this looks like a solid example of overfitting. 2 of 3 responses (under 2nd query) are 100% identical to the dataset trained on, excluding the hallucinations from [/INST] onwards that somehow still exists.
|