adamo1139 commited on
Commit
85cab3d
1 Parent(s): bc667ad

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -1
README.md CHANGED
@@ -2,5 +2,86 @@
2
  license: other
3
  license_name: yi-license
4
  license_link: LICENSE
 
 
 
5
  ---
6
- This time I finetuned via SFT for 2 epochs as opposed to 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: other
3
  license_name: yi-license
4
  license_link: LICENSE
5
+ datasets:
6
+ - adamo1139/AEZAKMI_v2
7
+ - adamo1139/rawrr_v1
8
  ---
9
+ ## Model Description
10
+
11
+ EXPERIMENTAL MODEL, NOT FINAL, IT HAS SOME ISSUES, I DIDN'T TEST IT TOO MUCH YET
12
+
13
+
14
+ Yi-34B 200K base model fine-tuned on RAWrr v1 dataset via DPO and then fine-tuned on AEZAKMI v2 dataset via SFT. DPO training took around 6 hours, SFT took around 25 hours.
15
+ I used `unsloth` for both stages.
16
+ It's like airoboros but with less gptslop, no refusals and less typical language used by RLHFed OpenAI models.
17
+ Say goodbye to "It's important to remember"! \
18
+ Prompt format is standard chatml. Don't expect it to be good at math, riddles or be crazy smart. My end goal with AEZAKMI is to create a cozy free chatbot.
19
+ Base model used for fine-tuning was 200k context Yi-34B-Llama model shared by larryvrh.
20
+
21
+ Training was done with max_position_embeddings set at 4096. Then it was reverted back to 200K after applying LoRA.
22
+
23
+ ## Prompt Format
24
+
25
+ I recommend using ChatML format, as this was used during fine-tune. \
26
+ Here's a prompt format you should use, you can set a different system message, model seems to respect that fine, so it wasn't overfitted.
27
+ Both `A chat.` and `A chat with uncensored assistant.` system prompt work fine and are pretty refusal-free.
28
+
29
+ ```
30
+ <|im_start|>system
31
+ A chat with uncensored assistant.<|im_end|>
32
+ <|im_start|>user
33
+ {prompt}<|im_end|>
34
+ <|im_start|>assistant
35
+ ```
36
+
37
+ ## Intended uses & limitations
38
+
39
+ It's a chat model, not a base completion-only one.
40
+ Use is limited by Yi license. Since no-robots dataset was used for making rawrr_v1, I guess you maybe shouldn't use it for commercial activities.
41
+
42
+ ## Known Issues
43
+
44
+ I recommend to set repetition penalty to something around 1.05 to avoid repetition. So far I had somewhat good experience running this model with temperature 1.0-1.2.
45
+
46
+ It seems like the strongest anti-refusal bias is at 0 ctx - the first prompt. But it's also present, albeit a little bit less, further down. I plan to expand rawrr dataset and include more samples without system prompt, this should help here.
47
+
48
+ [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" alt="made with Unsloth" width="400" height="64"/>](https://github.com/unslothai/unsloth)
49
+
50
+
51
+ ## Unsloth training parameters DPO Stage
52
+
53
+ - lora_r: 16
54
+ - lora_alpha: 32
55
+ - max_length: 500
56
+ - learning_rate: 0.00005
57
+ - lr_scheduler_type: "linear"
58
+ - target_modules: ["q_proj", "k_proj", "v_proj", "o_proj",
59
+ "gate_proj", "up_proj", "down_proj",]
60
+ - gradient_accumulation_steps: 16
61
+ - per_device_batch_size: 1
62
+ - num_train_epochs: 1
63
+
64
+ Script used for DPO training can be found here:
65
+ https://huggingface.co/adamo1139/Yi-34B-200K-rawrr1-LORA-DPO-experimental-r3/blob/main/yi-34b-dpo-unsloth-1.py
66
+
67
+ ## Unsloth training parameters SFT Stage
68
+
69
+ - lora_r: 16
70
+ - lora_alpha: 32
71
+ - max_length: 2400
72
+ - learning_rate: 0.000095
73
+ - lr_scheduler_type: "cosine"
74
+ - lr_scheduler_kwargs: {
75
+ "num_cycles" : 0.25,
76
+ }
77
+ - target_modules: ["q_proj", "k_proj", "v_proj", "o_proj",
78
+ "gate_proj", "up_proj", "down_proj",]
79
+ - gradient_accumulation_steps: 1
80
+ - per_device_batch_size: 1
81
+ - num_train_epochs: 2
82
+
83
+ Script used for SFT training can be found here (older run, different hyperparameters):
84
+ https://huggingface.co/adamo1139/Yi-34B-200K-AEZAKMI-RAW-2301-LoRA/blob/main/yi-34b-aezakmi-sft-1-hf.py
85
+
86
+ ### Credits
87
+ Thanks to mlabonne, Daniel Han and Michael Han for providing open source code that was used for fine-tuning.