TheBloke commited on
Commit
779d1e6
1 Parent(s): c4c2121

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +442 -0
README.md ADDED
@@ -0,0 +1,442 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: VAGOsolutions/SauerkrautLM-7b-v1
3
+ inference: false
4
+ language:
5
+ - de
6
+ - en
7
+ library_name: transformers
8
+ license: llama2
9
+ model_creator: VAGO solutions
10
+ model_name: SauerkrautLM 7B v1
11
+ model_type: llama
12
+ pipeline_tag: text-generation
13
+ prompt_template: "Ein Chat zwischen einem Benutzer und einem KI-Assistenten. Der KI-Assistent\
14
+ \ gibt hilfreiche, detaillierte und h\xF6fliche Antworten. \nUser: {prompt} \nAssistant:\n"
15
+ quantized_by: TheBloke
16
+ ---
17
+
18
+ <!-- header start -->
19
+ <!-- 200823 -->
20
+ <div style="width: auto; margin-left: auto; margin-right: auto">
21
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
22
+ </div>
23
+ <div style="display: flex; justify-content: space-between; width: 100%;">
24
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
25
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
26
+ </div>
27
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
28
+ <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>
29
+ </div>
30
+ </div>
31
+ <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>
32
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
33
+ <!-- header end -->
34
+
35
+ # SauerkrautLM 7B v1 - GPTQ
36
+ - Model creator: [VAGO solutions](https://huggingface.co/VAGOsolutions)
37
+ - Original model: [SauerkrautLM 7B v1](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-v1)
38
+
39
+ <!-- description start -->
40
+ ## Description
41
+
42
+ This repo contains GPTQ model files for [VAGO solutions's SauerkrautLM 7B v1](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-v1).
43
+
44
+ Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
45
+
46
+ <!-- description end -->
47
+ <!-- repositories-available start -->
48
+ ## Repositories available
49
+
50
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-AWQ)
51
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GPTQ)
52
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GGUF)
53
+ * [VAGO solutions's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-v1)
54
+ <!-- repositories-available end -->
55
+
56
+ <!-- prompt-template start -->
57
+ ## Prompt template: Sauerkraut
58
+
59
+ ```
60
+ Ein Chat zwischen einem Benutzer und einem KI-Assistenten. Der KI-Assistent gibt hilfreiche, detaillierte und höfliche Antworten.
61
+ User: {prompt}
62
+ Assistant:
63
+
64
+ ```
65
+
66
+ <!-- prompt-template end -->
67
+
68
+
69
+ <!-- README_GPTQ.md-provided-files start -->
70
+ ## Provided files, and GPTQ parameters
71
+
72
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
73
+
74
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
75
+
76
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
77
+
78
+ <details>
79
+ <summary>Explanation of GPTQ parameters</summary>
80
+
81
+ - Bits: The bit size of the quantised model.
82
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
83
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
84
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
85
+ - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
86
+ - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
87
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
88
+
89
+ </details>
90
+
91
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
92
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
93
+ | [main](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [German Quad](https://huggingface.co/datasets/deepset/germanquad) | 4096 | 3.90 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
94
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [German Quad](https://huggingface.co/datasets/deepset/germanquad) | 4096 | 4.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
95
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [German Quad](https://huggingface.co/datasets/deepset/germanquad) | 4096 | 7.01 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
96
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [German Quad](https://huggingface.co/datasets/deepset/germanquad) | 4096 | 7.16 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
97
+ | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [German Quad](https://huggingface.co/datasets/deepset/germanquad) | 4096 | 7.62 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
98
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [German Quad](https://huggingface.co/datasets/deepset/germanquad) | 4096 | 4.02 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
99
+
100
+ <!-- README_GPTQ.md-provided-files end -->
101
+
102
+ <!-- README_GPTQ.md-download-from-branches start -->
103
+ ## How to download, including from branches
104
+
105
+ ### In text-generation-webui
106
+
107
+ To download from the `main` branch, enter `TheBloke/SauerkrautLM-7B-v1-GPTQ` in the "Download model" box.
108
+
109
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/SauerkrautLM-7B-v1-GPTQ:gptq-4bit-32g-actorder_True`
110
+
111
+ ### From the command line
112
+
113
+ I recommend using the `huggingface-hub` Python library:
114
+
115
+ ```shell
116
+ pip3 install huggingface-hub
117
+ ```
118
+
119
+ To download the `main` branch to a folder called `SauerkrautLM-7B-v1-GPTQ`:
120
+
121
+ ```shell
122
+ mkdir SauerkrautLM-7B-v1-GPTQ
123
+ huggingface-cli download TheBloke/SauerkrautLM-7B-v1-GPTQ --local-dir SauerkrautLM-7B-v1-GPTQ --local-dir-use-symlinks False
124
+ ```
125
+
126
+ To download from a different branch, add the `--revision` parameter:
127
+
128
+ ```shell
129
+ mkdir SauerkrautLM-7B-v1-GPTQ
130
+ huggingface-cli download TheBloke/SauerkrautLM-7B-v1-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir SauerkrautLM-7B-v1-GPTQ --local-dir-use-symlinks False
131
+ ```
132
+
133
+ <details>
134
+ <summary>More advanced huggingface-cli download usage</summary>
135
+
136
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Huggingface cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.
137
+
138
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
139
+
140
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
141
+
142
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
143
+
144
+ ```shell
145
+ pip3 install hf_transfer
146
+ ```
147
+
148
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
149
+
150
+ ```shell
151
+ mkdir SauerkrautLM-7B-v1-GPTQ
152
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/SauerkrautLM-7B-v1-GPTQ --local-dir SauerkrautLM-7B-v1-GPTQ --local-dir-use-symlinks False
153
+ ```
154
+
155
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
156
+ </details>
157
+
158
+ ### With `git` (**not** recommended)
159
+
160
+ To clone a specific branch with `git`, use a command like this:
161
+
162
+ ```shell
163
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/SauerkrautLM-7B-v1-GPTQ
164
+ ```
165
+
166
+ Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.)
167
+
168
+ <!-- README_GPTQ.md-download-from-branches end -->
169
+ <!-- README_GPTQ.md-text-generation-webui start -->
170
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
171
+
172
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
173
+
174
+ 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.
175
+
176
+ 1. Click the **Model tab**.
177
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/SauerkrautLM-7B-v1-GPTQ`.
178
+ - To download from a specific branch, enter for example `TheBloke/SauerkrautLM-7B-v1-GPTQ:gptq-4bit-32g-actorder_True`
179
+ - see Provided Files above for the list of branches for each option.
180
+ 3. Click **Download**.
181
+ 4. The model will start downloading. Once it's finished it will say "Done".
182
+ 5. In the top left, click the refresh icon next to **Model**.
183
+ 6. In the **Model** dropdown, choose the model you just downloaded: `SauerkrautLM-7B-v1-GPTQ`
184
+ 7. The model will automatically load, and is now ready for use!
185
+ 8. 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.
186
+ * Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
187
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
188
+
189
+ <!-- README_GPTQ.md-text-generation-webui end -->
190
+
191
+ <!-- README_GPTQ.md-use-from-tgi start -->
192
+ ## Serving this model from Text Generation Inference (TGI)
193
+
194
+ It's recommended to use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
195
+
196
+ Example Docker parameters:
197
+
198
+ ```shell
199
+ --model-id TheBloke/SauerkrautLM-7B-v1-GPTQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
200
+ ```
201
+
202
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
203
+
204
+ ```shell
205
+ pip3 install huggingface-hub
206
+ ```
207
+
208
+ ```python
209
+ from huggingface_hub import InferenceClient
210
+
211
+ endpoint_url = "https://your-endpoint-url-here"
212
+
213
+ prompt = "Tell me about AI"
214
+ prompt_template=f'''Ein Chat zwischen einem Benutzer und einem KI-Assistenten. Der KI-Assistent gibt hilfreiche, detaillierte und höfliche Antworten.
215
+ User: {prompt}
216
+ Assistant:
217
+ '''
218
+
219
+ client = InferenceClient(endpoint_url)
220
+ response = client.text_generation(prompt,
221
+ max_new_tokens=128,
222
+ do_sample=True,
223
+ temperature=0.7,
224
+ top_p=0.95,
225
+ top_k=40,
226
+ repetition_penalty=1.1)
227
+
228
+ print(f"Model output: {response}")
229
+ ```
230
+ <!-- README_GPTQ.md-use-from-tgi end -->
231
+ <!-- README_GPTQ.md-use-from-python start -->
232
+ ## How to use this GPTQ model from Python code
233
+
234
+ ### Install the necessary packages
235
+
236
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
237
+
238
+ ```shell
239
+ pip3 install transformers optimum
240
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
241
+ ```
242
+
243
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
244
+
245
+ ```shell
246
+ pip3 uninstall -y auto-gptq
247
+ git clone https://github.com/PanQiWei/AutoGPTQ
248
+ cd AutoGPTQ
249
+ git checkout v0.4.2
250
+ pip3 install .
251
+ ```
252
+
253
+ ### You can then use the following code
254
+
255
+ ```python
256
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
257
+
258
+ model_name_or_path = "TheBloke/SauerkrautLM-7B-v1-GPTQ"
259
+ # To use a different branch, change revision
260
+ # For example: revision="gptq-4bit-32g-actorder_True"
261
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
262
+ device_map="auto",
263
+ trust_remote_code=False,
264
+ revision="main")
265
+
266
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
267
+
268
+ prompt = "Tell me about AI"
269
+ prompt_template=f'''Ein Chat zwischen einem Benutzer und einem KI-Assistenten. Der KI-Assistent gibt hilfreiche, detaillierte und höfliche Antworten.
270
+ User: {prompt}
271
+ Assistant:
272
+ '''
273
+
274
+ print("\n\n*** Generate:")
275
+
276
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
277
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
278
+ print(tokenizer.decode(output[0]))
279
+
280
+ # Inference can also be done using transformers' pipeline
281
+
282
+ print("*** Pipeline:")
283
+ pipe = pipeline(
284
+ "text-generation",
285
+ model=model,
286
+ tokenizer=tokenizer,
287
+ max_new_tokens=512,
288
+ do_sample=True,
289
+ temperature=0.7,
290
+ top_p=0.95,
291
+ top_k=40,
292
+ repetition_penalty=1.1
293
+ )
294
+
295
+ print(pipe(prompt_template)[0]['generated_text'])
296
+ ```
297
+ <!-- README_GPTQ.md-use-from-python end -->
298
+
299
+ <!-- README_GPTQ.md-compatibility start -->
300
+ ## Compatibility
301
+
302
+ The files provided are tested to work with AutoGPTQ, both via Transformers and using AutoGPTQ directly. They should also work with [Occ4m's GPTQ-for-LLaMa fork](https://github.com/0cc4m/KoboldAI).
303
+
304
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama and Mistral models in 4-bit. Please see the Provided Files table above for per-file compatibility.
305
+
306
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
307
+ <!-- README_GPTQ.md-compatibility end -->
308
+
309
+ <!-- footer start -->
310
+ <!-- 200823 -->
311
+ ## Discord
312
+
313
+ For further support, and discussions on these models and AI in general, join us at:
314
+
315
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
316
+
317
+ ## Thanks, and how to contribute
318
+
319
+ Thanks to the [chirper.ai](https://chirper.ai) team!
320
+
321
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
322
+
323
+ 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.
324
+
325
+ 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.
326
+
327
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
328
+
329
+ * Patreon: https://patreon.com/TheBlokeAI
330
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
331
+
332
+ **Special thanks to**: Aemon Algiz.
333
+
334
+ **Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski
335
+
336
+
337
+ Thank you to all my generous patrons and donaters!
338
+
339
+ And thank you again to a16z for their generous grant.
340
+
341
+ <!-- footer end -->
342
+
343
+ # Original model card: VAGO solutions's SauerkrautLM 7B v1
344
+
345
+
346
+ ![SauerkrautLM](images/SauerkrautLM.png "SauerkrautLM")
347
+ ## VAGO solutions SauerkrautLM
348
+ Introducing SauerkrautLM-v1 - Your German Language Powerhouse!
349
+
350
+ We are thrilled to unveil our **very first release**, **SauerkrautLM-v1**. This remarkable creation marks a significant milestone as it is specifically **tailored for the German-speaking community**. In a landscape where German language models are scarce, we are proud to offer a solution that fills this void.
351
+ What sets SauerkrautLM-v1 apart is its versatility. Whether you are an individual looking to harness its capabilities for personal use or a business seeking to integrate it into your projects, our model is designed to accommodate all. It operates under the LLAMA 2 License, providing you with the freedom to explore its potential in both private and commercial applications.
352
+ Performance is at the heart of SauerkrautLM-v1. We put it to the **test using a customized version of MT-Bench for the German language**, and the results speak volumes. It currently stands as the most robust German Language Model on Hugging Face (based on german mt-bench results), showcasing its exceptional capabilities. Rest assured, this model is here to shine and set new standards. And the best thing is it comes in three different sizes (3B, 7B, 13B) to address your individual needs.
353
+ Our model's journey began with meticulous training using an **augmented dataset within the QLoRA approach**. This is just the beginning of our model series, promising even more innovative and powerful solutions in the future.
354
+
355
+ Join us on this exciting adventure as we redefine the possibilities of language modeling for the German-speaking world.
356
+ SauerkrautLM-v1 is here to empower your language-related endeavors like never before.
357
+
358
+ ## All Models
359
+
360
+ | Model | HF | GPTQ | GGUF |
361
+ |-------|-------|-------|-------|
362
+ | SauerkrautLM-3b-v1 | [Link](https://huggingface.co/VAGOsolutions/SauerkrautLM-3b-v1) | soon | soon |
363
+ | SauerkrautLM-7b-v1 | [Link](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-v1) | soon | soon |
364
+ | SauerkrautLM-7b-v1-mistral | [Link](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-v1-mistral) | soon | soon |
365
+ | SauerkrautLM-13b-v1 | [Link](https://huggingface.co/VAGOsolutions/SauerkrautLM-13b-v1) | soon | soon |
366
+
367
+ ## Model Details
368
+ **SauerkrautLM-7b-v1**
369
+
370
+ **Training Dataset:**
371
+
372
+ SauerkrautLM was trained with mix of German data augmentation and translated data.
373
+ We found, that only a simple translation of training data can lead to unnatural German phrasings.
374
+ Data augmentation techniques were used to grant grammatical, syntactical correctness and a more natural German wording in our training data.
375
+
376
+ **Training Procedure:**
377
+
378
+ SauerkrautLM-7b-v1 was fine-tuned using QLoRA on 1 A100 80GB with Axolotl.
379
+
380
+ - **Trained by:** SauerkrautLM-v1 trained by VAGO solutions
381
+ - **Model Type:** SauerkrautLM-v1 is an auto-regressive language model based on the transformer architecture
382
+ - **Language(s):** German, English
383
+ - **License:** [LLAMA 2 COMMUNITY LICENSE AGREEMENT](https://huggingface.co/meta-llama/Llama-2-70b/raw/main/LICENSE.txt)
384
+ - **Contact:** [Website](https://vago-solutions.de/#Kontakt) [David Golchinfar](mailto:golchinfar@vago-solutions.de)
385
+
386
+ **Prompt Template:**
387
+
388
+ ```
389
+ Ein Chat zwischen einem Benutzer und einem KI-Assistenten. Der KI-Assistent gibt hilfreiche, detaillierte und höfliche Antworten.
390
+ User: {prompt}
391
+ Assistant:
392
+ ```
393
+
394
+ ## Evaluation
395
+ **[MT-Bench-TrueGerman](https://huggingface.co/datasets/VAGOsolutions/MT-Bench-TrueGerman)**
396
+
397
+ ![First Turn](images/FirstTurn.PNG "First Turn")
398
+ ![Second Turn](images/SecondTurn.PNG "Second Turn")
399
+ ![Average](images/Average.PNG "Average")
400
+
401
+ ![Category Scores](images/SauerkrautLM-7b.png "Category Scores")
402
+ ![Category Plot](images/SauerkrautLM-7b-v1.png "Category Plot")
403
+
404
+ ## MT-Bench-TrueGerman Response Example
405
+
406
+ **SauerkrautLM-7b-v1**
407
+
408
+ **Prompt**
409
+ > Stellen Sie sich vor, Sie verfassen einen Blogbeitrag, in dem Sie zwei beliebte Smartphone-Modelle vergleichen. Entwickeln Sie eine Gliederung für den Blogbeitrag, einschließlich der Hauptpunkte und Unterkapitel, um die Merkmale, die Leistung und die Benutzererfahrung der beiden Modelle effektiv zu vergleichen und gegenüberzustellen. Bitte antworten Sie in weniger als 200 Wörtern.", "Nehmen Sie Ihre vorherige Antwort und formulieren Sie sie als Limerick um.
410
+
411
+ **Antwort SauerkrautLM-7b-v1:**
412
+ ```
413
+ Titel: Vergleich von Smartphones: iPhone 13 Pro Max vs. Galaxy S22 Ultra\n\nEinleitung\nIn diesem Blogbeitrag werden wir zwei beliebte Smartphone-Modelle, das iPhone 13 Pro Max und die Galaxy S22 Ultra, vergleichen. Diese beiden Geräte zeichnen sich durch innovative Merkmale, beeindruckende Leistung und eine überlegene Benutzererfahrung aus.\n\nTeil 1: Design\n- Das iPhone 13 Pro Max bietet ein modernes und elegantes Design mit einem Glas-Metallrahmen, während die Galaxy S22 Ultra ein minimalistischerer Ansatz mit einem Glas-Maske-Design verwendet.\n- Beide Geräte verfügen über eine hohe Bildschirmdichte, jedoch ist das AMOLED-Display der Galaxy S22 Ultra für eine bessere Farbtiefe und Helligkeit bekannt.\n- Die Größe der Bildschirme variiert zwischen den beiden Modellen, mit dem iPhone 13 Pro Max eine etwas kleinere 6,7 Zoll und der Galaxy S22 Ultra eine leistungsfähigere 6,5 Zoll.\n\nTeil 2: Leistung\n- Beide Geräte verfügen über hohe Leistungsmerkmale und bieten eine schnelle Leistung, aber die Entscheidungsfindung hängt von persönlichen Vorlieben und Anwendungsbereich ab.\n- Der neue A15 Bionic Chip im iPhone 13 Pro Max ist leistungsstärker als der Snapdragon 888 in der Galaxy S22 Ultra.\n- Die Akkulebenszeit variiert je nach Nutzung und Verbrauch, aber das iPhone 13 Pro Max hat im Vergleich zu seiner Vorgängerversion einen größeren Akku.\n\nTeil 3: Kamera\n- Beide Geräte bieten hochwertige Kameraeinstellungen und hochauflösende Bildqualität.\n- Der iPhone 13 Pro Max verfügt über eine 12-MP-Sucher und eine 12-MP-Ultraweitwinkelkamera, während die Galaxy S22 Ultra eine 50-MP-Primärkamera und eine 10-MP-Ultraweitwinkelkamera bietet.\n- Der Nachverfolgungsmodus der Galaxy S22 Ultra ist zudem für sich allein schneller und einfacher zu bedienen.\n\nTeil 4: Benutzererfahrung\n- Die Benutzeroberfläche des iPhone 13 Pro Max ist intuitiver und einfach zu bedienen, während die Galaxy S22 Ultra je nach Vorlieben der Nutzer eine individuelle Anpassung erfordern kann.\n- Die Nutzung von Apple-Diensten wie FaceTime und iCloud ist auf den iPhone 13 Pro Max bequemer, während die Nutzung von Samsung-Diensten auf der Galaxy S22 Ultra ein wenig komplexer sein kann.\n\nFazit\nOb du ein Fan von Apple- oder Samsung-Geräten bist, gibt es für beide Modelle in dieser Vergleichsrunde etwas, was dich begeistert. Der iPhone 13 Pro Max überzeugt mit seiner besseren Bildschirmdichte, der Galaxy S22 Ultra mit ihrer schnelleren Kamera und dem einfacheren Bedienungserlebnis. Letztendlich hängt die Wahl vom persönlichen Vorlieben und Anwendungsbereich ab.","In einer Welt, in der Smartphones wachsen und gedeihen,\nLiegt das Vergleichsspiel, wo zwei Herrschaften kämpfen.\nEin iPhone mit einem Max,\nUnd eine Galaxy, so scharf,\nMit einer Kamera, die alle fesseln wird!
414
+ ```
415
+
416
+ **Prompt**
417
+ > Sie sehen ein schönes rotes Haus auf Ihrer linken Seite und ein faszinierendes Gewächshaus auf Ihrer rechten Seite, einen attraktiven beheizten rosa Ort vor sich. Also, wo ist das Weiße Haus?", "Enthält die ursprüngliche Frage Hinweise, um den Standort des Weißen Hauses eindeutig zu bestimmen?"],"reference": ["Die Antwort ist \"Washington, DC\".", "Nein.
418
+
419
+ **Antwort SauerkrautLM-7b-v1:**
420
+ ```
421
+ Das Weiße Haus ist direkt in der Mitte zwischen dem roten und dem beheizten roten Ort.","Nein, die ursprüngliche Frage enthält keine direkten Hinweise, um den Standort des Weißen Hauses eindeutig zu bestimmen.
422
+ ```
423
+
424
+ **Prompt**
425
+ > Betrachten Sie einen Satelliten, der sich in einer kreisförmigen Umlaufbahn um die Erde befindet. Die Geschwindigkeit des Satelliten nimmt ab. Was wird mit dem orbitalen Radius des Satelliten und seiner Umlaufdauer passieren? Bitte rechtfertigen Sie Ihre Antwort unter Verwendung physikalischer Prinzipien.", "Was sind einige Sonderfälle oder Randfälle in Ihrer Lösung? Wie gehen Sie mit ihnen um?"] ,"reference": ["Der orbitale Radius wird zunehmen und die Umlaufdauer wird zunehmen
426
+
427
+ **Antwort SauerkrautLM-7b-v1:**
428
+ ```
429
+ Wenn ein Satellit sich in einer kreisförmigen Umlaufbahn um die Erde befindet, bewegt er sich mit einer konstanten Geschwindigkeit. Allerdings wird diese Geschwindigkeit im Laufe der Zeit aufgrund von Faktoren wie der Entfernung des Satelliten vom Erdmittelpunkt und der Gravitationskraft abnehmen.\n\nDurch die Abnahme der Geschwindigkeit des Satelliten verringert sich auch die Orbitalgeschwindigkeit. Gemäß dem sogenannten Kepler'schen Gesetz ändert sich die Geschwindigkeit eines Satelliten proportional zur Entfernung vom Zentrum der umlaufenden Umlaufbahn. Dadurch ändert sich auch die Umlaufdauer, da die Zeit, die der Satellit benötigt, um eine bestimmte Strecke zurückzulegen, proportional zur Geschwindigkeit und der Entfernung ist.\n\nDaher wird die Orbitalgeschwindigkeit des Satelliten aufgrund der Abnahme der Geschwindigkeit langsamer, und somit wird auch seine Umlaufdauer länger.","In meiner Lösung der Veränderung des Orbitalradius und der Umlaufdauer eines Satelliten müssen wir einige Sonderfälle und Randfälle berücksichtigen.\n\nEin Sonderfall ist zum Beispiel, wenn der Satellit in eine geostationäre Umlaufbahn um die Erde gelangen kann. In dieser Umlaufbahn befindet sich der Satellit in einer konstanten Höhenlage und scheint den Menschen aus der Erdatmosphäre ausgesetzt zu sein. Der Satellit dreht sich dabei jedoch nur um die Erde und betrachtet die Erde von der Brennkammer aus.\n\nIn diesem Fall bleibt der Orbitalradius des Satelliten konstant, da er immer eine höhere Position einnimmt und somit immer die gleiche Höhe beibehalten muss, um die Erde aufzubewahren. Die Umlaufdauer wird jedoch durch die Entfernung vom Erdmittelpunkt beeinflusst, da die Erde sich während der Umlaufzeit durch ihre Rotation weiterdreht. Da der Satellit sich immer in derselben Höhe befindet, ändert sich jedoch das Verhältnis von Umlaufzeit zu Umlaufdauer nur geringfügig.\n\nEin weiterer Sonderfall ist, wenn der Satellit in eine Polarumlaufbahn gelangen kann. In einer Polarumlaufbahn umkreist der Satellit die Erde in einer Höhe von etwa 500 Kilometern über dem Polarkreis. In dieser Umlaufbahn bleibt der Orbitalradius des Satelliten konstant, da er immer eine höhere Position einnimmt und somit immer die gleiche Höhe beibehalten muss, um die Erde aufzubewahren. Die Umlaufzeit wird jedoch je nach Abstand vom Erdmittelpunkt variieren, da die Gravitationskraft mit der Entfernung abnimmt.\n\nIm Falle der Polarumlaufbahn ändern sich die Umlaufzeit und der Orbitalradius des Satelliten aufgrund der Abnahme der Gravitationskraft. Je weiter der Satellit von der Erde entfernt ist, desto langsamer dreht er sich und desto weniger Gravitation wirkt sich auf ihn aus. Dadurch ändert sich das Verhältnis von Umlaufzeit zu Umlaufdauer und somit auch die Größe des Orbitalradii.\n\nIn den genannten Sonderfällen bleibt die Umgebung des Satelliten und seine Bewegung im Grunde unverändert. Allerdings ändert sich aufgrund der Variation von Gravitationskraft, Entfernung und Umlaufhöhe der Satellit seine Umlaufzeit und sein Orbitalradius.
430
+ ```
431
+
432
+
433
+ ## Disclaimer
434
+ Our models have been meticulously trained on extensive datasets. While we have made diligent efforts to thoroughly screen and eliminate any instances of coarse or inappropriate language from our data, we must inform users that despite our best efforts in data cleansing, the possibility of some such content slipping through cannot be entirely ruled out.
435
+ Furthermore, it is important to note that we have implemented filters within our models; however, we cannot always 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.
436
+ 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 original Llama2 license remains applicable and is included with the model files.
437
+  
438
+ ## Contact
439
+ 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:vaziri@vago-solutions.de). We are also grateful for your feedback and suggestions.
440
+  
441
+ ## Collaborations
442
+ 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.