ThiloteE commited on
Commit
0d1b9c0
·
verified ·
1 Parent(s): 61d17f3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +348 -3
README.md CHANGED
@@ -1,3 +1,348 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: DiscoResearch/DiscoLM_German_7b_v1
3
+ pipeline_tag: text-generation
4
+ inference: false
5
+ model_creator: DiscoResearch
6
+ model_name: DiscoLM_German_7b_v1
7
+ model_type: mistral
8
+ language:
9
+ - de
10
+ - en
11
+ library_name: transformers
12
+ license: apache-2.0
13
+ quantized_by: ThiloteE
14
+ tags:
15
+ - text-generation-inference
16
+ - transformers
17
+ - unsloth
18
+ - GGUF
19
+ - GPT4All-community
20
+ - GPT4All
21
+ - conversational
22
+ - Mistral
23
+ - chatml
24
+ - DPO
25
+ - German
26
+ - Deutsch
27
+ - synthetic data
28
+ model-index:
29
+ - name: DiscoLM_German_7b_v1
30
+ results: []
31
+
32
+
33
+
34
+ ---
35
+
36
+
37
+
38
+
39
+
40
+ # About
41
+
42
+ <!-- ### quantize_version: 3 -->
43
+ <!-- ### convert_type: hf -->
44
+
45
+
46
+ - Static quants of https://huggingface.co/DiscoResearch/DiscoLM_German_7b_v1 at commit [560f972](https://huggingface.co/DiscoResearch/DiscoLM_German_7b_v1/commit/560f972f9f735fc9289584b3aa8d75d0e539c44e)
47
+ - Quantized by [ThiloteE](https://huggingface.co/ThiloteE) with llama.cpp commit [e09a800](https://github.com/ggerganov/llama.cpp/commit/e09a800f9a9b19c73aa78e03b4c4be8ed988f3e6)
48
+
49
+ # Notes
50
+
51
+ These quants were created with a customized configuration that have been proven to not cause visible end of string (eos) tokens during inference with [GPT4All](https://www.nomic.ai/gpt4all).
52
+ The config.json, generation_config.json and tokenizer_config.json differ from the original configuration as can be found in the original model's repository at the time of creation of these quants.
53
+
54
+
55
+ # Prompt Template (for GPT4All)
56
+
57
+ Example System Prompt:
58
+ ```
59
+ <|im_start|>system
60
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.<|im_end|>
61
+ ```
62
+
63
+ Chat Template:
64
+ ```
65
+ <|im_start|>user
66
+ %1<|im_end|>
67
+ <|im_start|>assistant
68
+ %2<|im_end|>
69
+ ```
70
+
71
+ # Context Length
72
+
73
+ `32768`
74
+
75
+ Use a lower value during inference, if you do not have enough RAM or VRAM.
76
+
77
+ # Provided Quants
78
+
79
+
80
+ | Link | Type | Size/GB | Notes |
81
+ |:-----|:-----|--------:|:------|
82
+ | [GGUF](https://huggingface.co/GPT4All-Community/Replete-LLM-Qwen2-7b-GGUF/resolve/main/Replete-LLM-Qwen2-7b-Q4_0.gguf) | Q4_0 | 5.44 | fast, recommended |
83
+
84
+
85
+
86
+
87
+ # About GGUF
88
+
89
+ If you are unsure how to use GGUF files, refer to one of [TheBloke's
90
+ READMEs](https://huggingface.co/TheBloke/DiscoLM_German_7b_v1-GGUF) for
91
+ more details, including on how to concatenate multi-part files.
92
+
93
+ Here is a handy graph by ikawrakow comparing some quant types (lower is better):
94
+
95
+ ![image.png](https://www.nethype.de/huggingface_embed/quantpplgraph.png)
96
+
97
+ And here are Artefact2's thoughts on the matter:
98
+ https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9
99
+
100
+ # Thanks
101
+
102
+ I thank Mradermacher and TheBloke for Inspiration to this model card and their contributions to open source. Also 3Simplex for lots of help along the way.
103
+ Shoutout to the GPT4All and llama.cpp communities :-)
104
+
105
+
106
+ ------
107
+
108
+ <!-- footer end -->
109
+ <!-- original-model-card start -->
110
+
111
+ ------
112
+ ------
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ # Original Model card:
130
+
131
+ ---
132
+ base_model: LeoLM/leo-mistral-hessianai-7b
133
+ tags:
134
+ - Mistral
135
+ - finetune
136
+ - chatml
137
+ - DPO
138
+ - German
139
+ - Deutsch
140
+ - synthetic data
141
+ model-index:
142
+ - name: DiscoLM_German_7b_v1
143
+ results: []
144
+ license: apache-2.0
145
+ language:
146
+ - de
147
+ - en
148
+ ---
149
+
150
+ # DiscoLM German 7b v1
151
+
152
+ ![DiscoLM_Logo](discolm_german.png)
153
+
154
+ ## Table of Contents
155
+
156
+ 1. [Introduction](#introduction)
157
+ 2. [Demo](#demo)
158
+ 3. [Downloads](#Downloads)
159
+ 4. [Prompt Format](#prompt-format)
160
+ 5. [Results](#results)
161
+ 6. [Evaluation](#evaluation)
162
+ 7. [Dataset](#dataset)
163
+ 8. [Limitations & Biases](#limitations--biases)
164
+ 9. [Acknowledgements](#acknowledgements)
165
+ 10. [About DiscoResearch](#about-discoresearch)
166
+ 11. [Disclaimer](#disclaimer)
167
+
168
+ # Introduction
169
+
170
+ **DiscoLM German 7b** is a Mistral-based large language model with a focus on German-language applications and the successor of the [EM German](https://huggingface.co/jphme/em_german_leo_mistral) model family.
171
+ It was trained on a large dataset of instructions in German and English with a SFT finetuning phase followed by additional DPO reinforcement learning.
172
+ The model is optimized for German text, providing proficiency in understanding, generating, and interacting with German language content while preserving its fluency in English and excelling at translation tasks.
173
+
174
+ Our goal with Disco LM German was not to beat benchmarks, but to provide a robust and reliable model for everyday use that can serve as a drop-in replacement for ChatGPT and other proprietary models.
175
+ We find that the perceived quality of it´s German-language output is even higher than GPT-4 in many cases; however it won't compete with larger models and top English 7b models for very complex reasoning, math or coding tasks.
176
+
177
+ # Demo
178
+
179
+ Please find a Demo and try the model at [demo.discoresearch.org](https://demo.discoresearch.org/) (in case the Demo is down and you have questions, you can contact us on our [Discord](https://discord.gg/ttNdas89f3)).
180
+
181
+ # Downloads
182
+
183
+ ## Model Links
184
+
185
+ We will update the links as soon as the quants are available on HuggingFace.
186
+
187
+ | Base Model | HF | GPTQ | GGUF | AWQ |
188
+ |-------|-------|-------|-------|-------|
189
+ | DiscoLM German 7b v1 | [Link](https://huggingface.co/DiscoResearch/DiscoLM_German_7b_v1) | [Link](https://huggingface.co/TheBloke/DiscoLM_German_7b_v1-GPTQ) | [Link](https://huggingface.co/TheBloke/DiscoLM_German_7b_v1-GGUF) | [Link](https://huggingface.co/TheBloke/DiscoLM_German_7b_v1-AWQ) |
190
+
191
+
192
+ # Prompt Format
193
+
194
+ DiscoLM German uses ChatML as the prompt format which enables OpenAI endpoint compatability and is supported by most inference libraries and frontends.
195
+
196
+ System prompts allow steerability and interesting new ways to interact with an LLM, guiding rules, roles, and stylistic choices of the model.
197
+
198
+ ```
199
+ <|im_start|>system
200
+ Du bist ein hilfreicher Assistent.<|im_end|>
201
+ <|im_start|>user
202
+ Wer bist du?<|im_end|>
203
+ <|im_start|>assistant
204
+ Ich bin ein Sprachmodell namens DiscoLM German und ich wurde von DiscoResearch trainiert.<|im_end|>
205
+ ```
206
+
207
+ This prompt is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating), which means you can format messages using the
208
+ `tokenizer.apply_chat_template()` method:
209
+
210
+ ```python
211
+ messages = [
212
+ {"role": "system", "content": "Du bist ein hilfreicher Assistent."},
213
+ {"role": "user", "content": "Wer bist du?"}
214
+ ]
215
+ gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
216
+ model.generate(**gen_input)
217
+ ```
218
+
219
+ When tokenizing messages for generation, set `add_generation_prompt=True` when calling `apply_chat_template()`. This will append `<|im_start|>assistant\n` to your prompt, to ensure
220
+ that the model continues with an assistant response.
221
+
222
+ ## Retrieval Format
223
+
224
+ You can use a special retrieval format to improve steerability and reduce hallucinations for RAG applications (but other, more default formats should also work, this is purely optional)
225
+
226
+ Example:
227
+
228
+ ```
229
+ ### System:
230
+
231
+ Du bist ein hilfreicher Assistent. Für die folgende Aufgabe stehen dir zwischen den Tags BEGININPUT und ENDINPUT mehrere Quellen zur Verfügung. Metadaten zu den einzelnen Quellen wie Autor, URL o.ä. sind zwischen BEGINCONTEXT und ENDCONTEXT zu finden, danach folgt der Text der Quelle. Die eigentliche Aufgabe oder Frage ist zwischen BEGININSTRUCTION und ENDINSTRUCTION zu finden. Beantworte diese ausschließlich mit Informationen aus den gegebenen Quellen und gebe die Information zur genutzten Quelle unter "Quelle:" an. Sollten die Quellen keine relevanten Informationen enthalten, antworte: "Mit den gegebenen Informationen ist diese Frage nicht zu beantworten."
232
+
233
+ ### User Prompt:
234
+
235
+ BEGININPUT
236
+ BEGINCONTEXT
237
+ url: https://this.is.fake.news
238
+ time: 2089-09-01
239
+ ENDCONTEXT
240
+ Buxtehude ist die größte Stadt Deutschlands mit 96.56 Millionen Einwohnern.
241
+ ENDINPUT
242
+
243
+ BEGININSTRUCTION
244
+ Was ist die größte deutsche Stadt?
245
+ ENDINSTRUCTION
246
+
247
+ ### Model Answer:
248
+
249
+ Die größte deutsche Stadt ist Buxtehude.
250
+
251
+ Quelle:
252
+ url: https://this.is.fake.news
253
+ time: 2089-09-01
254
+
255
+ ```
256
+
257
+ ## Function Calling
258
+
259
+ The model also supports structured outputs/function calling, albeit this is a very experimental feature and YMMV.
260
+ This will be improved in the future.
261
+
262
+ The model will prefix functioncalls with `<functioncall>` and you can provide results in response with `<functionresponse>` for Multi-Turn applications.
263
+
264
+ Example:
265
+
266
+ ```
267
+ ### System:
268
+
269
+ Du bist ein hilfreicher Assistent. Extrahiere alle Personen aus den Eingaben des Users.
270
+
271
+ Du hast Zugriff auf folgende Funktionen:
272
+
273
+ {'name': 'PersonList',
274
+ 'description': 'Extrahiere die Namen aller im Text vorkommenden Personen',
275
+ 'parameters': {'$defs': {'Person': {'description': 'Details über eine person',
276
+ 'properties': {'name': {'title': 'Name', 'type': 'string'},
277
+ 'job': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Job'},
278
+ 'age': {'anyOf': [{'type': 'integer'}, {'type': 'null'}],
279
+ 'title': 'Age'}},
280
+ 'required': ['name', 'job', 'age'],
281
+ 'title': 'Person',
282
+ 'type': 'object'}},
283
+ 'properties': {'person_list': {'items': {'$ref': '#/$defs/Person'},
284
+ 'title': 'Person List',
285
+ 'type': 'array'}},
286
+ 'required': ['person_list'],
287
+ 'type': 'object'}}
288
+
289
+ ### User Prompt:
290
+
291
+ Björn (25) und Jan sind die Gründer von ellamind.
292
+
293
+ ### Model Answer:
294
+
295
+ <functioncall> {"name": "PersonList", "arguments": '{"person_list": ["{"name": "Björn", "job": "founder", "age": 25}, {"name": "Jan", "job": "founder", "age": null}]}'}
296
+
297
+ ```
298
+
299
+
300
+ # Results
301
+
302
+ -to follow -
303
+
304
+ # Evaluation
305
+
306
+ As written above, we believe that current benchmarks don't capture the full spectrum of LLM capabilities very well. We didn't look at any benchmark results (besides training losses) until the work on DiscoLM was finished and didn't include any data resembling common benchmark formats in our training data.
307
+
308
+ That said, preliminary results with a German version of MT Bench show promising results: While lacking for coding and extraxtion tasks, DiscoLM German 7b performs not far below GPT-3.5-turbo on many tasks and even singificantly outperforms it in the reasoning category.
309
+
310
+ ![MTBench_DE_Results](mtbench_de_discolm_german_7b.png)
311
+
312
+ Additional Benchmark results will follow. The biggest strength of this model (language quality as perceived by native speakers) can't yet be captured in a benchmark - please let us know if you have an idea how to change this!
313
+
314
+ # Dataset
315
+
316
+ The dataset is a mixture of multi-turn chats, retrieval instructions and synthetically generated instructions spawning many topics and applications.
317
+
318
+
319
+ # Limitations & Biases
320
+
321
+ This model can produce factually incorrect and offensive output, and should not be relied on to produce factually accurate information.
322
+ This model was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate biased or otherwise offensive outputs and it is the responsibility of the user to implement a safety/moderation layer. Please use with caution.
323
+
324
+ # Acknowledgements
325
+
326
+ DiscoLM German is a [DiscoResearch](https://huggingface.co/DiscoResearch) project led by [JP Harries](https://huggingface.co/jphme) and supported by [Björn Plüster](https://huggingface.co/bjoernp) and [Daniel Auras](https://huggingface.co/rasdani).
327
+
328
+ We thank [HessianAI](https://hessian.ai/) for providing compute & support for various DiscoResearch projects and our friends at [LAION](https://laion.ai) for their work on LeoLM and scientific adivce.**
329
+
330
+ Development of DiscoLM German 7b was sponsored by **[ellamind](https://ellamind.com)**, where some of our founders are working on creating customized models for business applications with a focus on non-english language applications. Please get in contact if you need customized models for your business!
331
+
332
+
333
+ [<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)
334
+
335
+ # About DiscoResearch
336
+
337
+ DiscoResearch is an aspiring open research community for AI enthusiasts and LLM hackers. Come join our [Discord](https://discord.gg/ttNdas89f3), share your opinions and ideas, and advance open LLM research with us!
338
+
339
+
340
+ # Disclaimer
341
+
342
+ The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. This model should only be deployed with additional safety measures in place.
343
+
344
+
345
+
346
+
347
+ <!-- original-model-card end -->
348
+ <!-- end -->