Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,88 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- m-a-p/CodeFeedback-Filtered-Instruction
|
5 |
+
- m-a-p/Code-Feedback
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
library_name: transformers
|
9 |
+
tags:
|
10 |
+
- llama-factory
|
11 |
+
- unsloth
|
12 |
+
---
|
13 |
+
# h2o-danube2 with ChatML template
|
14 |
+
|
15 |
+
This model was first fine-tuned with [BAdam](https://arxiv.org/abs/2404.02827 "BAdam: A Memory Efficient Full Parameter Optimization Method for Large Language Models") on [m-a-p/CodeFeedback-Filtered-Instruction](https://huggingface.co/datasets/m-a-p/CodeFeedback-Filtered-Instruction) and [m-a-p/Code-Feedback](https://huggingface.co/datasets/m-a-p/Code-Feedback), unfiltered from the latest [dolphin dataset](https://huggingface.co/datasets/cognitivecomputations/dolphin-2.9.3), using LLama-Factory.
|
16 |
+
|
17 |
+
## Template
|
18 |
+
|
19 |
+
```jinja
|
20 |
+
<|im_start|>system
|
21 |
+
{{system}}<|im_end|>
|
22 |
+
<|im_start|>user
|
23 |
+
{{instruction}}<|im_end|>
|
24 |
+
<|im_start|>assistant
|
25 |
+
{{response}}<|im_end|>
|
26 |
+
```
|
27 |
+
|
28 |
+
## BAdam config
|
29 |
+
|
30 |
+
**System:** You are a helpful coding assistant.
|
31 |
+
|
32 |
+
```yaml
|
33 |
+
### model
|
34 |
+
model_name_or_path: danube2-base-chatml
|
35 |
+
|
36 |
+
### method
|
37 |
+
stage: sft
|
38 |
+
do_train: true
|
39 |
+
finetuning_type: full
|
40 |
+
use_badam: true
|
41 |
+
badam_switch_mode: ascending
|
42 |
+
badam_switch_interval: 50
|
43 |
+
badam_verbose: 1
|
44 |
+
badam_start_block: 10
|
45 |
+
seed: 720
|
46 |
+
|
47 |
+
### dataset
|
48 |
+
dataset: codefeedback_instruct_unfiltered,codefeedback_unfiltered
|
49 |
+
template: hermes_chatml
|
50 |
+
cutoff_len: 8192
|
51 |
+
overwrite_cache: false
|
52 |
+
preprocessing_num_workers: 12
|
53 |
+
|
54 |
+
### output
|
55 |
+
output_dir: code-feedback-chatml-badam
|
56 |
+
logging_steps: 5
|
57 |
+
save_steps: 1
|
58 |
+
save_strategy: epoch
|
59 |
+
plot_loss: true
|
60 |
+
overwrite_output_dir: false
|
61 |
+
|
62 |
+
### train
|
63 |
+
per_device_train_batch_size: 2
|
64 |
+
gradient_accumulation_steps: 8
|
65 |
+
learning_rate: 0.00001
|
66 |
+
num_train_epochs: 1
|
67 |
+
lr_scheduler_type: cosine
|
68 |
+
warmup_ratio: 0.01
|
69 |
+
bf16: true
|
70 |
+
flash_attn: fa2
|
71 |
+
|
72 |
+
### eval
|
73 |
+
val_size: 0.01
|
74 |
+
per_device_eval_batch_size: 1
|
75 |
+
eval_strategy: steps
|
76 |
+
eval_steps: 2000
|
77 |
+
```
|
78 |
+
|
79 |
+
### BAdam training results
|
80 |
+
|
81 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
82 |
+
|:-------------:|:------:|:-----:|:---------------:|
|
83 |
+
| 0.6181 | 0.1789 | 2000 | 0.6044 |
|
84 |
+
| 0.6835 | 0.3578 | 4000 | 0.5949 |
|
85 |
+
| 0.5649 | 0.5367 | 6000 | 0.5893 |
|
86 |
+
| 0.6559 | 0.7155 | 8000 | 0.5850 |
|
87 |
+
| 0.6591 | 0.8944 | 10000 | 0.5839 |
|
88 |
+
|