Update README.md
Browse files
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 `
|
11 |
-
- *09/08/24 - Added `
|
12 |
|
13 |
## Details
|
14 |
|
15 |
-
The control
|
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 |
-
|
153 |
|
154 |
## Regularisation
|
155 |
|
156 |
-
I've
|
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 |
-
|
163 |
|
164 |
-
- `
|
165 |
-
- `
|
166 |
-
- `
|
167 |
|
168 |
-
## Prompting
|
169 |
|
170 |
-
|
171 |
|
172 |
```
|
173 |
USER: {prompt}
|
174 |
ASSISTANT:
|
175 |
```
|
176 |
|
177 |
-
|
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 (`
|
|
|
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`).
|