jukofyork commited on
Commit
a906ace
1 Parent(s): 767bf23

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -2
README.md CHANGED
@@ -7,6 +7,10 @@ tags:
7
 
8
  **NOTE**: See [creative-writing-control-vectors-v2.1](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1) for the current main control-vector repo.
9
 
 
 
 
 
10
  The control-vectors in this repo were created as an experiment by increasing the triplets in `system_messages_outlook_extended.json` by 4x.
11
 
12
  This means each models' cross-covariance matrix will be the result of `120,000` hidden state samples and this in turn will mean each uses ~10x the hidden state dimension for the largest models (click to expand):
@@ -146,6 +150,8 @@ This means each models' cross-covariance matrix will be the result of `120,000`
146
 
147
  </details>
148
 
 
 
149
  I also include 3 different values for the `--regularisation_factor` option; `1.0` (the default), `0.5` and `0.0`:
150
 
151
  - [regularisation_factor = 1.0](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1.2-EXPERIMENTAL/tree/main/regularisation_factor%20%3D%201.0)
@@ -154,6 +160,21 @@ I also include 3 different values for the `--regularisation_factor` option; `1.0
154
 
155
  Try to use the largest `regularisation_factor` that has the desired effect - this has the least chance of damaging the models' outputs.
156
 
157
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
- *I will also add `WizardLM-2-8x22B`, `c4ai-command-r-v01` and `gemma-2-27b-it` versions of these control vectors in the next few days.*
 
7
 
8
  **NOTE**: See [creative-writing-control-vectors-v2.1](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1) for the current main control-vector repo.
9
 
10
+ *(I will also add `WizardLM-2-8x22B`, `c4ai-command-r-v01` and `gemma-2-27b-it` versions of these control vectors in the next few days...)*
11
+
12
+ ## Details
13
+
14
  The control-vectors in this repo were created as an experiment by increasing the triplets in `system_messages_outlook_extended.json` by 4x.
15
 
16
  This means each models' cross-covariance matrix will be the result of `120,000` hidden state samples and this in turn will mean each uses ~10x the hidden state dimension for the largest models (click to expand):
 
150
 
151
  </details>
152
 
153
+ ## Regularisation
154
+
155
  I also include 3 different values for the `--regularisation_factor` option; `1.0` (the default), `0.5` and `0.0`:
156
 
157
  - [regularisation_factor = 1.0](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1.2-EXPERIMENTAL/tree/main/regularisation_factor%20%3D%201.0)
 
160
 
161
  Try to use the largest `regularisation_factor` that has the desired effect - this has the least chance of damaging the models' outputs.
162
 
163
+ ## Prompting format for `Mistral-Large-Instruct-2407` and `WizardLM-2-8x22B`:
164
+
165
+ I have found by testing that `Mistral-Large-Instruct-2407` seems to work much better for creative writing if you use the following 'Vicuna' prompt template:
166
+
167
+ ```
168
+ USER: {prompt}
169
+ ASSISTANT:
170
+ ```
171
+
172
+ so I altered the 'Jinja2' `chat_template` in the `tokenizer_config.json` for both `Mistral-Large-Instruct-2407` and `WizardLM-2-8x22B` to this for the training of these control vectors:
173
+
174
+ ```json
175
+ {
176
+ "chat_template": "{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{{ messages[0]['content'] | trim + '\n\n' }}{% else %}{% set loop_messages = messages %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ 'USER: ' + message['content'] | trim + '\n' }}{% elif message['role'] == 'assistant' %}{{ 'ASSISTANT: ' + message['content'] | trim + eos_token + '\n' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ 'ASSISTANT:' }}{% endif %}"
177
+ }
178
+ ```
179
 
180
+ The other 3 models still use their default templates though.