TheBloke commited on
Commit
efd83f8
1 Parent(s): 7936cdf

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +416 -0
README.md ADDED
@@ -0,0 +1,416 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: jphme/em_german_leo_mistral
3
+ inference: false
4
+ language:
5
+ - de
6
+ library_name: transformers
7
+ license: apache-2.0
8
+ model_creator: Jan Philipp Harries
9
+ model_name: EM German Leo Mistral
10
+ model_type: mistral
11
+ pipeline_tag: text-generation
12
+ prompt_template: 'Du bist ein hilfreicher Assistent. USER: {prompt} ASSISTANT:
13
+
14
+ '
15
+ quantized_by: TheBloke
16
+ tags:
17
+ - pytorch
18
+ - german
19
+ - deutsch
20
+ - mistral
21
+ - leolm
22
+ ---
23
+
24
+ <!-- header start -->
25
+ <!-- 200823 -->
26
+ <div style="width: auto; margin-left: auto; margin-right: auto">
27
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
28
+ </div>
29
+ <div style="display: flex; justify-content: space-between; width: 100%;">
30
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
31
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
32
+ </div>
33
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
34
+ <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>
35
+ </div>
36
+ </div>
37
+ <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>
38
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
39
+ <!-- header end -->
40
+
41
+ # EM German Leo Mistral - GGUF
42
+ - Model creator: [Jan Philipp Harries](https://huggingface.co/jphme)
43
+ - Original model: [EM German Leo Mistral](https://huggingface.co/jphme/em_german_leo_mistral)
44
+
45
+ <!-- description start -->
46
+ ## Description
47
+
48
+ This repo contains GGUF format model files for [Jan Philipp Harries's EM German Leo Mistral](https://huggingface.co/jphme/em_german_leo_mistral).
49
+
50
+ <!-- description end -->
51
+ <!-- README_GGUF.md-about-gguf start -->
52
+ ### About GGUF
53
+
54
+ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
55
+
56
+ Here is an incomplate list of clients and libraries that are known to support GGUF:
57
+
58
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
59
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
60
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
61
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
62
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
63
+ * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
64
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
65
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
66
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
67
+
68
+ <!-- README_GGUF.md-about-gguf end -->
69
+ <!-- repositories-available start -->
70
+ ## Repositories available
71
+
72
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/em_german_leo_mistral-AWQ)
73
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/em_german_leo_mistral-GPTQ)
74
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF)
75
+ * [Jan Philipp Harries's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jphme/em_german_leo_mistral)
76
+ <!-- repositories-available end -->
77
+
78
+ <!-- prompt-template start -->
79
+ ## Prompt template: EmGerman
80
+
81
+ ```
82
+ Du bist ein hilfreicher Assistent. USER: {prompt} ASSISTANT:
83
+
84
+ ```
85
+
86
+ <!-- prompt-template end -->
87
+
88
+
89
+ <!-- compatibility_gguf start -->
90
+ ## Compatibility
91
+
92
+ These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
93
+
94
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
95
+
96
+ ## Explanation of quantisation methods
97
+ <details>
98
+ <summary>Click to see details</summary>
99
+
100
+ The new methods available are:
101
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
102
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
103
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
104
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
105
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
106
+
107
+ Refer to the Provided Files table below to see what files use which methods, and how.
108
+ </details>
109
+ <!-- compatibility_gguf end -->
110
+
111
+ <!-- README_GGUF.md-provided-files start -->
112
+ ## Provided files
113
+
114
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
115
+ | ---- | ---- | ---- | ---- | ---- | ----- |
116
+ | [em_german_leo_mistral.Q2_K.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q2_K.gguf) | Q2_K | 2 | 3.08 GB| 5.58 GB | smallest, significant quality loss - not recommended for most purposes |
117
+ | [em_german_leo_mistral.Q3_K_S.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q3_K_S.gguf) | Q3_K_S | 3 | 3.16 GB| 5.66 GB | very small, high quality loss |
118
+ | [em_german_leo_mistral.Q3_K_M.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q3_K_M.gguf) | Q3_K_M | 3 | 3.52 GB| 6.02 GB | very small, high quality loss |
119
+ | [em_german_leo_mistral.Q3_K_L.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q3_K_L.gguf) | Q3_K_L | 3 | 3.82 GB| 6.32 GB | small, substantial quality loss |
120
+ | [em_german_leo_mistral.Q4_0.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q4_0.gguf) | Q4_0 | 4 | 4.11 GB| 6.61 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
121
+ | [em_german_leo_mistral.Q4_K_S.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q4_K_S.gguf) | Q4_K_S | 4 | 4.14 GB| 6.64 GB | small, greater quality loss |
122
+ | [em_german_leo_mistral.Q4_K_M.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q4_K_M.gguf) | Q4_K_M | 4 | 4.37 GB| 6.87 GB | medium, balanced quality - recommended |
123
+ | [em_german_leo_mistral.Q5_0.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q5_0.gguf) | Q5_0 | 5 | 5.00 GB| 7.50 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
124
+ | [em_german_leo_mistral.Q5_K_S.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q5_K_S.gguf) | Q5_K_S | 5 | 5.00 GB| 7.50 GB | large, low quality loss - recommended |
125
+ | [em_german_leo_mistral.Q5_K_M.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q5_K_M.gguf) | Q5_K_M | 5 | 5.13 GB| 7.63 GB | large, very low quality loss - recommended |
126
+ | [em_german_leo_mistral.Q6_K.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q6_K.gguf) | Q6_K | 6 | 5.94 GB| 8.44 GB | very large, extremely low quality loss |
127
+ | [em_german_leo_mistral.Q8_0.gguf](https://huggingface.co/TheBloke/em_german_leo_mistral-GGUF/blob/main/em_german_leo_mistral.Q8_0.gguf) | Q8_0 | 8 | 7.70 GB| 10.20 GB | very large, extremely low quality loss - not recommended |
128
+
129
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
130
+
131
+
132
+
133
+ <!-- README_GGUF.md-provided-files end -->
134
+
135
+ <!-- README_GGUF.md-how-to-download start -->
136
+ ## How to download GGUF files
137
+
138
+ **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file.
139
+
140
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
141
+ - LM Studio
142
+ - LoLLMS Web UI
143
+ - Faraday.dev
144
+
145
+ ### In `text-generation-webui`
146
+
147
+ Under Download Model, you can enter the model repo: TheBloke/em_german_leo_mistral-GGUF and below it, a specific filename to download, such as: em_german_leo_mistral.Q4_K_M.gguf.
148
+
149
+ Then click Download.
150
+
151
+ ### On the command line, including multiple files at once
152
+
153
+ I recommend using the `huggingface-hub` Python library:
154
+
155
+ ```shell
156
+ pip3 install huggingface-hub
157
+ ```
158
+
159
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
160
+
161
+ ```shell
162
+ huggingface-cli download TheBloke/em_german_leo_mistral-GGUF em_german_leo_mistral.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
163
+ ```
164
+
165
+ <details>
166
+ <summary>More advanced huggingface-cli download usage</summary>
167
+
168
+ You can also download multiple files at once with a pattern:
169
+
170
+ ```shell
171
+ huggingface-cli download TheBloke/em_german_leo_mistral-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
172
+ ```
173
+
174
+ 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).
175
+
176
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
177
+
178
+ ```shell
179
+ pip3 install hf_transfer
180
+ ```
181
+
182
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
183
+
184
+ ```shell
185
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/em_german_leo_mistral-GGUF em_german_leo_mistral.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
186
+ ```
187
+
188
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
189
+ </details>
190
+ <!-- README_GGUF.md-how-to-download end -->
191
+
192
+ <!-- README_GGUF.md-how-to-run start -->
193
+ ## Example `llama.cpp` command
194
+
195
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
196
+
197
+ ```shell
198
+ ./main -ngl 32 -m em_german_leo_mistral.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Du bist ein hilfreicher Assistent. USER: {prompt} ASSISTANT:"
199
+ ```
200
+
201
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
202
+
203
+ Change `-c 2048` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically.
204
+
205
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
206
+
207
+ For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
208
+
209
+ ## How to run in `text-generation-webui`
210
+
211
+ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
212
+
213
+ ## How to run from Python code
214
+
215
+ You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries.
216
+
217
+ ### How to load this model in Python code, using ctransformers
218
+
219
+ #### First install the package
220
+
221
+ Run one of the following commands, according to your system:
222
+
223
+ ```shell
224
+ # Base ctransformers with no GPU acceleration
225
+ pip install ctransformers
226
+ # Or with CUDA GPU acceleration
227
+ pip install ctransformers[cuda]
228
+ # Or with AMD ROCm GPU acceleration (Linux only)
229
+ CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
230
+ # Or with Metal GPU acceleration for macOS systems only
231
+ CT_METAL=1 pip install ctransformers --no-binary ctransformers
232
+ ```
233
+
234
+ #### Simple ctransformers example code
235
+
236
+ ```python
237
+ from ctransformers import AutoModelForCausalLM
238
+
239
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
240
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/em_german_leo_mistral-GGUF", model_file="em_german_leo_mistral.Q4_K_M.gguf", model_type="mistral", gpu_layers=50)
241
+
242
+ print(llm("AI is going to"))
243
+ ```
244
+
245
+ ## How to use with LangChain
246
+
247
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
248
+
249
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
250
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
251
+
252
+ <!-- README_GGUF.md-how-to-run end -->
253
+
254
+ <!-- footer start -->
255
+ <!-- 200823 -->
256
+ ## Discord
257
+
258
+ For further support, and discussions on these models and AI in general, join us at:
259
+
260
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
261
+
262
+ ## Thanks, and how to contribute
263
+
264
+ Thanks to the [chirper.ai](https://chirper.ai) team!
265
+
266
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
267
+
268
+ 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.
269
+
270
+ 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.
271
+
272
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
273
+
274
+ * Patreon: https://patreon.com/TheBlokeAI
275
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
276
+
277
+ **Special thanks to**: Aemon Algiz.
278
+
279
+ **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
280
+
281
+
282
+ Thank you to all my generous patrons and donaters!
283
+
284
+ And thank you again to a16z for their generous grant.
285
+
286
+ <!-- footer end -->
287
+
288
+ <!-- original-model-card start -->
289
+ # Original model card: Jan Philipp Harries's EM German Leo Mistral
290
+
291
+ ![EM Logo](em_model_logo_web.jpeg)
292
+
293
+ In our opinion, this is the strongest open 7b model for German-language applications.
294
+
295
+ **Many thanks to the [LeoLM](https://huggingface.co/LeoLM) team for the publication of a base model that has received continued pretraining with German texts, greatly improving generation capabilities.**
296
+
297
+ *Please note that the Mistral architecture is very recent and still not supported by all libraries (e.g. AutoGPTQ). In case of any problems, please try a different format/base model.*
298
+
299
+ # Table of Contents
300
+
301
+ 1. [Introduction](#introduction)
302
+ 2. [Links & Demos](#links--demos)
303
+ - [Model Links](#model-links)
304
+ - [Demos](#demos)
305
+ 3. [Prompt Format](#prompt-format)
306
+ 4. [Example Output](#example-output)
307
+ 5. [Acknowledgements](#acknowledgements)
308
+ 6. [Contact](#contact)
309
+ 7. [Disclaimer](#disclaimer)
310
+
311
+ # Introduction
312
+
313
+ **EM German** is a Llama2/Mistral/LeoLM-based model family, finetuned on a large dataset of various instructions in German language. The models are optimized for German text, providing proficiency in understanding, generating, and interacting with German language content.
314
+
315
+ We offer versions based on 7b, 13b and 70b Llama-2, Mistral and LeoLM (Llama-2/Mistral with continued pretraining on German texts) models.
316
+
317
+ Please find all Informations, Example Outputs, the special RAG prompt format, output examples and eval results for the EM German Model family in [our Github Repository](https://github.com/jphme/EM_German). ([Deutsche Version](https://github.com/jphme/EM_German/blob/main/README_DE.md))
318
+
319
+
320
+ # Links & Demos
321
+
322
+ ## Model Links
323
+
324
+ Should you try only one model version, I strongly recommend the **LeoLM Mistral** model which offers by far the best combination of performance and computing requirements!
325
+
326
+ | Base Model | HF | GPTQ | GGUF | AWQ |
327
+ |-------|-------|-------|-------|-------|
328
+ | Llama2 7b | [Link](https://huggingface.co/jphme/em_german_7b_v01) | [Link](https://huggingface.co/TheBloke/em_german_7b_v01-GPTQ) | [Link](https://huggingface.co/TheBloke/em_german_7b_v01-GGUF) | [Link](https://huggingface.co/TheBloke/em_german_7b_v01-AWQ) |
329
+ | Llama2 13b | [Link](https://huggingface.co/jphme/em_german_13b_v01) | [Link](https://huggingface.co/TheBloke/em_german_13b_v01-GPTQ) | [Link](https://huggingface.co/TheBloke/em_german_13b_v01-GGUF) | [Link](https://huggingface.co/TheBloke/em_german_13b_v01-AWQ) |
330
+ | Llama2 70b | [Link](https://huggingface.co/jphme/em_german_70b_v01) | [Link](https://huggingface.co/TheBloke/em_german_70b_v01-GPTQ) | [Link](https://huggingface.co/TheBloke/em_german_70b_v01-GGUF) | [Link](https://huggingface.co/TheBloke/em_german_70b_v01-AWQ) |
331
+ | [Mistral 7b](https://huggingface.co/mistralai/Mistral-7B-v0.1) | [Link](https://huggingface.co/jphme/em_german_mistral_v01) | [Link](https://huggingface.co/TheBloke/em_german_mistral_v01-GPTQ) | [Link](https://huggingface.co/TheBloke/em_german_mistral_v01-GGUF) | [Link](https://huggingface.co/TheBloke/em_german_mistral_v01-AWQ) |
332
+ | [LeoLM 7b](https://huggingface.co/LeoLM/leo-hessianai-7b) | [Link](https://huggingface.co/jphme/em_german_7b_leo) | [Link](https://huggingface.co/jphme/em_german_7b_leo_gptq) | [Link](hhttps://huggingface.co/jphme/em_german_7b_leo_gguf) | tbc |
333
+ | [LeoLM 13b](https://huggingface.co/LeoLM/leo-hessianai-13b) | soon | soon | [Link](https://huggingface.co/jphme/em_german_13b_leo_gguf) | tbc |
334
+ | [LeoLM Mistral 7b](tbc) | [Link](https://huggingface.co/jphme/em_german_leo_mistral) | soon | [Link](https://huggingface.co/jphme/em_german_leo_mistral_gguf) | tbc |
335
+
336
+ ### Notes about the different versions:
337
+ See also the [comparison of example outputs](https://github.com/jphme/EM_German/blob/main/example_output_comparison.md) for a comparison of (7b) model capabilities.
338
+
339
+ If you get unsatisfying results with one or another EM German version, please try a different (and/or larger) model or version for your usecase.
340
+
341
+
342
+ ## Demos:
343
+
344
+ You can use some of the models with **free** google Colab instances (e.g. the 7bn model in 8bit or the 13b model with GPTQ):
345
+
346
+ * [Example Colab Notebook for 13b with GPTQ](https://colab.research.google.com/drive/1IJfJdVwGkfe5MYOqHptystR3FBeEUdGn?usp=sharing)
347
+ * [Example Colab Notebook for 7b with 8bit-Loading](https://colab.research.google.com/drive/1bsv6vkLM4AlCpSyXA6ol9P32zxZmf7Zu?usp=sharing)
348
+ * [Example Colab Notebook for 7b Mistral GGUF with Grammar-based structured output](https://colab.research.google.com/drive/17O-a3D4BnVc_V9Of3dFfed18v1ULu1Sv?usp=sharing)
349
+
350
+
351
+ # Prompt Format
352
+
353
+ This model follows the Vicuna format without linebreaks (but should work with linebreaks as well). The format is as follows:
354
+
355
+ ```
356
+ Du bist ein hilfreicher Assistent. USER: <instruction> ASSISTANT:
357
+ ```
358
+
359
+ You can swap the standard system prompt for a better suited one (see below for RAG-tasks).
360
+
361
+ # Example Output
362
+
363
+ Please find a selection of various example outputs for all 7b versions of EM German [here](https://github.com/jphme/EM_German/blob/main/example_output_comparison.md).
364
+
365
+ **Prompt:**
366
+ > Erkläre die Bedeutung von drei wesentlichen Elementen der Bilanzierung und des Accountings nach IFRS für Unternehmen, die auf internationaler Ebene tätig sind.
367
+
368
+ **Antwort EM German Leo Mistral 7b:**
369
+ ```
370
+ Die International Financial Reporting Standards (IFRS) sind eine Reihe von internationalen Rechnungslegungsstandards, die von der International Accounting Standards Board (IASB) entwickelt wurden. Sie sollen dazu beitragen, dass Finanzberichte vergleichbar, zuverlässig und relevant sind.
371
+
372
+ 1. Fair Value: Dieses Konzept ist ein zentraler Bestandteil der IFRS. Es besagt, dass Vermögenswerte und Schulden zum fairen Wert bilanziert werden sollten, was dem Preis entspricht, zu dem sie zwischen Marktteilnehmern gehandelt werden könnten. Dadurch wird sichergestellt, dass das Unternehmen eine genaue Darstellung seiner finanziellen Lage liefert.
373
+
374
+ 2. Konsolidierung: Die IFRS verlangen von Unternehmen, ihre Finanzergebnisse auf konsolidierter Basis darzustellen. Das bedeutet, dass alle Tochtergesellschaften und verbundenen Unternehmen in die Bilanz des Mutterunternehmens aufgenommen werden. Dadurch wird ein klareres Bild von der finanziellen Situation des Konzerns geschaffen.
375
+
376
+ 3. Vollständigkeitsprinzip: Die IFRS verlangen von Unternehmen, alle relevanten Informationen offenzulegen. Dies umfasst sowohl positive als auch negative Faktoren, wie zum Beispiel Gewinne und Verluste, Einnahmen und Ausgaben sowie Risiken und Unsicherheiten. Durch dieses Prinzip wird sichergestellt, dass Investoren, Kreditgeber und andere Stakeholder eine umfassende Einschätzung der finanziellen Lage des Unternehmens vornehmen können.
377
+ ```
378
+
379
+ **Prompt:**
380
+ > Ein Mensch atmet durchschnittlich 16 Mal pro Minute. Wie oft atmet er an einem Tag?
381
+
382
+ **Antwort EM German Leo Mistral 7b:**
383
+ ```
384
+ Zuerst berechnen wir, wie oft eine Person in einer Stunde atmet. Wir wissen, dass eine Stunde 60 Minuten hat, also:
385
+
386
+ Atemzüge pro Stunde = Atemfrequenz * Minuten pro Stunde
387
+ = 16 Atemzüge pro Minute * 60 Minuten
388
+ = 960 Atemzüge
389
+
390
+ Um herauszufinden, wie viele Atemzüge eine Person an einem Tag macht, müssen wir diese stündliche Rate mit der Anzahl der Stunden an einem Tag multiplizieren, also 24:
391
+
392
+ Atemzüge pro Tag = Atemzüge pro Stunde * Stunden pro Tag
393
+ = 960 Atemzüge * 24 Stunden
394
+ = 23.040 Atemzüge
395
+
396
+ Also macht ein durchschnittlicher Mensch etwa 23.040 Atemzüge an einem Tag.
397
+ ```
398
+ (For more examples, please visit [our Github Repository](https://github.com/jphme/EM_German).)
399
+
400
+ # Acknowledgements:
401
+
402
+ Many thanks to [winglian/caseus](https://huggingface.co/winglian) for his great work on Axolotl which I used to train the EM mdoels. I am also grateful to [Jon Durbin](https://huggingface.co/jondurbin) and his [Airoboros](https://huggingface.co/jondurbin/airoboros-l2-70b-2.2.1) models and code from which I borrowed many ideas and code snippets.
403
+ Additionally many thanks to [Björn Plüster](https://huggingface.co/bjoernp) and the LeoLM team for the outstanding pretraining work on LeoLM and last but not least many many thanks to [TheBloke](https://huggingface.co/TheBloke) for the preparation of quantized versions in all formats under the sun.
404
+ The 70b model was trained with support of the [OVH Cloud Startup Program](https://startup.ovhcloud.com/en/).
405
+
406
+ # Contact
407
+
408
+ I you are interested in customized LLMs for business applications, please get in contact with me via [my website](https://www.jph.me). I am also always happy about suggestions and feedback.
409
+
410
+ *PS: We are also always interested in support for our startup [ellamind](https://ellamind.com), which will offer customized models for business applications in the future (we are currently still in stealth mode). If you use our models for business applications and have advanced needs for specialized capabilities, please get in touch.*
411
+
412
+ # Disclaimer:
413
+
414
+ I am not responsible for the actions of third parties who use this model or the outputs of the model. This model should only be used for research purposes. The original base model license applies and is distributed with the model files.
415
+
416
+ <!-- original-model-card end -->