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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: VAGOsolutions/SauerkrautLM-7b-HerO
|
3 |
+
inference: false
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
- de
|
7 |
+
library_name: transformers
|
8 |
+
license: apache-2.0
|
9 |
+
model_creator: VAGO solutions
|
10 |
+
model_name: SauerkrautLM 7B HerO
|
11 |
+
model_type: mistral
|
12 |
+
pipeline_tag: text-generation
|
13 |
+
prompt_template: '<|im_start|>system
|
14 |
+
|
15 |
+
{system_message}<|im_end|>
|
16 |
+
|
17 |
+
<|im_start|>user
|
18 |
+
|
19 |
+
{prompt}<|im_end|>
|
20 |
+
|
21 |
+
<|im_start|>assistant
|
22 |
+
|
23 |
+
'
|
24 |
+
quantized_by: TheBloke
|
25 |
+
tags:
|
26 |
+
- mistral
|
27 |
+
- finetune
|
28 |
+
- chatml
|
29 |
+
- augmentation
|
30 |
+
- german
|
31 |
+
---
|
32 |
+
<!-- markdownlint-disable MD041 -->
|
33 |
+
|
34 |
+
<!-- header start -->
|
35 |
+
<!-- 200823 -->
|
36 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
37 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
38 |
+
</div>
|
39 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
40 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
41 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
42 |
+
</div>
|
43 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
44 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
<div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
|
48 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
49 |
+
<!-- header end -->
|
50 |
+
|
51 |
+
# SauerkrautLM 7B HerO - AWQ
|
52 |
+
- Model creator: [VAGO solutions](https://huggingface.co/VAGOsolutions)
|
53 |
+
- Original model: [SauerkrautLM 7B HerO](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-HerO)
|
54 |
+
|
55 |
+
<!-- description start -->
|
56 |
+
## Description
|
57 |
+
|
58 |
+
This repo contains AWQ model files for [VAGO solutions's SauerkrautLM 7B HerO](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-HerO).
|
59 |
+
|
60 |
+
These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
|
61 |
+
|
62 |
+
|
63 |
+
### About AWQ
|
64 |
+
|
65 |
+
AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
|
66 |
+
|
67 |
+
It is supported by:
|
68 |
+
|
69 |
+
- [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
|
70 |
+
- [vLLM](https://github.com/vllm-project/vllm) - Llama and Mistral models only
|
71 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
72 |
+
- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
|
73 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
|
74 |
+
|
75 |
+
<!-- description end -->
|
76 |
+
<!-- repositories-available start -->
|
77 |
+
## Repositories available
|
78 |
+
|
79 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/SauerkrautLM-7B-HerO-AWQ)
|
80 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/SauerkrautLM-7B-HerO-GPTQ)
|
81 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/SauerkrautLM-7B-HerO-GGUF)
|
82 |
+
* [VAGO solutions's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-HerO)
|
83 |
+
<!-- repositories-available end -->
|
84 |
+
|
85 |
+
<!-- prompt-template start -->
|
86 |
+
## Prompt template: ChatML
|
87 |
+
|
88 |
+
```
|
89 |
+
<|im_start|>system
|
90 |
+
{system_message}<|im_end|>
|
91 |
+
<|im_start|>user
|
92 |
+
{prompt}<|im_end|>
|
93 |
+
<|im_start|>assistant
|
94 |
+
|
95 |
+
```
|
96 |
+
|
97 |
+
<!-- prompt-template end -->
|
98 |
+
|
99 |
+
|
100 |
+
<!-- README_AWQ.md-provided-files start -->
|
101 |
+
## Provided files, and AWQ parameters
|
102 |
+
|
103 |
+
I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
|
104 |
+
|
105 |
+
Models are released as sharded safetensors files.
|
106 |
+
|
107 |
+
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|
108 |
+
| ------ | ---- | -- | ----------- | ------- | ---- |
|
109 |
+
| [main](https://huggingface.co/TheBloke/SauerkrautLM-7B-HerO-AWQ/tree/main) | 4 | 128 | [German Quad](https://huggingface.co/datasets/deepset/germanquad/viewer/) | 4096 | 4.15 GB
|
110 |
+
|
111 |
+
<!-- README_AWQ.md-provided-files end -->
|
112 |
+
|
113 |
+
<!-- README_AWQ.md-text-generation-webui start -->
|
114 |
+
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
115 |
+
|
116 |
+
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
117 |
+
|
118 |
+
It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
|
119 |
+
|
120 |
+
1. Click the **Model tab**.
|
121 |
+
2. Under **Download custom model or LoRA**, enter `TheBloke/SauerkrautLM-7B-HerO-AWQ`.
|
122 |
+
3. Click **Download**.
|
123 |
+
4. The model will start downloading. Once it's finished it will say "Done".
|
124 |
+
5. In the top left, click the refresh icon next to **Model**.
|
125 |
+
6. In the **Model** dropdown, choose the model you just downloaded: `SauerkrautLM-7B-HerO-AWQ`
|
126 |
+
7. Select **Loader: AutoAWQ**.
|
127 |
+
8. Click Load, and the model will load and is now ready for use.
|
128 |
+
9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
|
129 |
+
10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
|
130 |
+
<!-- README_AWQ.md-text-generation-webui end -->
|
131 |
+
|
132 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
133 |
+
## Multi-user inference server: vLLM
|
134 |
+
|
135 |
+
Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
|
136 |
+
|
137 |
+
- Please ensure you are using vLLM version 0.2 or later.
|
138 |
+
- When using vLLM as a server, pass the `--quantization awq` parameter.
|
139 |
+
|
140 |
+
For example:
|
141 |
+
|
142 |
+
```shell
|
143 |
+
python3 -m vllm.entrypoints.api_server --model TheBloke/SauerkrautLM-7B-HerO-AWQ --quantization awq --dtype auto
|
144 |
+
```
|
145 |
+
|
146 |
+
- When using vLLM from Python code, again set `quantization=awq`.
|
147 |
+
|
148 |
+
For example:
|
149 |
+
|
150 |
+
```python
|
151 |
+
from vllm import LLM, SamplingParams
|
152 |
+
|
153 |
+
prompts = [
|
154 |
+
"Tell me about AI",
|
155 |
+
"Write a story about llamas",
|
156 |
+
"What is 291 - 150?",
|
157 |
+
"How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
|
158 |
+
]
|
159 |
+
prompt_template=f'''<|im_start|>system
|
160 |
+
{system_message}<|im_end|>
|
161 |
+
<|im_start|>user
|
162 |
+
{prompt}<|im_end|>
|
163 |
+
<|im_start|>assistant
|
164 |
+
'''
|
165 |
+
|
166 |
+
prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
|
167 |
+
|
168 |
+
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
|
169 |
+
|
170 |
+
llm = LLM(model="TheBloke/SauerkrautLM-7B-HerO-AWQ", quantization="awq", dtype="auto")
|
171 |
+
|
172 |
+
outputs = llm.generate(prompts, sampling_params)
|
173 |
+
|
174 |
+
# Print the outputs.
|
175 |
+
for output in outputs:
|
176 |
+
prompt = output.prompt
|
177 |
+
generated_text = output.outputs[0].text
|
178 |
+
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
|
179 |
+
```
|
180 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
181 |
+
|
182 |
+
<!-- README_AWQ.md-use-from-tgi start -->
|
183 |
+
## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
|
184 |
+
|
185 |
+
Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
|
186 |
+
|
187 |
+
Example Docker parameters:
|
188 |
+
|
189 |
+
```shell
|
190 |
+
--model-id TheBloke/SauerkrautLM-7B-HerO-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
|
191 |
+
```
|
192 |
+
|
193 |
+
Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
|
194 |
+
|
195 |
+
```shell
|
196 |
+
pip3 install huggingface-hub
|
197 |
+
```
|
198 |
+
|
199 |
+
```python
|
200 |
+
from huggingface_hub import InferenceClient
|
201 |
+
|
202 |
+
endpoint_url = "https://your-endpoint-url-here"
|
203 |
+
|
204 |
+
prompt = "Tell me about AI"
|
205 |
+
prompt_template=f'''<|im_start|>system
|
206 |
+
{system_message}<|im_end|>
|
207 |
+
<|im_start|>user
|
208 |
+
{prompt}<|im_end|>
|
209 |
+
<|im_start|>assistant
|
210 |
+
'''
|
211 |
+
|
212 |
+
client = InferenceClient(endpoint_url)
|
213 |
+
response = client.text_generation(prompt,
|
214 |
+
max_new_tokens=128,
|
215 |
+
do_sample=True,
|
216 |
+
temperature=0.7,
|
217 |
+
top_p=0.95,
|
218 |
+
top_k=40,
|
219 |
+
repetition_penalty=1.1)
|
220 |
+
|
221 |
+
print(f"Model output: ", response)
|
222 |
+
```
|
223 |
+
<!-- README_AWQ.md-use-from-tgi end -->
|
224 |
+
|
225 |
+
<!-- README_AWQ.md-use-from-python start -->
|
226 |
+
## Inference from Python code using Transformers
|
227 |
+
|
228 |
+
### Install the necessary packages
|
229 |
+
|
230 |
+
- Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
|
231 |
+
- Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
|
232 |
+
|
233 |
+
```shell
|
234 |
+
pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
|
235 |
+
```
|
236 |
+
|
237 |
+
Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
|
238 |
+
|
239 |
+
If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
|
240 |
+
|
241 |
+
```shell
|
242 |
+
pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
|
243 |
+
```
|
244 |
+
|
245 |
+
If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
|
246 |
+
|
247 |
+
```shell
|
248 |
+
pip3 uninstall -y autoawq
|
249 |
+
git clone https://github.com/casper-hansen/AutoAWQ
|
250 |
+
cd AutoAWQ
|
251 |
+
pip3 install .
|
252 |
+
```
|
253 |
+
|
254 |
+
### Transformers example code (requires Transformers 4.35.0 and later)
|
255 |
+
|
256 |
+
```python
|
257 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
|
258 |
+
|
259 |
+
model_name_or_path = "TheBloke/SauerkrautLM-7B-HerO-AWQ"
|
260 |
+
|
261 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
|
262 |
+
model = AutoModelForCausalLM.from_pretrained(
|
263 |
+
model_name_or_path,
|
264 |
+
low_cpu_mem_usage=True,
|
265 |
+
device_map="cuda:0"
|
266 |
+
)
|
267 |
+
|
268 |
+
# Using the text streamer to stream output one token at a time
|
269 |
+
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
270 |
+
|
271 |
+
prompt = "Tell me about AI"
|
272 |
+
prompt_template=f'''<|im_start|>system
|
273 |
+
{system_message}<|im_end|>
|
274 |
+
<|im_start|>user
|
275 |
+
{prompt}<|im_end|>
|
276 |
+
<|im_start|>assistant
|
277 |
+
'''
|
278 |
+
|
279 |
+
# Convert prompt to tokens
|
280 |
+
tokens = tokenizer(
|
281 |
+
prompt_template,
|
282 |
+
return_tensors='pt'
|
283 |
+
).input_ids.cuda()
|
284 |
+
|
285 |
+
generation_params = {
|
286 |
+
"do_sample": True,
|
287 |
+
"temperature": 0.7,
|
288 |
+
"top_p": 0.95,
|
289 |
+
"top_k": 40,
|
290 |
+
"max_new_tokens": 512,
|
291 |
+
"repetition_penalty": 1.1
|
292 |
+
}
|
293 |
+
|
294 |
+
# Generate streamed output, visible one token at a time
|
295 |
+
generation_output = model.generate(
|
296 |
+
tokens,
|
297 |
+
streamer=streamer,
|
298 |
+
**generation_params
|
299 |
+
)
|
300 |
+
|
301 |
+
# Generation without a streamer, which will include the prompt in the output
|
302 |
+
generation_output = model.generate(
|
303 |
+
tokens,
|
304 |
+
**generation_params
|
305 |
+
)
|
306 |
+
|
307 |
+
# Get the tokens from the output, decode them, print them
|
308 |
+
token_output = generation_output[0]
|
309 |
+
text_output = tokenizer.decode(token_output)
|
310 |
+
print("model.generate output: ", text_output)
|
311 |
+
|
312 |
+
# Inference is also possible via Transformers' pipeline
|
313 |
+
from transformers import pipeline
|
314 |
+
|
315 |
+
pipe = pipeline(
|
316 |
+
"text-generation",
|
317 |
+
model=model,
|
318 |
+
tokenizer=tokenizer,
|
319 |
+
**generation_params
|
320 |
+
)
|
321 |
+
|
322 |
+
pipe_output = pipe(prompt_template)[0]['generated_text']
|
323 |
+
print("pipeline output: ", pipe_output)
|
324 |
+
|
325 |
+
```
|
326 |
+
<!-- README_AWQ.md-use-from-python end -->
|
327 |
+
|
328 |
+
<!-- README_AWQ.md-compatibility start -->
|
329 |
+
## Compatibility
|
330 |
+
|
331 |
+
The files provided are tested to work with:
|
332 |
+
|
333 |
+
- [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
|
334 |
+
- [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
|
335 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
|
336 |
+
- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
|
337 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
|
338 |
+
|
339 |
+
<!-- README_AWQ.md-compatibility end -->
|
340 |
+
|
341 |
+
<!-- footer start -->
|
342 |
+
<!-- 200823 -->
|
343 |
+
## Discord
|
344 |
+
|
345 |
+
For further support, and discussions on these models and AI in general, join us at:
|
346 |
+
|
347 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
348 |
+
|
349 |
+
## Thanks, and how to contribute
|
350 |
+
|
351 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
352 |
+
|
353 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
354 |
+
|
355 |
+
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
|
356 |
+
|
357 |
+
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
|
358 |
+
|
359 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
360 |
+
|
361 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
362 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
363 |
+
|
364 |
+
**Special thanks to**: Aemon Algiz.
|
365 |
+
|
366 |
+
**Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
|
367 |
+
|
368 |
+
|
369 |
+
Thank you to all my generous patrons and donaters!
|
370 |
+
|
371 |
+
And thank you again to a16z for their generous grant.
|
372 |
+
|
373 |
+
<!-- footer end -->
|
374 |
+
|
375 |
+
# Original model card: VAGO solutions's SauerkrautLM 7B HerO
|
376 |
+
|
377 |
+
|
378 |
+
![SauerkrautLM](https://vago-solutions.de/wp-content/uploads/2023/11/hero.png "SauerkrautLM-7b-HerO")
|
379 |
+
## VAGO solutions SauerkrautLM-7b-HerO
|
380 |
+
Introducing **SauerkrautLM-7b-HerO** – the pinnacle of German language model technology!
|
381 |
+
Crafted through the **merging** of **[Teknium's OpenHermes-2.5-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B)** and **[Open-Orca's Mistral-7B-OpenOrca](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca)** and **uniquely fine-tuned with the Sauerkraut dataset.**
|
382 |
+
SauerkrautLM-7b-HerO represents a breakthrough in language modeling, achieving an optimal balance between extensive German data and essential international sources.
|
383 |
+
This ensures the model not only excels in understanding the nuances of the German language but also retains its global capabilities.
|
384 |
+
Harnessing the innovative power of the **gradient SLERP method from MergeKit**, we've achieved a groundbreaking fusion of two of the most best performing 7B models based on the Mistral framework.
|
385 |
+
This merge has allowed us to combine the best features of both models, creating an unparalleled synergy.
|
386 |
+
Coupled with the German Sauerkraut dataset, which consists of a mix of augmented and translated data, we have successfully taught the English-speaking merged model the intricacies of the German language.
|
387 |
+
This was achieved *without the typical loss of core competencies often associated with fine-tuning in another language of models previously trained mainly in English.*
|
388 |
+
Our approach ensures that the model retains its original strengths while acquiring a profound understanding of German, **setting a new benchmark in bilingual language model proficiency.**
|
389 |
+
|
390 |
+
# Table of Contents
|
391 |
+
1. [Overview of all Her0 models](#all-hero-models)
|
392 |
+
2. [Model Details](#model-details)
|
393 |
+
- [Prompt template](#prompt-template)
|
394 |
+
- [Training Dataset](#training-dataset)
|
395 |
+
- [Merge Procedure](#merge-procedure)
|
396 |
+
3. [Evaluation](#evaluation)
|
397 |
+
- [GPT4ALL](#gpt4all)
|
398 |
+
- [Language Model evaluation Harness](#language-model-evaluation-harness)
|
399 |
+
- [BigBench](#big-bench)
|
400 |
+
- [MMLU](#mmlu)
|
401 |
+
- [TruthfulQA](#truthfulqa)
|
402 |
+
- [MT-Bench (German)](#mt-bench-german)
|
403 |
+
- [MT-Bench (English)](#mt-bench-english)
|
404 |
+
- [Additional German Benchmark results](#additional-german-benchmark-results)
|
405 |
+
5. [Disclaimer](#disclaimer)
|
406 |
+
6. [Contact](#contact)
|
407 |
+
7. [Collaborations](#collaborations)
|
408 |
+
8. [Acknowledgement](#acknowledgement)
|
409 |
+
|
410 |
+
|
411 |
+
## All HerO Models
|
412 |
+
|
413 |
+
| Model | HF | GPTQ | GGUF | AWQ |
|
414 |
+
|-------|-------|-------|-------|-------|
|
415 |
+
| SauerkrautLM-7b-HerO | [Link](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-HerO) | coming soon | coming soon | coming soon |
|
416 |
+
|
417 |
+
## Model Details
|
418 |
+
**SauerkrautLM-7b-HerO**
|
419 |
+
- **Model Type:** SauerkrautLM-7b-HerO is an auto-regressive language model based on the transformer architecture
|
420 |
+
- **Language(s):** English, German
|
421 |
+
- **License:** APACHE 2.0
|
422 |
+
- **Contact:** [Website](https://vago-solutions.de/#Kontakt) [David Golchinfar](mailto:[email protected])
|
423 |
+
|
424 |
+
### Training Dataset:
|
425 |
+
|
426 |
+
SauerkrautLM-7b-HerO was trained with mix of German data augmentation and translated data.
|
427 |
+
We found, that only a simple translation of training data can lead to unnatural German phrasings.
|
428 |
+
Data augmentation techniques were used to grant grammatical, syntactical correctness and a more natural German wording in our training data.
|
429 |
+
|
430 |
+
### Merge Procedure:
|
431 |
+
|
432 |
+
SauerkrautLM-7b-HerO was merged on 1 A100 with [mergekit](https://github.com/cg123/mergekit).
|
433 |
+
The merged model contains [OpenHermes-2.5-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B) and [Open-Orca/Mistral-7B-OpenOrca](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca).
|
434 |
+
We applied the gradient SLERP method.
|
435 |
+
|
436 |
+
|
437 |
+
|
438 |
+
### Prompt Template:
|
439 |
+
```
|
440 |
+
<|im_start|>system
|
441 |
+
Du bist Sauerkraut-HerO, ein großes Sprachmodell, das höflich und kompetent antwortet. Schreibe deine Gedanken Schritt für Schritt auf, um Probleme sinnvoll zu lösen.<|im_end|>
|
442 |
+
<|im_start|>user
|
443 |
+
Wie geht es dir?<|im_end|>
|
444 |
+
<|im_start|>assistant
|
445 |
+
Mir geht es gut!<|im_end|>
|
446 |
+
<|im_start|>user
|
447 |
+
Bitte erkläre mir, wie die Zusammenführung von Modellen durch bestehende Spitzenmodelle profitieren kann.<|im_end|>
|
448 |
+
<|im_start|>assistant
|
449 |
+
```
|
450 |
+
## Evaluation
|
451 |
+
|
452 |
+
### GPT4ALL:
|
453 |
+
*Compared to relevant German Closed and Open Source models*
|
454 |
+
![GPT4ALL diagram](https://vago-solutions.de/wp-content/uploads/2023/11/GPT4All.png "SauerkrautLM-7b-HerO GPT4ALL Diagram")
|
455 |
+
|
456 |
+
![GPT4ALL table](https://vago-solutions.de/wp-content/uploads/2023/11/GPT4All-Tabelle.png "SauerkrautLM-7b-HerO GPT4ALL Table")
|
457 |
+
|
458 |
+
### Language Model evaluation Harness:
|
459 |
+
*Compared to Aleph Alpha Luminous Models*
|
460 |
+
![Harness](https://vago-solutions.de/wp-content/uploads/2023/11/Luminous-comparison.png "SauerkrautLM-7b-HerO Harness")
|
461 |
+
|
462 |
+
**performed with newest Language Model Evaluation Harness*
|
463 |
+
### Big Bench:
|
464 |
+
![BBH](https://vago-solutions.de/wp-content/uploads/2023/11/BigBench.png "SauerkrautLM-7b-HerO BBH")
|
465 |
+
**performed with newest Language Model Evaluation Harness*
|
466 |
+
|
467 |
+
### MMLU:
|
468 |
+
*Compared to Big Boy LLMs (Grok0,Grok1,GPT3.5,GPT4)*
|
469 |
+
![MMLU](https://vago-solutions.de/wp-content/uploads/2023/11/MMLU-Benchmark.png "SauerkrautLM-7b-HerO MMLU")
|
470 |
+
### TruthfulQA:
|
471 |
+
*Compared to OpenAI Models (GPT3.5,GPT4)*
|
472 |
+
![TruthfulQA](https://vago-solutions.de/wp-content/uploads/2023/11/Truthfulqa-Benchmark.png "SauerkrautLM-7b-HerO TruthfulQA")
|
473 |
+
|
474 |
+
### MT-Bench (German):
|
475 |
+
![MT-Bench German Diagram](https://vago-solutions.de/wp-content/uploads/2023/11/MT-Bench-German.png "SauerkrautLM-7b-HerO MT-Bench German Diagram")
|
476 |
+
```
|
477 |
+
########## First turn ##########
|
478 |
+
score
|
479 |
+
model turn
|
480 |
+
SauerkrautLM-70b-v1 1 7.25000
|
481 |
+
SauerkrautLM-7b-HerO <--- 1 6.96875
|
482 |
+
SauerkrautLM-7b-v1-mistral 1 6.30625
|
483 |
+
leo-hessianai-13b-chat 1 6.18750
|
484 |
+
SauerkrautLM-13b-v1 1 6.16250
|
485 |
+
leo-mistral-hessianai-7b-chat 1 6.15625
|
486 |
+
Llama-2-70b-chat-hf 1 6.03750
|
487 |
+
vicuna-13b-v1.5 1 5.80000
|
488 |
+
SauerkrautLM-7b-v1 1 5.65000
|
489 |
+
leo-hessianai-7b-chat 1 5.52500
|
490 |
+
vicuna-7b-v1.5 1 5.42500
|
491 |
+
Mistral-7B-v0.1 1 5.37500
|
492 |
+
SauerkrautLM-3b-v1 1 3.17500
|
493 |
+
Llama-2-7b 1 1.28750
|
494 |
+
open_llama_3b_v2 1 1.68750
|
495 |
+
|
496 |
+
########## Second turn ##########
|
497 |
+
score
|
498 |
+
model turn
|
499 |
+
SauerkrautLM-70b-v1 2 6.83125
|
500 |
+
SauerkrautLM-7b-HerO <--- 2 6.30625
|
501 |
+
vicuna-13b-v1.5 2 5.63125
|
502 |
+
SauerkrautLM-13b-v1 2 5.34375
|
503 |
+
SauerkrautLM-7b-v1-mistral 2 5.26250
|
504 |
+
leo-mistral-hessianai-7b-chat 2 4.99375
|
505 |
+
SauerkrautLM-7b-v1 2 4.73750
|
506 |
+
leo-hessianai-13b-chat 2 4.71250
|
507 |
+
vicuna-7b-v1.5 2 4.67500
|
508 |
+
Llama-2-70b-chat-hf 2 4.66250
|
509 |
+
Mistral-7B-v0.1 2 4.53750
|
510 |
+
leo-hessianai-7b-chat 2 2.65000
|
511 |
+
SauerkrautLM-3b-v1 2 1.98750
|
512 |
+
open_llama_3b_v2 2 1.22500
|
513 |
+
Llama-2-7b 2 1.07500
|
514 |
+
|
515 |
+
########## Average ##########
|
516 |
+
score
|
517 |
+
model
|
518 |
+
SauerkrautLM-70b-v1 7.040625
|
519 |
+
SauerkrautLM-7b-HerO <--- 6.637500
|
520 |
+
SauerkrautLM-7b-v1-mistral 5.784375
|
521 |
+
SauerkrautLM-13b-v1 5.753125
|
522 |
+
vicuna-13b-v1.5 5.715625
|
523 |
+
leo-mistral-hessianai-7b-chat 5.575000
|
524 |
+
leo-hessianai-13b-chat 5.450000
|
525 |
+
Llama-2-70b-chat-hf 5.350000
|
526 |
+
SauerkrautLM-v1-7b 5.193750
|
527 |
+
vicuna-7b-v1.5 5.050000
|
528 |
+
Mistral-7B-v0.1 4.956250
|
529 |
+
leo-hessianai-7b-chat 4.087500
|
530 |
+
SauerkrautLM-3b-v1 2.581250
|
531 |
+
open_llama_3b_v2 1.456250
|
532 |
+
Llama-2-7b 1.181250
|
533 |
+
```
|
534 |
+
**performed with the newest FastChat Version*
|
535 |
+
### MT-Bench (English):
|
536 |
+
![MT-Bench English Diagram](https://vago-solutions.de/wp-content/uploads/2023/11/MT-Bench-English.png "SauerkrautLM-7b-HerO MT-Bench English Diagram")
|
537 |
+
```
|
538 |
+
########## First turn ##########
|
539 |
+
score
|
540 |
+
model turn
|
541 |
+
OpenHermes-2.5-Mistral-7B 1 8.21875
|
542 |
+
SauerkrautLM-7b-HerO <--- 1 8.03125
|
543 |
+
Mistral-7B-OpenOrca 1 7.65625
|
544 |
+
neural-chat-7b-v3-1 1 7.22500
|
545 |
+
|
546 |
+
########## Second turn ##########
|
547 |
+
score
|
548 |
+
model turn
|
549 |
+
OpenHermes-2.5-Mistral-7B 2 7.1000
|
550 |
+
SauerkrautLM-7b-HerO <--- 2 6.7875
|
551 |
+
neural-chat-7b-v3-1 2 6.4000
|
552 |
+
Mistral-7B-OpenOrca 2 6.1750
|
553 |
+
|
554 |
+
########## Average ##########
|
555 |
+
score
|
556 |
+
model
|
557 |
+
OpenHermes-2.5-Mistral-7B 7.659375
|
558 |
+
SauerkrautLM-7b-HerO <--- 7.409375
|
559 |
+
Mistral-7B-OpenOrca 6.915625
|
560 |
+
neural-chat-7b-v3-1 6.812500
|
561 |
+
```
|
562 |
+
**performed with the newest FastChat Version*
|
563 |
+
|
564 |
+
### Additional German Benchmark results:
|
565 |
+
![GermanBenchmarks](https://vago-solutions.de/wp-content/uploads/2023/11/German-benchmarks.png "SauerkrautLM-7b-HerO German Benchmarks")
|
566 |
+
*performed with newest Language Model Evaluation Harness
|
567 |
+
## Disclaimer
|
568 |
+
We must inform users that despite our best efforts in data cleansing, the possibility of uncensored content slipping through cannot be entirely ruled out.
|
569 |
+
However, we cannot guarantee consistently appropriate behavior. Therefore, if you encounter any issues or come across inappropriate content, we kindly request that you inform us through the contact information provided.
|
570 |
+
Additionally, it is essential to understand that the licensing of these models does not constitute legal advice. We are not held responsible for the actions of third parties who utilize our models. These models may be employed for commercial purposes, and the Apache 2.0 remains applicable and is included with the model files.
|
571 |
+
|
572 |
+
## Contact
|
573 |
+
If you are interested in customized LLMs for business applications, please get in contact with us via our website or contact us at [Dr. Daryoush Vaziri](mailto:[email protected]). We are also grateful for your feedback and suggestions.
|
574 |
+
|
575 |
+
## Collaborations
|
576 |
+
We are also keenly seeking support and investment for our startup, VAGO solutions, where we continuously advance the development of robust language models designed to address a diverse range of purposes and requirements. If the prospect of collaboratively navigating future challenges excites you, we warmly invite you to reach out to us.
|
577 |
+
|
578 |
+
## Acknowledgement
|
579 |
+
Many thanks to [OpenOrca](https://huggingface.co/Open-Orca) and [teknium](https://huggingface.co/teknium) for providing such valuable models to the Open-Source community.
|
580 |
+
|
581 |
+
|
582 |
+
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|