Edit model card

This is a model that is assumed to perform well, but may require more testing and user feedback. Be aware, only models featured within the GUI of GPT4All, are curated and officially supported by Nomic. Use at your own risk.

About

Prompt Template (for GPT4All)

Example System Prompt:

<|im_start|>system
Hier ist eine Anweisung, die eine Aufgabe beschreibt. Schreiben Sie eine Antwort, die die Anfrage angemessen erfüllt.<|im_end|>

Chat Template:

<|im_start|>user
%1<|im_end|>
<|im_start|>assistant
%2<|im_end|>

Context Length

32768

Use a lower value during inference, if you do not have enough RAM or VRAM.

Provided Quants

Link Type Size/GB Notes
GGUF Q4_0 4.1 fast, recommended

About GGUF

If you are unsure how to use GGUF files, refer to one of TheBloke's READMEs for more details, including on how to concatenate multi-part files.

Here is a handy graph by ikawrakow comparing some quant types (lower is better):

image.png

And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9

Thanks

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. Shoutout to the GPT4All and llama.cpp communities :-)




Original Model card:


base_model: LeoLM/leo-mistral-hessianai-7b tags: - Mistral - finetune - chatml - DPO - German - Deutsch - synthetic data model-index: - name: DiscoLM_German_7b_v1 results: [] license: apache-2.0 language: - de - en

DiscoLM German 7b v1

DiscoLM_Logo

Table of Contents

  1. Introduction
  2. Demo
  3. Downloads
  4. Prompt Format
  5. Results
  6. Evaluation
  7. Dataset
  8. Limitations & Biases
  9. Acknowledgements
  10. About DiscoResearch
  11. Disclaimer

Introduction

DiscoLM German 7b is a Mistral-based large language model with a focus on German-language applications and the successor of the EM German model family. It was trained on a large dataset of instructions in German and English with a SFT finetuning phase followed by additional DPO reinforcement learning. 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.

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. 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.

Demo

Please find a Demo and try the model at demo.discoresearch.org (in case the Demo is down and you have questions, you can contact us on our Discord).

Downloads

Model Links

We will update the links as soon as the quants are available on HuggingFace.

Base Model HF GPTQ GGUF AWQ
DiscoLM German 7b v1 Link Link Link Link

Prompt Format

DiscoLM German uses ChatML as the prompt format which enables OpenAI endpoint compatability and is supported by most inference libraries and frontends.

System prompts allow steerability and interesting new ways to interact with an LLM, guiding rules, roles, and stylistic choices of the model.

<|im_start|>system
Du bist ein hilfreicher Assistent.<|im_end|>
<|im_start|>user
Wer bist du?<|im_end|>
<|im_start|>assistant
Ich bin ein Sprachmodell namens DiscoLM German und ich wurde von DiscoResearch trainiert.<|im_end|>

This prompt is available as a chat template, which means you can format messages using the tokenizer.apply_chat_template() method:

messages = [
    {"role": "system", "content": "Du bist ein hilfreicher Assistent."},
    {"role": "user", "content": "Wer bist du?"}
]
gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
model.generate(**gen_input)

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 that the model continues with an assistant response.

Retrieval Format

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)

Example:

### System:

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."

### User Prompt:

BEGININPUT
BEGINCONTEXT
url: https://this.is.fake.news
time: 2089-09-01
ENDCONTEXT
Buxtehude ist die größte Stadt Deutschlands mit 96.56 Millionen Einwohnern.
ENDINPUT

BEGININSTRUCTION
Was ist die größte deutsche Stadt?
ENDINSTRUCTION

### Model Answer:

Die größte deutsche Stadt ist Buxtehude.

Quelle:
  url: https://this.is.fake.news
  time: 2089-09-01

Function Calling

The model also supports structured outputs/function calling, albeit this is a very experimental feature and YMMV. This will be improved in the future.

The model will prefix functioncalls with <functioncall> and you can provide results in response with <functionresponse> for Multi-Turn applications.

Example:

### System:

Du bist ein hilfreicher Assistent. Extrahiere alle Personen aus den Eingaben des Users.

Du hast Zugriff auf folgende Funktionen:

{'name': 'PersonList',
 'description': 'Extrahiere die Namen aller im Text vorkommenden Personen',
 'parameters': {'$defs': {'Person': {'description': 'Details über eine person',
    'properties': {'name': {'title': 'Name', 'type': 'string'},
     'job': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Job'},
     'age': {'anyOf': [{'type': 'integer'}, {'type': 'null'}],
      'title': 'Age'}},
    'required': ['name', 'job', 'age'],
    'title': 'Person',
    'type': 'object'}},
  'properties': {'person_list': {'items': {'$ref': '#/$defs/Person'},
    'title': 'Person List',
    'type': 'array'}},
  'required': ['person_list'],
  'type': 'object'}}

### User Prompt:

Björn (25) und Jan sind die Gründer von ellamind.

### Model Answer:

<functioncall> {"name": "PersonList", "arguments": '{"person_list": ["{"name": "Björn", "job": "founder", "age": 25}, {"name": "Jan", "job": "founder", "age": null}]}'}

Results

-to follow -

Evaluation

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.

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.

MTBench_DE_Results

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!

Dataset

The dataset is a mixture of multi-turn chats, retrieval instructions and synthetically generated instructions spawning many topics and applications.

Limitations & Biases

This model can produce factually incorrect and offensive output, and should not be relied on to produce factually accurate information. 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.

Acknowledgements

DiscoLM German is a DiscoResearch project led by JP Harries and supported by Björn Plüster and Daniel Auras.

We thank HessianAI for providing compute & support for various DiscoResearch projects and our friends at LAION for their work on LeoLM and scientific adivce.**

Development of DiscoLM German 7b was sponsored by ellamind, 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!

Built with Axolotl

About DiscoResearch

DiscoResearch is an aspiring open research community for AI enthusiasts and LLM hackers. Come join our Discord, share your opinions and ideas, and advance open LLM research with us!

Disclaimer

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.

Downloads last month
1,196
GGUF
Model size
7.24B params
Architecture
llama

4-bit

Inference Examples
Inference API (serverless) has been turned off for this model.

Model tree for GPT4All-Community/DiscoLM_German_7b_v1-GGUF

Quantized
(6)
this model