File size: 9,655 Bytes
b894787
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3e0ec99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
---
language:
- de
- en
- it
- fr
- pt
- nl
- ar
- es
license: apache-2.0
tags:
- spectrum
- sft
- mlx
base_model: VAGOsolutions/SauerkrautLM-v2-14b-SFT
model-index:
- name: SauerkrautLM-v2-14b-SFT
  results:
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: IFEval (0-Shot)
      type: HuggingFaceH4/ifeval
      args:
        num_few_shot: 0
    metrics:
    - type: inst_level_strict_acc and prompt_level_strict_acc
      value: 69.64
      name: strict accuracy
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=VAGOsolutions/SauerkrautLM-v2-14b-SFT
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: BBH (3-Shot)
      type: BBH
      args:
        num_few_shot: 3
    metrics:
    - type: acc_norm
      value: 45.82
      name: normalized accuracy
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=VAGOsolutions/SauerkrautLM-v2-14b-SFT
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MATH Lvl 5 (4-Shot)
      type: hendrycks/competition_math
      args:
        num_few_shot: 4
    metrics:
    - type: exact_match
      value: 29.23
      name: exact match
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=VAGOsolutions/SauerkrautLM-v2-14b-SFT
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: GPQA (0-shot)
      type: Idavidrein/gpqa
      args:
        num_few_shot: 0
    metrics:
    - type: acc_norm
      value: 11.41
      name: acc_norm
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=VAGOsolutions/SauerkrautLM-v2-14b-SFT
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MuSR (0-shot)
      type: TAUR-Lab/MuSR
      args:
        num_few_shot: 0
    metrics:
    - type: acc_norm
      value: 11.07
      name: acc_norm
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=VAGOsolutions/SauerkrautLM-v2-14b-SFT
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MMLU-PRO (5-shot)
      type: TIGER-Lab/MMLU-Pro
      config: main
      split: test
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 46.73
      name: accuracy
    source:
      url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=VAGOsolutions/SauerkrautLM-v2-14b-SFT
      name: Open LLM Leaderboard
---

# stelterlab/SauerkrautLM-v2-14b-SFT-MLX

The Model [stelterlab/SauerkrautLM-v2-14b-SFT-MLX](https://huggingface.co/stelterlab/SauerkrautLM-v2-14b-SFT-MLX) was converted to MLX format from [VAGOsolutions/SauerkrautLM-v2-14b-SFT](https://huggingface.co/VAGOsolutions/SauerkrautLM-v2-14b-SFT) using mlx-lm version **0.19.2**.

## Use with mlx

```bash
pip install mlx-lm
```

```python
from mlx_lm import load, generate

model, tokenizer = load("stelterlab/SauerkrautLM-v2-14b-SFT-MLX")

prompt="hello"

if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, tokenize=False, add_generation_prompt=True
    )

response = generate(model, tokenizer, prompt=prompt, verbose=True)
```

Original Weights by VAGOsolutions. Original Model Card follows:

![SauerkrautLM-v2-14b-SFT](https://vago-solutions.ai/wp-content/uploads/2024/11/SauerkrautLM-v2-14b-3.png "SauerkrautLM-v2-14b-SFT")
## VAGO solutions SauerkrautLM-v2-14b-SFT

**Fine-tuned Model** - *Celebrating one year of SauerkrautLM with our most advanced model yet, showcasing two-phase Spectrum Fine-Tuning*

Introducing **SauerkrautLM-14b-v2-SFT** – our latest Sauerkraut version based on [Qwen/Qwen2.5-14B](https://huggingface.co/Qwen/Qwen2.5-14B), celebrating the one-year anniversary of SauerkrautLM!

- Two-phase Spectrum Fine-Tuning approach
- Phase 1: 25% layer targeting with 0.6B tokens
- Phase 2: 20% layer targeting with 0.6B tokens
- Enhanced mathematical capabilities, function calling, and multilingual performance

# Table of Contents
1. [Overview of all SauerkrautLM-14b-v2 Models](#all-SauerkrautLM-v2-14b)
2. [Model Details](#model-details)
   - [Training procedure](#training-procedure)
3. [Evaluation](#evaluation)
5. [Disclaimer](#disclaimer)
6. [Contact](#contact)
7. [Collaborations](#collaborations)
8. [Acknowledgement](#acknowledgement)

## All SauerkrautLM-v2-14b

| Model | HF    | EXL2  | GGUF  | AWQ  |
|-------|-------|-------|-------|-------|
| SauerkrautLM-v2-14b-SFT | [Link](https://huggingface.co/VAGOsolutions/SauerkrautLM-v2-14b-SFT) | coming soon | coming soon | coming soon |
| SauerkrautLM-v2-14b-DPO | [Link](https://huggingface.co/VAGOsolutions/SauerkrautLM-v2-14b-DPO) | coming soon | coming soon | coming soon |

## Model Details
**SauerkrautLM-v2-14b-SFT**
- **Model Type:** SauerkrautLM-v2-14b-SFT is a fine-tuned Model based on [Qwen/Qwen2.5-14B](https://huggingface.co/Qwen/Qwen2.5-14B)
- **Language(s):** German, English
- **License:** Apache 2.0
- **Contact:** [VAGO solutions](https://vago-solutions.ai)

## Training Procedure

This model represents a significant advancement in our fine-tuning methodology, utilizing a two-phase Spectrum Fine-Tuning approach:

**Phase 1 (25% Layer Targeting)**:
- Training on 0.6B tokens with four distinct components:
  1. Mathematics data (curated using proprietary classifier)
  2. English performance data (from Sauerkraut-v1)
  3. High-quality German training data (from Sauerkraut-v1)
  4. Function calling data (from Sauerkraut-v2)

**Phase 2 (20% Layer Targeting)**:
- Training on additional 0.6B tokens with partial overlap:
  1. New mathematics data (classifier-selected)
  2. New English performance data (from Sauerkraut-v2)
  3. New German training data (from Sauerkraut-v2)
  4. Function calling data (from Sauerkraut-v2)

**Dataset Composition**:
- Carefully curated mathematical content using a proprietary classification model
- Premium multilingual data from both Sauerkraut-v1 and Sauerkraut-v2
- Specialized function calling training data
- High-quality German-English content across various domains

## Objective and Results

This release marks the one-year anniversary of SauerkrautLM, showcasing our most advanced training methodology to date. The two-phase Spectrum Fine-Tuning approach allows for more nuanced learning while maintaining efficiency in resource usage. The model demonstrates significant improvements in:

- Mathematical reasoning capabilities
- Function calling proficiency
- Multilingual performance
- Instruction following
- Common-sense reasoning

## Evaluation

**AGIEVAL**
![SauerkrautLM-v2-14b-SFT-AGIEVAL](https://vago-solutions.ai/wp-content/uploads/2024/11/SauerkrautLM-v2-14b-DPO-AGIEVAL.png "SauerkrautLM-v2-14b-SFT-AGIEVAL")

**GPT4ALL**
![SauerkrautLM-v2-14b-SFT-GPT4ALL](https://vago-solutions.ai/wp-content/uploads/2024/11/SauerkrautLM-v2-14b-DPO-GPT4ALL.png "SauerkrautLM-v2-14b-SFT-GPT4ALL")

**TRUTHFULQA**
![SauerkrautLM-v2-14b-SFT-TRUTHFULQA](https://vago-solutions.ai/wp-content/uploads/2024/11/SauerkrautLM-v2-14b-DPO-TRUTHFULQA.png "SauerkrautLM-v2-14b-SFT-TRUTHFULQA")

**OPENLEADERBOARD 2**
![SauerkrautLM-v2-14b-SFT-OPENLEADERBOARD](https://vago-solutions.ai/wp-content/uploads/2024/11/SauerkrautLM-v2-14b-DPO-OPENLEADERBOARD.png "SauerkrautLM-v2-14b-SFT-OPENLEADERBOARD")

**MMLU 5-shot**
![SauerkrautLM-v2-14b-SFT-MMLU-5shot](https://vago-solutions.ai/wp-content/uploads/2024/11/SauerkrautLM-v2-14b-DPO-MMLU-5shot.png "SauerkrautLM-v2-14b-SFT-MMLU-5shot")

**Berkeley Function Calling Leaderboard**
![SauerkrautLM-v2-14b-SFT-BERKELEY](https://vago-solutions.ai/wp-content/uploads/2024/11/SauerkrautLM-v2-14b-DPO-BERKELEY.png "SauerkrautLM-v2-14b-SFT-BERKELEY")

Please note that our benchmark results in absolute numbers may differ from the Hugging Face Leaderboard due to variations in benchmark evaluation pipelines. However, the relative differences remain consistent.

## Disclaimer
We must inform users that despite our best efforts in data cleansing, the possibility of uncensored content slipping through cannot be entirely ruled out. 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. 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.
 
## Contact
If you are interested in customized LLMs for business applications, please get in contact with us via our website. We are also grateful for your feedback and suggestions.
 
## Collaborations
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 at [VAGO solutions](https://vago-solutions.ai)

## Acknowledgement
Many thanks to [Qwen](https://huggingface.co/Qwen) for providing such a valuable model to the Open-Source community.