jukofyork commited on
Commit
103edd1
1 Parent(s): fab9cc9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -13
README.md CHANGED
@@ -7,12 +7,12 @@ 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
- - *08/08/24 - Added `'WizardLM-2-8x22B'`, `'c4ai-command-r-v01'` and `'gemma-2-27b-it'`.*
11
- - *09/08/24 - Added `'miqu-1-70b'`.*
12
 
13
  ## Details
14
 
15
- The control-vectors in this repo were created as an experiment by increasing the triplets in `system_messages_outlook_extended.json` by 4x (click to expand):
16
 
17
  <details> <summary>"Outlook (extended)" ('positive' <---> 'negative')</summary>
18
 
@@ -149,32 +149,32 @@ The control-vectors in this repo were created as an experiment by increasing the
149
 
150
  </details>
151
 
152
- So now each models' cross-covariance matrix is the result of `120,000` hidden state samples and thus for the largest models (with `hidden_dim = 12288`) uses at least 10 samples per element.
153
 
154
  ## Regularisation
155
 
156
- I've also included 3 sets of control vectors trained using 3 different `'--regularisation_factor'` values:
157
 
158
  - [regularisation_factor = 1.0](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1.2-EXPERIMENTAL/tree/main/regularisation_factor%20%3D%201.0)
159
  - [regularisation_factor = 0.5](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1.2-EXPERIMENTAL/tree/main/regularisation_factor%20%3D%200.5)
160
  - [regularisation_factor = 0.0](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1.2-EXPERIMENTAL/tree/main/regularisation_factor%20%3D%200.0)
161
 
162
- Try to use the largest `regularisation_factor` that has the desired effect. This has the least chance of damaging the models' outputs:
163
 
164
- - `'miqu-1-70b'` and `'WizardLM-2-8x22B'` *likely* need to use `'regularisation_factor = 0.5'` or even `'regularisation_factor = 0.0'`.
165
- - `'Mistral-Large-Instruct-2407'` *may* need to use `'regularisation_factor = 0.5'`.
166
- - `'c4ai-command-r-plus'`, `'c4ai-command-r-v01'` and `'gemma-2-27b-it'` usualy work best with the default value of `'regularisation_factor = 1.0'`.
167
 
168
- ## Prompting format for 'Mistral-based' models:
169
 
170
- I have found by testing that `'Mistral-Large-Instruct-2407'`, `'WizardLM-2-8x22B'` and `'miqu-1-70b'` seem to work much better for creative writing if you use the following 'Vicuna' prompt template:
171
 
172
  ```
173
  USER: {prompt}
174
  ASSISTANT:
175
  ```
176
 
177
- so I altered the 'Jinja2' `chat_template` in the `tokenizer_config.json` for `Mistral-Large-Instruct-2407`, `WizardLM-2-8x22B` and `miqu-1-70b` to this for the training of these control vectors:
178
 
179
  ```json
180
  {
@@ -182,4 +182,4 @@ so I altered the 'Jinja2' `chat_template` in the `tokenizer_config.json` for `Mi
182
  }
183
  ```
184
 
185
- **NOTE**: I still used the default prompt templates for the other 3 models (`'c4ai-command-r-plus'`, `'c4ai-command-r-v01'` and `'gemma-2-27b-it'`).
 
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
+ - *08/08/24 - Added `WizardLM-2-8x22B`, `c4ai-command-r-v01` and `gemma-2-27b-it`.*
11
+ - *09/08/24 - Added `miqu-1-70b`.*
12
 
13
  ## Details
14
 
15
+ The control vectors in this repository were created experimentally by quadrupling the triplets in `system_messages_outlook_extended.json` (click to expand):
16
 
17
  <details> <summary>"Outlook (extended)" ('positive' <---> 'negative')</summary>
18
 
 
149
 
150
  </details>
151
 
152
+ Consequently, each model's cross-covariance matrix is now derived from `120,000` hidden state samples. For the largest models (with a hidden dimension of `12,288`), this ensures at least 10 samples per element.
153
 
154
  ## Regularisation
155
 
156
+ I've included three sets of control vectors trained using different `--regularisation_factor` values:
157
 
158
  - [regularisation_factor = 1.0](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1.2-EXPERIMENTAL/tree/main/regularisation_factor%20%3D%201.0)
159
  - [regularisation_factor = 0.5](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1.2-EXPERIMENTAL/tree/main/regularisation_factor%20%3D%200.5)
160
  - [regularisation_factor = 0.0](https://huggingface.co/jukofyork/creative-writing-control-vectors-v2.1.2-EXPERIMENTAL/tree/main/regularisation_factor%20%3D%200.0)
161
 
162
+ Use the largest `regularisation_factor` that achieves the desired effect. This minimizes the risk of damaging the model's outputs:
163
 
164
+ - `WizardLM-2-8x22B` and `miqu-1-70b` likely need `regularisation_factor = 0.5` or even `regularisation_factor = 0.0`.
165
+ - `Mistral-Large-Instruct-2407` may need `regularisation_factor = 0.5`.
166
+ - `c4ai-command-r-plus`, `c4ai-command-r-v01`, and `gemma-2-27b-it` usually work best with the default `regularisation_factor = 1.0`.
167
 
168
+ ## Prompting Format for 'Mistral-based' Models
169
 
170
+ Testing has shown that `Mistral-Large-Instruct-2407`, `WizardLM-2-8x22B`, and `miqu-1-70b` perform better for creative writing using the following multi-line 'Vicuna' prompt template:
171
 
172
  ```
173
  USER: {prompt}
174
  ASSISTANT:
175
  ```
176
 
177
+ For training these control vectors, I modified the 'Jinja2' `chat_template` in `tokenizer_config.json` for `Mistral-Large-Instruct-2407`, `WizardLM-2-8x22B` and `miqu-1-70b` to this for the training of these control vectors:
178
 
179
  ```json
180
  {
 
182
  }
183
  ```
184
 
185
+ **NOTE**: I still used the default prompt templates for the other 3 models (`c4ai-command-r-plus`, `c4ai-command-r-v01` and `gemma-2-27b-it`).