File size: 2,197 Bytes
8213ea5
 
 
606e8f6
 
 
 
 
8213ea5
871e0b3
606e8f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d904dec
 
 
606e8f6
 
d904dec
 
 
606e8f6
4b20da9
606e8f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
license: other
license_name: yi-license
license_link: https://huggingface.co/01-ai/Yi-34B/blob/main/LICENSE
language:
- en
library_name: transformers
pipeline_tag: text-generation
---
Nous-Capybara-34B and Tess-M-Creative-v1.0 merged, then quantized with exllamav2 on 200 rows (400K tokens) on a long Vicuna format chat, a sci fi story and a fantasy story. This should hopefully yield better chat performance than the default wikitext quantization.

Quantized to 3.1bpw, enough for **~75K context on a 24GB GPU.**

The following merge config was used:
```
models:
  - model: /home/alpha/Storage/Models/Raw/larryvrh_Yi-34B-200K-Llamafied
    # no parameters necessary for base model
  - model: /home/alpha/Storage/Models/Raw/migtissera_Tess-M-v1.0
    parameters:
      density: 0.6
      weight: 1.0
  - model: /home/alpha/Storage/Models/Raw/Nous-Capybara-34B
    parameters:
      density: 0.6
      weight: 1.0
merge_method: ties
base_model: //home/alpha/Storage/Models/Raw/larryvrh_Yi-34B-200K-Llamafied
parameters:
  normalize: true
  int8_mask: true
dtype: float16
```

First exllama quantization pass:
```
python convert.py --in_dir /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K -o /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K-exl2 -om /home/alpha/FastModels/capytessmes.json --cal_dataset /home/alpha/Documents/smol.parquet -l 2048 -r 80 -ml 2048 -mr 40 -gr 40 -ss 4096 -nr -b 3.5 -hb 6
```

Second exllama quantization pass:
```
python convert.py --in_dir /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K -o /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K-exl2 -m /home/alpha/FastModels/capytessmes.json --cal_dataset /home/alpha/Documents/medium.parquet -l 2048 -r 200 -ml 2048 -mr 40 -gr 200 -ss 4096 -b 3.1 -hb 6 -cf /home/alpha/FastModels/Capybara-Tess-Yi-34B-200K-exl2-31bpw -nr
```

Both models have Vicuna syntax, so:

# Prompt Format:

```
SYSTEM: ...
USER: ...
ASSISTANT: ...
```
Stop token: `</s>`

***

Credits:

https://github.com/cg123/mergekit

https://huggingface.co/NousResearch/Nous-Capybara-34B/discussions

https://huggingface.co/migtissera/Tess-M-Creative-v1.0

https://huggingface.co/larryvrh/Yi-34B-200K-Llamafied

https://huggingface.co/01-ai/Yi-34B-200K