Text Generation
Transformers
Safetensors
German
English
llama
two stage dpo
dpo
conversational
text-generation-inference
Instructions to use VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct") model = AutoModelForCausalLM.from_pretrained("VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct
- SGLang
How to use VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct with Docker Model Runner:
docker model run hf.co/VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct
Update README.md
Browse files
README.md
CHANGED
|
@@ -1 +1,158 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: llama3
|
| 4 |
+
license_link: >-
|
| 5 |
+
https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct/blob/main/LICENSE
|
| 6 |
+
language:
|
| 7 |
+
- de
|
| 8 |
+
- en
|
| 9 |
+
tags:
|
| 10 |
+
- dpo
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+

|
| 15 |
+
## VAGO solutions Llama-3-SauerkrautLM-8b-Instruct
|
| 16 |
+
Introducing **Llama-3-SauerkrautLM-8b-Instruct** – our Sauerkraut version of the powerful [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)!
|
| 17 |
+
|
| 18 |
+
The model **Llama-3-SauerkrautLM-8b-Instruct** is a **joint effort** between **VAGO Solutions** and **Hyperspace.ai.**
|
| 19 |
+
|
| 20 |
+
- Aligned with **DPO**
|
| 21 |
+
|
| 22 |
+
# Table of Contents
|
| 23 |
+
1. [Overview of all Llama-3-SauerkrautLM-8b-Instruct](#all-Llama-3-SauerkrautLM-8b-Instruct)
|
| 24 |
+
2. [Model Details](#model-details)
|
| 25 |
+
- [Prompt template](#prompt-template)
|
| 26 |
+
- [Training procedure](#proceed-of-the-training)
|
| 27 |
+
3. [Evaluation](#evaluation)
|
| 28 |
+
5. [Disclaimer](#disclaimer)
|
| 29 |
+
6. [Contact](#contact)
|
| 30 |
+
7. [Collaborations](#collaborations)
|
| 31 |
+
8. [Acknowledgement](#acknowledgement)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
## All SauerkrautLM-llama-3-8B-Instruct
|
| 35 |
+
|
| 36 |
+
| Model | HF | EXL2 | GGUF | AWQ |
|
| 37 |
+
|-------|-------|-------|-------|-------|
|
| 38 |
+
| Llama-3-SauerkrautLM-8b-Instruct | [Link](https://huggingface.co/VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct) | coming soon | coming soon | coming soon |
|
| 39 |
+
|
| 40 |
+
## Model Details
|
| 41 |
+
**SauerkrautLM-llama-3-8B-Instruct**
|
| 42 |
+
- **Model Type:** Llama-3-SauerkrautLM-8b-Instruct is a finetuned Model based on [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)
|
| 43 |
+
- **Language(s):** German, English
|
| 44 |
+
- **License:** [meta-llama](https://llama.meta.com/llama3/license)
|
| 45 |
+
- **Contact:** [VAGO solutions](https://vago-solutions.ai), [Hyperspace.ai](https://hyperspace.computer/)
|
| 46 |
+
|
| 47 |
+
### Training procedure:
|
| 48 |
+
- We trained this model in a two staged DPO procedure for 1 epoch with 65k data and another epoch with 20k data.
|
| 49 |
+
- LaserRMT version coming soon
|
| 50 |
+
|
| 51 |
+
**We improved the model's capabilities noticably by feeding it with curated German data.**
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
### Prompt Template:
|
| 55 |
+
|
| 56 |
+
**English:**
|
| 57 |
+
```
|
| 58 |
+
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
|
| 59 |
+
|
| 60 |
+
You are a helpful AI assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>
|
| 61 |
+
|
| 62 |
+
Input<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
| 63 |
+
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
**German:**
|
| 67 |
+
```
|
| 68 |
+
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
|
| 69 |
+
|
| 70 |
+
Du bist ein freundlicher und hilfreicher deutscher KI-Assistent.<|eot_id|><|start_header_id|>user<|end_header_id|>
|
| 71 |
+
|
| 72 |
+
Input<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
| 73 |
+
|
| 74 |
+
```
|
| 75 |
+
### Example output of german language:
|
| 76 |
+
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Prompt: Erkläre mir die Vorteile für das Fine-Tuning von Meta's LLama Modellen.
|
| 80 |
+
|
| 81 |
+
Antwort:
|
| 82 |
+
Sehr gern!
|
| 83 |
+
|
| 84 |
+
Fine-tuning von Meta's LLaMA-Modellen ist eine sehr effektive Möglichkeit, um Ihre Anwendung oder Ihr Projekt mit einer hochentwickelten Sprachverarbeitung auszustatten.
|
| 85 |
+
|
| 86 |
+
Die Vorteile des Fine-Tunings von LLaMA-Modellen sind:
|
| 87 |
+
|
| 88 |
+
Adaptation an spezielle Aufgaben: Durch das Fine-Tuning können Sie die Modelle auf Ihre speziellen Bedürfnisse und Anforderungen anpassen.
|
| 89 |
+
Dies ermöglicht es Ihnen, die Leistung der Modelle in Ihren Anwendungen zu verbessern.
|
| 90 |
+
|
| 91 |
+
Verbesserte Genauigkeit: Die fine-tuned Modelle lernen, sich an die spezifischen Merkmale Ihres Datenbestands anzupassen, was zu einer besseren Genauigkeit bei der Textklassifizierung, -generierung, -summarisierung usw. führt.
|
| 92 |
+
|
| 93 |
+
Anpassung an Branche oder Domain: Wenn Sie beispielsweise ein Medizinprojekt haben, können Sie die Modelle auf medizinische Fachterminologie und -konzepte trainieren, um eine höhere Präzision bei der Analyse medizinischer Texte zu erzielen.
|
| 94 |
+
|
| 95 |
+
Kosten-Effektivität: Im Vergleich zum Training neuer Modelle von Grund auf kann das Fine-Tuning viel kosteneffektiver sein, da Sie nur einen kleinen Teil des Trainingsdatums benötigen, um die Modelle an Ihre spezifischen Anforderungen anzupassen.
|
| 96 |
+
|
| 97 |
+
Schnellere Entwicklung: Das Fine-Tuning ermöglicht es Entwicklern, schnell neue Funktionen und Features in ihre Anwendungen einzufügen, ohne dass sie lange warten müssen, bis neue Modelle trainiert werden.
|
| 98 |
+
|
| 99 |
+
Bessere Interpretierbarkeit: Da die fine-tuned Modelle auf Ihre spezifischen Daten bestimmt wurden, können Sie leichter verstehen, warum bestimmte Entscheidungen getroffen werden, was wichtig ist, wenn es um Transparenz und Verantwortlichkeit geht.
|
| 100 |
+
|
| 101 |
+
Insgesamt bietet das Fine-Tuning von LLaMA-Modellen eine flexible und effektive Möglichkeit, um Ihre Anwendungen und Projekte durch die Integration von fortschrittlichen Sprachmodellen zu verbessern.
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
## Evaluation
|
| 105 |
+
|
| 106 |
+
**Open LLM Leaderboard:**
|
| 107 |
+
|
| 108 |
+
evaluated with lm-evaluation-benchmark-harness 0.4.2
|
| 109 |
+
| Metric | Value |
|
| 110 |
+
|-----------------------|---------------------------|
|
| 111 |
+
| Avg. | **74.57** |
|
| 112 |
+
| ARC (25-shot) | 74.66 |
|
| 113 |
+
| HellaSwag (10-shot) | 89.60 |
|
| 114 |
+
| MMLU (5-shot) | 66.55 |
|
| 115 |
+
| TruthfulQA (0-shot) | 66.32 |
|
| 116 |
+
| Winogrande (5-shot) | 80.98 |
|
| 117 |
+
| GSM8K (5-shot) | 69.29 |
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
**MT-Bench English**
|
| 121 |
+
|
| 122 |
+
```
|
| 123 |
+
########## First turn ##########
|
| 124 |
+
score
|
| 125 |
+
model turn
|
| 126 |
+
Llama-3-SauerkrautLM-8b-Instruct 1 8.15625
|
| 127 |
+
|
| 128 |
+
########## Second turn ##########
|
| 129 |
+
score
|
| 130 |
+
model turn
|
| 131 |
+
Llama-3-SauerkrautLM-8b-Instruct 2 7.65
|
| 132 |
+
|
| 133 |
+
########## Average ##########
|
| 134 |
+
score
|
| 135 |
+
model
|
| 136 |
+
Llama-3-SauerkrautLM-8b-Instruct 7.903125 *
|
| 137 |
+
|
| 138 |
+
```
|
| 139 |
+
* due to specific instruction training the english MT-Bench score is slightly lower than the original LLama-3-8B-Instruct
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
**MT-Bench German**
|
| 143 |
+
coming soon
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
## Disclaimer
|
| 147 |
+
We must inform users that despite our best efforts in data cleansing, the possibility of uncensored content slipping through cannot be entirely ruled out.
|
| 148 |
+
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.
|
| 149 |
+
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.
|
| 150 |
+
|
| 151 |
+
## Contact
|
| 152 |
+
If you are interested in customized LLMs for business applications, please get in contact with us via our websites. We are also grateful for your feedback and suggestions.
|
| 153 |
+
|
| 154 |
+
## Collaborations
|
| 155 |
+
We are also keenly seeking support and investment for our startups, VAGO solutions and Hyperspace 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 at [VAGO solutions](https://vago-solutions.de/#Kontakt), [Hyperspace.computer](https://hyperspace.computer/)
|
| 156 |
+
|
| 157 |
+
## Acknowledgement
|
| 158 |
+
Many thanks to [Meta](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) for providing such valuable model to the Open-Source community
|