--- license: other license_name: gemma-terms-of-use license_link: https://ai.google.dev/gemma/terms language: - de - en tags: - sft - dpo - laserRMT - laser-QLoRa - finetune - work in progress - alpha --- **Update** - 01.03.2024 - Reuploaded the model in bfloat16 dtype. - 02.03.2024 - **strongest Gemma finetune model so far: added AGIEval,GPT4ALL and Bigbench scoring with AVG of 54.13 and H6 Open LLM Leaderboard with AVG of 67.83** ![SauerkrautLM](https://vago-solutions.de/wp-content/uploads/2024/02/sauerkrautgemma.jpeg "SauerkrautLM-Gemma-7b") ## VAGO solutions SauerkrautLM-Gemma-7b (alpha) Introducing **SauerkrautLM-Gemma-7b** – our Sauerkraut version of the powerful [google/gemma-7b](https://huggingface.co/google/gemma-7b) ! **It is an early stage finetuned model and should be used with caution!** The model **SauerkrautLM-Gemma-7b** is a **joint effort** between **VAGO solutions** and **Hyperspace.ai.** Much appreciation goes to the tremendous research effort of **Fernando Fernandes Neto, David Golchinfar and Eric Hartford on their laserRMT approach.** Without their independent research collaboration this model release would not have been possible. - Fintuned with **SFT** - Aligned with **DPO** - **Using a novel training technique: laser-QLoRA** - we partially freeze the model according to a laser-like analysis (Official Paper soon). It allows to evaluate the no free lunch theorem and supports better decision making when optimizing the theorem - created by the [LaserRMT research group](https://github.com/cognitivecomputations/laserRMT) - Optimized with **LaserRMT** # Table of Contents 1. [Overview of all SauerkrautLM-Gemma-7b models](#all-sauerkrautlm-gemma-7b-models) 2. [Model Details](#model-details) - [Prompt template](#prompt-template) - [Training procedure](#proceed-of-the-training) 3. [Evaluation](#evaluation) 5. [Disclaimer](#disclaimer) 6. [Contact](#contact) 7. [Collaborations](#collaborations) 8. [Acknowledgement](#acknowledgement) ## All SauerkrautLM-Gemma-7b Models | Model | HF | GPTQ | GGUF | AWQ | |-------|-------|-------|-------|-------| | SauerkrautLM-Gemma-7b | [Link](https://huggingface.co/VAGOsolutions/SauerkrautLM-Gemma-7b) | coming soon | coming soon | coming soon | ## Model Details **SauerkrautLM-Gemma-7b** - **Model Type:** SauerkrautLM-Gemma-7b is a finetuned Model based on [google/gemma-7b](https://huggingface.co/google/gemma-7b) - **Language(s):** German, English - **License:** [gemma-terms-of-use](https://ai.google.dev/gemma/terms) - **Contact:** [VAGO solutions](https://vago-solutions.ai), [Hyperspace.ai](https://hyperspace.computer/) ### Training procedure: **Warning**: **This finetuned model is in an early stage and we sometimes observed strange behavior. It is still work in progress!** Anyone who has attempted or succeeded in fine-tuning a model is aware of the difficulty in nudging it towards a specific skill, such as mastering new languages, as well as the challenges associated with achieving significant improvements in performance. Experimenting with a novel training strategy and Spherical Linear Interpolation alongside a lasered version of the model itself has proven to be both fascinating and revealing. Furthermore, we developed one iteration of the model using our entire SFT -Sauerkraut dataset and two additional iterations using subsets of the full dataset—one focused on enhancing MMLU and TQA capabilities, and the other on boosting GSM8K and Winogrande skills. After optimizing our primary SFT model, we applied a similar strategy to our new DPO Dataset, dividing it into further subsets. We trained one model on the entire dataset again and two more on these specialized subsets. We actively monitor and assesed the results of each training. Whenever we found a decrease in perplexity on the gsm8k benchmark we intervined. By following this procedure we were able to improve the overall performance, especially in math abilities, without detracting from performance on other benchmarks—a task that is, in general, quite difficult. This process not only helps in understanding the effectiveness of Spherical Linear Interpolation but also introduces a new method for refining models with enhanced skills through a cycle of targeted data selection (Laser data(x)) + SLERP, followed by a subsequent focus on different data (Laser again on data(y)). Additionally, we integrated a novel training strategy on the SFT and DPO training process, where we partially freeze the model according to a laser-like analysis aiming to navigate and optimize the trade-offs highlighted by the no free lunch theorem. This innovative training method effectively prevents the significant problem of language models forgetting previously acquired knowledge. This aspect is particularly crucial when attempting to teach the model specific skills, such as a new language, where in general, the model might lose a considerable amount of its prior knowledge and exhibit a decline in overall intelligence. Detailed information on how the new training strategy works and the advantages it offers over conventional training methods will soon be published in a detailed paper by the LaserRMT research group. **We teached German language skills on this model.** As far as we know, it is the first Gemma model with bilingual skills in German and English. Nevertheless, formulations may occur that are not entirely correct (still work in progress). ### Prompt Template: We trained on vicuna prompt template. Please add the following stopping string to your client: ``` "","
" ``` (we did not add the special tokens to the training config) ``` You are a helpful AI Assistant. USER: Hello, how are you? ASSISTANT: ``` ## Evaluation **Open LLM Leaderboard:** | Metric | Value | |-----------------------|---------------------------| | Avg. | **67.83** | | ARC (25-shot) | 59.98 | | HellaSwag (10-shot) | 81.91 | | MMLU (5-shot) | 63.76| | TruthfulQA (0-shot) | 61 | | Winogrande (5-shot) | 76.64 | | GSM8K (5-shot) | 63.68 | **Performance** | Model |AGIEval|GPT4All|TruthfulQA|BigBench|Average ⬇️| |-----------------------------------------------------------------------|------:|------:|---------:|-------:|------:| |[VAGOsolutions/SauerkrautLM-Gemma-7b](https://huggingface.co/VAGOsolutions/SauerkrautLM-Gemma-7b) | 37.5| 72.46| 61.24| 45.33| 54.13| |[zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) | 37.52| 71.77| 55.26| 39.77| 51.08| |[zephyr-7b-gemma-v0.1](https://huggingface.co/HuggingFaceH4/zephyr-7b-gemma-v0.1)| 34.22| 66.37| 52.19| 37.10| 47.47| |[google/gemma-7b-it](https://huggingface.co/google/gemma-7b-it) | 21.33| 40.84| 41.70| 30.25| 33.53|