brucethemoose
commited on
Commit
•
934c4f7
1
Parent(s):
a3dc777
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: yi-license
|
4 |
+
license_link: https://huggingface.co/01-ai/Yi-34B/blob/main/LICENSE
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
library_name: transformers
|
8 |
+
pipeline_tag: text-generation
|
9 |
+
tags:
|
10 |
+
- text-generation-inference
|
11 |
+
---
|
12 |
+
|
13 |
+
A merge of [**Nous-Capybara-34B**](https://huggingface.co/NousResearch/Nous-Capybara-34B/), [**Tess-M-v1.4**](https://huggingface.co/migtissera/Tess-34B-v1.4), [**Airoboros-3_1-yi-34b-200k**](https://huggingface.co/bhenrym14/airoboros-3_1-yi-34b-200k), [**PlatYi-34B-200K-Q**](https://huggingface.co/kyujinpy/PlatYi-34B-200k-Q-FastChat), [**Pallas-0.4**](https://huggingface.co/Mihaiii/Pallas-0.4), [**Yi-34B-200K-AEZAKMI-v2**](https://huggingface.co/adamo1139/Yi-34B-200K-AEZAKMI-v2), and a tiny but of [**SUS-Chat-34B**](https://huggingface.co/SUSTech/SUS-Chat-34B) merged with a new, experimental implementation of "dare ties" via mergekit. See:
|
14 |
+
|
15 |
+
> [Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch](https://github.com/yule-BUAA/MergeLM)
|
16 |
+
|
17 |
+
> https://github.com/cg123/mergekit/tree/dare
|
18 |
+
|
19 |
+
|
20 |
+
Merged with with the following config, and the tokenizer from chargoddard's Yi-Llama:
|
21 |
+
|
22 |
+
```
|
23 |
+
models:
|
24 |
+
- model: /home/alpha/Storage/Models/Raw/chargoddard_Yi-34B-200K-Llama
|
25 |
+
# No parameters necessary for base model
|
26 |
+
- model: /home/alpha/Storage/Models/Raw/migtissera_Tess-34B-v1.4
|
27 |
+
# Less weight than previous merge since Pallas is a finetune of Tess
|
28 |
+
parameters:
|
29 |
+
weight: 0.14
|
30 |
+
density: 0.62
|
31 |
+
- model: /home/alpha/FastModels/Mihaiii_Pallas-0.4
|
32 |
+
parameters:
|
33 |
+
weight: 0.14
|
34 |
+
density: 0.62
|
35 |
+
- model: /home/alpha//Storage/Models/Raw/bhenrym14_airoboros-3_1-yi-34b-200k
|
36 |
+
parameters:
|
37 |
+
weight: 0.14
|
38 |
+
density: 0.52
|
39 |
+
- model: /home/alpha/Storage/Models/Raw/Nous-Capybara-34B
|
40 |
+
parameters:
|
41 |
+
weight: 0.22
|
42 |
+
density: 0.62
|
43 |
+
- model: /home/alpha/Storage/Models/Raw/kyujinpy_PlatYi-34B-200k-Q-FastChat
|
44 |
+
parameters:
|
45 |
+
weight: 0.14
|
46 |
+
density: 0.52
|
47 |
+
#- model: /home/alpha/Storage/Models/Raw/ehartford_dolphin-2.2-yi-34b-200k
|
48 |
+
# Dolphin 200K seems to be broken according to multiple leaderboards and perplexity tests?
|
49 |
+
# parameters:
|
50 |
+
# weight: 0.15
|
51 |
+
# density: 0.6
|
52 |
+
- model: /home/alpha/Models/Raw/adamo1139_Yi-34B-200K-AEZAKMI-v2
|
53 |
+
parameters:
|
54 |
+
weight: 0.14
|
55 |
+
density: 0.52
|
56 |
+
- model: /home/alpha/Models/Raw/SUSTech_SUS-Chat-34B/
|
57 |
+
# Very low density and low weight since its a Yi 4K finetune, to try and preserve long context performance while "keeping" some of SUS
|
58 |
+
parameters:
|
59 |
+
weight: 0.08
|
60 |
+
density: 0.08
|
61 |
+
merge_method: dare_ties
|
62 |
+
base_model: /home/alpha/Storage/Models/Raw/chargoddard_Yi-34B-200K-Llama
|
63 |
+
parameters:
|
64 |
+
|
65 |
+
int8_mask: true
|
66 |
+
dtype: bfloat16
|
67 |
+
```
|
68 |
+
***
|
69 |
+
## Prompt template: Orca-Vicuna?
|
70 |
+
```
|
71 |
+
SYSTEM: {system_message}
|
72 |
+
USER: {prompt}
|
73 |
+
ASSISTANT:
|
74 |
+
```
|
75 |
+
It might recognize ChatML from Dolphin+Xaberius, and Llama-chat from Airoboros.
|
76 |
+
|
77 |
+
Sometimes the model "spells out" the stop token as `</s>` like Capybara, so you may need to add `</s>` as an additional stopping condition.
|
78 |
+
***
|
79 |
+
## Running
|
80 |
+
Being a Yi model, try running a lower temperature with 0.05-0.1 MinP, a little repitition penalty, and no other samplers. Yi tends to run "hot" by default.
|
81 |
+
|
82 |
+
24GB GPUs can run Yi-34B-200K models at **45K-75K context** with exllamav2, and performant UIs like [exui](https://github.com/turboderp/exui). I go into more detail in this [post](https://old.reddit.com/r/LocalLLaMA/comments/1896igc/how_i_run_34b_models_at_75k_context_on_24gb_fast/)
|
83 |
+
|
84 |
+
I recommend exl2 quantizations profiled on data similar to the desired task. It is especially sensitive to the quantization data at low bpw.
|
85 |
+
|
86 |
+
To load this in full-context backends like transformers and vllm, you *must* change `max_position_embeddings` in config.json to a lower value than 200,000, otherwise you will OOM!
|
87 |
+
***
|
88 |
+
## Testing Notes
|
89 |
+
|
90 |
+
Various densities were tested with perplexity tests and long context prompts. Relatively high densities seem to perform better, contrary to the findings of the Super Mario paper.
|
91 |
+
|
92 |
+
This particular version is merged with more than the "recommended" max density of 0.5. It seems to result in even better perplexity, but I'm not sure if this translates to better output.
|
93 |
+
|
94 |
+
Weights that add up to 1 seems to be optimal.
|
95 |
+
|
96 |
+
Dare Ties is also resulting in seemingly better, lower perplexity merges than a regular ties merge, task arithmetic or a slerp merge.
|
97 |
+
|
98 |
+
SUS Chat is not a 200K model, hence it was merged at a very low density to try and preserve Yi 200K's long context performance while still inheriting some of SUS's performance.
|
99 |
+
|
100 |
+
Dolphin 200K was taken out of the merge because it seems to be performing poorly for a 34B model, like something went wrong during training?
|
101 |
+
|
102 |
+
I chose not to include other finetunes because they aren't trained on the 200K base. If any other 200K finetunes pop up, let me know.
|
103 |
+
***
|
104 |
+
## Credits:
|
105 |
+
|
106 |
+
https://github.com/cg123/mergekit/tree/dare
|
107 |
+
|
108 |
+
https://huggingface.co/NousResearch/Nous-Capybara-34B/
|
109 |
+
|
110 |
+
https://huggingface.co/bhenrym14/airoboros-3_1-yi-34b-200k
|
111 |
+
|
112 |
+
https://huggingface.co/migtissera/Tess-M-v1.4
|
113 |
+
|
114 |
+
https://huggingface.co/fblgit/una-xaberius-34b-v1beta
|
115 |
+
|
116 |
+
https://huggingface.co/chargoddard/Yi-34B-200K-Llama
|
117 |
+
|
118 |
+
https://huggingface.co/01-ai/Yi-34B-200K
|