File size: 7,887 Bytes
1487689
c205151
 
 
1487689
 
fc0a47e
 
c205151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1487689
 
fc0a47e
27fce1f
fc0a47e
af15608
fc0a47e
 
 
cf06752
 
12855d3
 
cf06752
57118f2
6481dc0
 
 
 
d0012a9
f8c6bc5
02dd13d
6481dc0
 
be196e8
fc0a47e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1487689
fc0a47e
1487689
fc0a47e
f34c5eb
fc0a47e
1487689
fc0a47e
1487689
fc0a47e
1487689
fc0a47e
 
1487689
fc0a47e
 
 
 
 
 
06ecc0a
1487689
 
06ecc0a
fc0a47e
 
06ecc0a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fc0a47e
 
 
 
1614aac
 
fc0a47e
 
 
 
 
 
1614aac
 
fc0a47e
 
 
 
 
 
 
 
f34c5eb
 
fc0a47e
 
c205151
 
 
 
 
 
 
 
 
 
 
 
 
 
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
---
language:
- en
license: other
library_name: transformers
tags:
- not-for-all-audiences
- axolotl
model-index:
- name: MiS-Firefly-v0.2-22B
  results:
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: IFEval (0-Shot)
      type: HuggingFaceH4/ifeval
      args:
        num_few_shot: 0
    metrics:
    - type: inst_level_strict_acc and prompt_level_strict_acc
      value: 53.71
      name: strict accuracy
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=invisietch/MiS-Firefly-v0.2-22B
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: BBH (3-Shot)
      type: BBH
      args:
        num_few_shot: 3
    metrics:
    - type: acc_norm
      value: 36.08
      name: normalized accuracy
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=invisietch/MiS-Firefly-v0.2-22B
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MATH Lvl 5 (4-Shot)
      type: hendrycks/competition_math
      args:
        num_few_shot: 4
    metrics:
    - type: exact_match
      value: 15.94
      name: exact match
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=invisietch/MiS-Firefly-v0.2-22B
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: GPQA (0-shot)
      type: Idavidrein/gpqa
      args:
        num_few_shot: 0
    metrics:
    - type: acc_norm
      value: 7.27
      name: acc_norm
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=invisietch/MiS-Firefly-v0.2-22B
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MuSR (0-shot)
      type: TAUR-Lab/MuSR
      args:
        num_few_shot: 0
    metrics:
    - type: acc_norm
      value: 17.81
      name: acc_norm
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=invisietch/MiS-Firefly-v0.2-22B
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MMLU-PRO (5-shot)
      type: TIGER-Lab/MMLU-Pro
      config: main
      split: test
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 29.11
      name: accuracy
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=invisietch/MiS-Firefly-v0.2-22B
      name: Open LLM Leaderboard
---

<div align="center">
  <b style="font-size: 36px;">MiS-Firefly-v0.2-22B</b>

  <img src="https://huggingface.co/invisietch/MiS-Firefly-v0.2-22B/resolve/main/header.png" style="width:60%">

<b>HF</b> :
<a href="https://huggingface.co/invisietch/MiS-Firefly-v0.2-22B">FP16</a>
&vert;
<b>GGUF</b> :
<a href="https://huggingface.co/mradermacher/MiS-Firefly-v0.2-22B-i1-GGUF">imatrix</a> &middot;
<a href="https://huggingface.co/mradermacher/MiS-Firefly-v0.2-22B-GGUF">static</a> &middot;
<a href="https://huggingface.co/invisietch/MiS-Firefly-v0.2-22B-Q6_K-GGUF">Q6_K</a> &middot;
<a href="https://huggingface.co/invisietch/MiS-Firefly-v0.2-22B-Q4_K_M-GGUF">Q4_K_M</a>
&vert;
<b>EXL2</b> :
<a href="https://huggingface.co/Statuo/MiS-Firefly-v0.2-22b-EXL2-4bpw">4 BPW</a> &middot;
<a href="https://huggingface.co/Statuo/MiS-Firefly-v0.2-22b-EXL2-6bpw">6 BPW</a> &middot;
<a href="https://huggingface.co/Statuo/MiS-Firefly-v0.2-22b-EXL2-8bpw">8 BPW</a>
<br />
<i>Thanks to <a href="https://huggingface.co/SicariusSicariiStuff/">SicariusSicariiStuff</a> for the help with training &amp; 
<a href="https://huggingface.co/mradermacher/">mradermacher</a> for the imatrix &amp; static GGUFs, and
<a href="https://huggingface.co/Statuo">Statuo</a> for the EXL2s.</i>
<br />
</div>

# Model Details

**This is a fix for the quantization issue in Firefly v0.1.**

Firefly is a Mistral Small 22B finetune designed for creative writing and roleplay. The model is largely uncensored and should support
context up to 32,768 tokens.

The model has been tested in various roleplay scenarios up to 16k context, as well as in a role as an assistant. It shows a broad
competency &amp; coherence across various scenarios.

Special thanks to <a href="https://huggingface.co/SicariusSicariiStuff">SicariusSicariiStuff</a> for bouncing ideas back &amp; forth on
training, and <a href="https://huggingface.co/SytanSD">SytanSD</a> for quants.

# Feedback

I appreciate all feedback on any of my models, you can use:

* [My Discord server](https://discord.gg/AJwZuu7Ncx) - requires Discord.
* [The Community tab](https://huggingface.co/invisietch/MiS-Firefly-v0.2-22B/discussions) - requires HF login.
* Discord DMs to **invisietch**.

Your feedback is how I improve these models for future versions.

# Disclaimer

This model is extensively uncensored. It can generate explicit, disturbing or offensive responses. Use responsibly. I am not responsible for 
your use of this model.

This model is a finetune of Mistral Small 22B (2409) and usage must follow the terms of Mistral's license. By downloading this model, you
agree not to use it for commercial purposes unless you have a valid Mistral commercial license. See [the base model card](https://huggingface.co/mistralai/Mistral-Small-Instruct-2409)
for more details.

# Prompting Format

I'd recommend Mistral v2 & v3 prompting format:

```
<s>[INST] User message here.[/INST] Bot response here</s>[INST] User message 2 here.[/INST]
```

If you're using SillyTavern, make sure the story string is set correctly to Mistral v2 & v3 (not v3 Tekken):

```
[INST] {{#if system}}{{system}}
{{/if}}{{#if wiBefore}}{{wiBefore}}
{{/if}}{{#if description}}{{description}}
{{/if}}{{#if personality}}{{personality}}
{{/if}}{{#if scenario}}{{scenario}}
{{/if}}{{#if wiAfter}}{{wiAfter}}
{{/if}}{{#if persona}}{{persona}}
{{/if}}{{trim}}[/INST] Understood.</s>
```

The model seems very sensitive to wrong prompting formats.

# Sampler Settings

I'm running the following sampler settings but this is an RC and they may not be optimal.

- **Temperature:** 1
- **Min-P:** 0.1
- **Rep Pen:** 1.08
- **Rep Pen Range:** 1536
- **XTC:** 0.1/0.15

If you get completely incoherent responses, feel free to use these as a starting point.

**High temperature settings (above 1) tend to create less coherent responses**.

# Training Strategy

I started with a finetune of Mistral Small 22B which had been trained on the Gutenberg dataset: [nbeerbower/Mistral-Small-Gutenberg-Doppel-22B](https://huggingface.co/nbeerbower/Mistral-Small-Gutenberg-Doppel-22B).

The first stage of my training was a single epoch at low LR over a 474 million token text completion dataset.

I followed this up with a coherence, decensorship & roleplay finetune over a 172 million token instruct dataset over two epochs.

I did a slerp merge of epoch 1 into epoch 2 at a light weight which resolved the name-spelling issues on quantized versions of Firefly v0.1.

Total training time was about 32hrs on 4x Nvidia A100 80GB.

<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_invisietch__MiS-Firefly-v0.2-22B)

|      Metric       |Value|
|-------------------|----:|
|Avg.               |26.65|
|IFEval (0-Shot)    |53.71|
|BBH (3-Shot)       |36.08|
|MATH Lvl 5 (4-Shot)|15.94|
|GPQA (0-shot)      | 7.27|
|MuSR (0-shot)      |17.81|
|MMLU-PRO (5-shot)  |29.11|