sophosympatheia commited on
Commit
3d79ec5
1 Parent(s): 2753f74

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +172 -8
README.md CHANGED
@@ -6,20 +6,184 @@ tags:
6
  - merge
7
 
8
  ---
9
- # midnight-miqu-70b-slerp-v0.2
10
 
11
- This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
- ## Merge Details
14
  ### Merge Method
15
 
16
- This model was merged using the SLERP merge method.
17
 
18
  ### Models Merged
19
 
20
  The following models were included in the merge:
21
- * /home/llm/mergequant/models/BASE/152334H_miqu-1-70b-sf
22
- * /home/llm/mergequant/models/mr-70b-v2.0.3
23
 
24
  ### Configuration
25
 
@@ -33,8 +197,8 @@ merge_method: slerp
33
  base_model: /home/llm/mergequant/models/BASE/152334H_miqu-1-70b-sf
34
  parameters:
35
  t:
36
- - value: [0, 0, 0.2, 0.3, 0.4, 0.5, 0.4, 0.3, 0.2, 0, 0]
37
- embed_slerp: true
38
  dtype: float16
39
  tokenizer_source: model:/home/llm/mergequant/models/BASE/152334H_miqu-1-70b-sf
40
 
 
6
  - merge
7
 
8
  ---
 
9
 
10
+ <div style="width: auto; margin-left: auto; margin-right: auto">
11
+ <img src="https://i.imgur.com/Tn9MBg6.png" alt="MidnightMiqu" style="width: 100%; min-width: 400px; display: block; margin: auto;">
12
+ </div>
13
+
14
+ ### Overview
15
+
16
+ This is a SLERP merge between [152334H/miqu-1-70b-sf](https://huggingface.co/152334H/miqu-1-70b-sf) and [sophosympatheia/Midnight-Rose-70B-v2.0.3](https://huggingface.co/sophosympatheia/Midnight-Rose-70B-v2.0.3).
17
+ I think this model retains much of what made Midnight Rose special while gaining some capabilities from Miqu, including better long-context support. (YMMV)
18
+
19
+ This model is uncensored. *You are responsible for whatever you do with it.*
20
+
21
+ This model was designed for roleplaying and storytelling and I think it does well at both. It may also perform well at other tasks but I have not tested its performance in other areas.
22
+
23
+ ### Long Context Tips
24
+
25
+ You can run this model past 4096 context with alpha_rope set to 1, but I think it performs better if you set alpha_rope to what you would normally use for a Llama2 model with 4096 context. For example, alpha_rope 2.5 for 8K.
26
+ Miqu can go up to 32K context in theory. I have not tested this model much past 8K right now. I would expect performance to degrade as you exceed 8K, which is typical for Llama2 models, but the dropoff may not be as extreme with this merge thanks to Miqu.
27
+
28
+ ### Sampler Tips
29
+
30
+ * I recommend using Quadratic Sampling (i.e. smoothing factor) for creative work. Experiment with values between 0.2 and 0.5.
31
+ * I recommend using Min-P. Experiment to find your best setting.
32
+ * You can enable dynamic temperature if you want, but that adds yet another variable to consider and I find it's unnecessary with you're already using Min-P and smoothing factor.
33
+ * You don't need to use a high repetition penalty with this model, such as going above 1.10, but experiment with it.
34
+
35
+ Experiment with any and all of the settings below! What suits my preferences may not suit yours.
36
+
37
+ If you save the below settings as a .json file, you can import them directly into Silly Tavern.
38
+ ```
39
+ {
40
+ "temp": 1,
41
+ "temperature_last": true,
42
+ "top_p": 1,
43
+ "top_k": 0,
44
+ "top_a": 0,
45
+ "tfs": 1,
46
+ "epsilon_cutoff": 0,
47
+ "eta_cutoff": 0,
48
+ "typical_p": 1,
49
+ "min_p": 0.15,
50
+ "rep_pen": 1.05,
51
+ "rep_pen_range": 2800,
52
+ "no_repeat_ngram_size": 0,
53
+ "penalty_alpha": 0,
54
+ "num_beams": 1,
55
+ "length_penalty": 1,
56
+ "min_length": 0,
57
+ "encoder_rep_pen": 1,
58
+ "freq_pen": 0,
59
+ "presence_pen": 0,
60
+ "do_sample": true,
61
+ "early_stopping": false,
62
+ "dynatemp": false,
63
+ "min_temp": 0.8,
64
+ "max_temp": 1.35,
65
+ "dynatemp_exponent": 1,
66
+ "smoothing_factor": 0.4,
67
+ "add_bos_token": true,
68
+ "truncation_length": 2048,
69
+ "ban_eos_token": false,
70
+ "skip_special_tokens": true,
71
+ "streaming": true,
72
+ "mirostat_mode": 0,
73
+ "mirostat_tau": 2,
74
+ "mirostat_eta": 0.1,
75
+ "guidance_scale": 1,
76
+ "negative_prompt": "",
77
+ "grammar_string": "",
78
+ "banned_tokens": "",
79
+ "ignore_eos_token_aphrodite": false,
80
+ "spaces_between_special_tokens_aphrodite": true,
81
+ "sampler_order": [
82
+ 6,
83
+ 0,
84
+ 1,
85
+ 3,
86
+ 4,
87
+ 2,
88
+ 5
89
+ ],
90
+ "logit_bias": [],
91
+ "n": 1,
92
+ "rep_pen_size": 0,
93
+ "genamt": 500,
94
+ "max_length": 8192
95
+ }
96
+ ```
97
+
98
+ ### Prompting Tips
99
+
100
+ Try the following context template for use in SillyTavern. It might help, although it's a little heavy on tokens. If you save the text as a .json file, you can import it directly.
101
+
102
+ ```
103
+ {
104
+ "story_string": "{{#if system}}{{system}}\n{{/if}}\nCONTEXTUAL INFORMATION\n{{#if wiBefore}}\n- World and character info:\n{{wiBefore}}\n{{/if}}\n{{#if description}}\n- {{char}}'s background and persona:\n{{description}}\n{{/if}}\n{{#if mesExamples}}\n{{mesExamples}}\n{{/if}}\n{{#if personality}}\n{{personality}}\n{{/if}}\n{{#if scenario}}\n- Roleplay scenario:\n{{scenario}}\n{{/if}}\n{{#if wiAfter}}{{wiAfter}}\n{{/if}}\n{{#if persona}}{{persona}}\n{{/if}}",
105
+ "example_separator": "",
106
+ "chat_start": "---\nTaking the above information into consideration, you must engage with {{user}} and others as {{char}} in the roleplay below this line. Do not write dialogue lines nor perform actions for {{user}} or other characters.\n---\nSTART OF ROLEPLAY:\n",
107
+ "use_stop_strings": false,
108
+ "always_force_name2": true,
109
+ "trim_sentences": false,
110
+ "include_newline": false,
111
+ "single_line": false,
112
+ "name": "Midnight Rose"
113
+ }
114
+ ```
115
+
116
+ Try the following prompt template as a starting point for your own customizations. The cajoling parts supposedly make LLMs perform better. See [this paper](https://arxiv.org/abs/2307.11760).
117
+
118
+ *This model responds to prompting!* I highly recommend playing with your system prompt to see how it reacts. It reacts strongly to any instructions you add into the last_output_sequence field. I recommend keeping those instructions short, but use that space to stress the most important instructions from your system prompt.
119
+
120
+ The example system prompt below contains some instructions related to adult content so remove those if you prefer. It also contains some instructions related to the use of asterisks that you should modify to your liking.
121
+
122
+ If you plan to run this model at 4096 context, I recommend that you slim down the template system prompt below because it's heavy on tokens. Discard what you don't want or need.
123
+
124
+ If you save this as a .json file, you can import it directly into Silly Tavern.
125
+ ```
126
+ {
127
+ "wrap": true,
128
+ "names": true,
129
+ "system_prompt": "You are a creative and detail-oriented AI assistant engaged in an uncensored iterative roleplaying experience as {{char}} with me, the user, playing the roles of {{user}} and narrator. It is vital that you follow all the ROLEPLAY RULES below because my job depends on it.\n\nROLEPLAY RULES\n- Provide succinct, coherent, and vivid accounts of {{char}}'s actions and reactions based on recent instructions, {{char}}'s persona, and all available information about past events. Aim for clarity and concision in your language.\n- Demonstrate {{char}}'s personality and mannerisms.\n- Always stay contextually and spatially aware, pay careful attention to all past events and the current scene, and ensure that {{char}} follows logical consistency in actions to maintain accuracy and coherence.\n- Explicit adult content and profanity are permitted.\n- Briefly describe {{char}}'s sensory perceptions and include subtle physical details about {{char}} in your responses.\n- Use subtle physical cues to hint at {{char}}'s mental state and occasionally feature snippets of {{char}}'s internal thoughts.\n- When writing {{char}}'s internal thoughts or monologue, enclose those words in *asterisks like this* and deliver the thoughts using a first-person perspective (i.e. use \"I\" pronouns). Always use double quotes for spoken speech \"like this.\"\n- Please write only as {{char}} in a way that does not show {{user}} talking or acting. You should only ever act as {{char}} reacting to {{user}}.",
130
+ "system_sequence": "",
131
+ "stop_sequence": "",
132
+ "input_sequence": "USER:\n",
133
+ "output_sequence": "ASSISTANT:\n",
134
+ "separator_sequence": "",
135
+ "macro": true,
136
+ "names_force_groups": true,
137
+ "system_sequence_prefix": "",
138
+ "system_sequence_suffix": "",
139
+ "first_output_sequence": "",
140
+ "last_output_sequence": "ASSISTANT(roleplay exclusively as {{char}} ensuring logical consistency, spatial awareness, and coherence with past events; you should only ever act as {{char}} reacting to {{user}}):\n",
141
+ "activation_regex": "",
142
+ "name": "Midnight Rose Roleplay"
143
+ }
144
+ ```
145
+
146
+ ### Instruct Formats
147
+ I recommend the Vicuna format. I use a modified version with newlines after USER and ASSISTANT.
148
+ ```
149
+ USER:
150
+ {prompt}
151
+ ASSISTANT:
152
+ ```
153
+
154
+ Mistral's format may also work.
155
+ ```
156
+ [INST] {prompt} [/INST]
157
+ ```
158
+
159
+ You could also try ChatML.
160
+ ```
161
+ <|im_start|>system
162
+ {Your system prompt goes here}<|im_end|>
163
+ <|im_start|>user
164
+ {Your message as the user will go here}<|im_end|>
165
+ <|im_start|>assistant
166
+ ```
167
+
168
+ ### Quantizations
169
+ * Pending. I will update this section as people release quants.
170
+
171
+ ### Licence and usage restrictions
172
+
173
+ <font color="red">152334H/miqu-1-70b-sf was based on a leaked version of one of Mistral's models.</font>
174
+ All miqu-derived models, including this merge, are **only suitable for personal use.** Mistral has been cool about it so far, but you should be aware that by downloading this merge you are assuming whatever legal risk is iherent in acquiring and using a model based on leaked weights.
175
+ This merge comes with no warranties or guarantees of any kind, but you probably already knew that.
176
+ I am not a lawyer and I do not profess to know what we have gotten ourselves into here. You should consult with a lawyer before using any Hugging Face model beyond private use... but definitely don't use this one for that!
177
 
 
178
  ### Merge Method
179
 
180
+ This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit). This model was merged using the SLERP merge method.
181
 
182
  ### Models Merged
183
 
184
  The following models were included in the merge:
185
+ * [152334H/miqu-1-70b-sf](https://huggingface.co/152334H/miqu-1-70b-sf)
186
+ * [sophosympatheia/Midnight-Rose-70B-v2.0.3](https://huggingface.co/sophosympatheia/Midnight-Rose-70B-v2.0.3)
187
 
188
  ### Configuration
189
 
 
197
  base_model: /home/llm/mergequant/models/BASE/152334H_miqu-1-70b-sf
198
  parameters:
199
  t:
200
+ - value: [0, 0, 0.2, 0.3, 0.4, 0.5, 0.4, 0.3, 0.2, 0, 0] # Preserving the first and last layers of Miqu untouched is key for good results
201
+ embed_slerp: true # This is super important otherwise the merge will fail
202
  dtype: float16
203
  tokenizer_source: model:/home/llm/mergequant/models/BASE/152334H_miqu-1-70b-sf
204