DaryoushV's picture
Update README.md
8edec5b verified
metadata
license: apache-2.0
language:
  - en
  - de
library_name: transformers
pipeline_tag: text-generation
tags:
  - finetune
  - sft
  - dpo
  - laser
  - augmentation
  - german
  - english
  - functioncalling
  - function

SauerkrautLM

VAGO solutions FC SauerkrautLM-7b-beta

Introducing FC SauerkrautLM-7b-beta – our Function Calling Sauerkraut version of the powerful openchat/openchat-3.5-0106 !

The model FC SauerkrautLM-7b-beta 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
  • Additionaly trained with a small function calling dataset
  • Using a novel training technique - 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
  • Optimized with LaserRMT

Table of Contents

  1. Overview of all FC SauerkrautLM-7b-beta models
  2. Model Details
  3. Evaluation
  4. Disclaimer
  5. Contact
  6. Collaborations
  7. Acknowledgement

All FC SauerkrautLM-7b-beta Models

For function calling, we provide several branches with different versions of the model. Since Function Calling is currently still in beta status, we depend on your feedback. Please test each model extensively and let us know which model you achieved the best results with.

Model HF GPTQ GGUF AWQ
FC SauerkrautLM-7b-beta - Laser 16 layers Link coming soon coming soon coming soon
FC SauerkrautLM-7b-beta - Laser 8 layers Link coming soon coming soon coming soon
FC SauerkrautLM-7b-beta - Laser 4 layers Link coming soon coming soon coming soon
FC SauerkrautLM-7b-beta - Laser 3 layers Link coming soon coming soon coming soon

Model Details

FC SauerkrautLM-7b-beta

Training procedure:

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.

For function calling, we provide several branches with different versions of the model. Since Function Calling is currently still in beta status, we depend on your feedback. Please test each model extensively and let us know which model you achieved the best results with.

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 improved the German language skills on this model. Nevertheless, certain formulations may occur that are not entirely correct.

Function Calling Prompt Template:

German Example 1:

*Prompt Example on Temp 0.01 and top_p 0.5

GPT4 Correct User: SYSTEM: Du bist ein hilfreicher Assistent mit Zugang zu den folgenden Funktionen. Verwende sie bei Bedarf. -\n {\n "name": "calculate_area",\n "description": "Berechnen Sie den Flächeninhalt einer Form",\n "parameters": {\n "type": "object",\n "properties": {\n "Form": {\n "type": "string",\n "description": "Die Art der Form (z.B. Quadrat, Dreieck, Kreis)"\n },\n "Abmessungen": {\n "type": "object",\n "properties": {\n "Länge": {\n "type": "number",\n "description": "Die Länge der Form"\n },\n "Breite": {\n "type": "number",\n "description": "Die Breite der Form"\n },\n "Radius": {\n "type": "number",\n "description": "Der Radius der Form"\n }\n }\n }\n },\n "required": [\n "Form",\n "Abmessungen"\n ]\n }\n}\n\n{\n "name": "search_recipe",\n "description": "Suchen Sie nach einem Rezept basierend auf Stichwörtern",\n "parameters": {\n "type": "object",\n "properties": {\n "Stichwörter": {\n "type": "string",\n "description": "Die Stichwörter, nach denen im Rezept gesucht werden soll"\n }\n },\n "required": [\n "Stichwörter"\n ]\n }\n}\n 'Ich muss die Fläche eines Rechtecks berechnen. Die Länge beträgt 5 Einheiten und die Breite beträgt 3 Einheiten.<|end_of_turn|>GPT4 Correct Assistant: <functioncall> {"name": "calculate_area", "arguments": '{"Form": "Rechteck", "Abmessungen": {"Länge": 5, "Breite": 3}}'}<|end_of_turn|>GPT4 Correct User: <function_response> '{"Fläche": 15}'}<|end_of_turn|>GPT4 Correct Assistant: Die Fläche des Rechtecks mit einer Länge von 5 Einheiten und einer Breite von 3 Einheiten beträgt 15 Quadrat-Einheiten. 

German Example 2:

GPT4 Correct User: SYSTEM: Du bist ein hilfreicher Assistent mit Zugang zu den folgenden Funktionen. Verwende sie bei Bedarf. -\n{\n "name": "convert_currency",\n "description": "Währung von einer Einheit in eine andere umrechnen",\n "parameters": {\n "type": "object",\n "properties": {\n "Betrag": {\n "type": "number",\n "description": "Der umzurechnende Geldbetrag"\n },\n "von": {\n "type": "string",\n "description": "Der Währungscode, von dem umgerechnet wird"\n },\n "zu": {\n "type": "string",\n "description": "Der Währungscode, in den umgerechnet wird"\n }\n },\n "required": [\n "Betrag",\n "von",\n "zu"\n ]\n }\n}\n\n{\n "name": "calculate_tip",\n "description": "Den Trinkgeldbetrag auf Basis der Gesamtrechnung berechnen",\n "parameters": {\n "type": "object",\n "properties": {\n "Rechnungsbetrag": {\n "type": "number",\n "description": "Der Gesamtbetrag der Rechnung"\n },\n "Trinkgeldprozentsatz": {\n "type": "number",\n "description": "Der zu berechnende Trinkgeldprozentsatz"\n }\n },\n "required": [\n "Rechnungsbetrag",\n "Trinkgeldprozentsatz"\n ]\n }\n}\nHallo, ich muss 500 USD in EUR umrechnen. Können Sie mir dabei helfen?<|end_of_turn|>GPT4 Correct Assistant: <functioncall> {"name": "convert_currency", "arguments": '{"Betrag": 500, "von": "USD", "zu": "EUR"}'}<|end_of_turn|>GPT4 Correct User: <function_response> {"umgerechneter_betrag": 425,50, "von": "USD", "zu": "EUR"}<|end_of_turn|>GPT4 Correct Assistant: Der umgerechnete Betrag von 500 USD in EUR beträgt ungefähr 425,50 Euro.

English Example : *Prompt Example on Temp 0.01 and top_p 0.5

GPT4 Correct User: SYSTEM: You are a helpful assistant with access to the following functions. Use them if required -\n{\n \"name\": \"get_time\",\n \"description\": \"Get the current time\",\n \"parameters\": {}\n}\nHello, can you tell me what time it is now?<|end_of_turn|>GPT4 Correct Assistant: <functioncall> {"name": "get_time", "arguments": {}}<|end_of_turn|>GPT4 Correct User: <function_response> {\"time\": \"10:30 AM\"}<|end_of_turn|>GPT4 Correct Assistant: The current time is 10:30 AM.

Spanish Example : *Prompt Example on Temp 0.01 and top_p 0.5

GPT4 Correct User: SISTEMA: Eres un asistente útil con acceso a las siguientes funciones. Úsalos cuando sea necesario. -\n{\n "name": "generate_random_quote",\n "description": "Generar una cita inspiradora aleatoria",\n "parameters": {\n "type": "object",\n "properties" : {\n "categoría": {\n "tipo": "cadena",\n "descripción": "La categoría de citas para elegir"\n }\n },\n "obligatorio": [\n "categoría"\n ]\n }\n}\nHola, necesito algo de motivación. ¿Pueden generarme una cotización aleatoria desde la categoría 'Éxito'?<|end_of_turn|>GPT4 Correct Assistant<functioncall> {"name": "generate_random_quote", "arguments": '{"categoría": "Éxito"}'}<|end_of_turn|>GPT4 Correct User: <function_response> {"quote": "El éxito no es la clave de la felicidad. La felicidad es la clave del éxito. Si amas lo que haces, tendrás éxito.", "author": "Albert Schweitzer"}<|end_of_turn|>GPT4 Correct Assistant: Aquí tienes una cita inspiradora aleatoria desde la categoría 'Éxito': "El éxito no es la clave de la felicidad. La felicidad es la clave del éxito. Si amas lo que haces, tendrás éxito." Esta cita fue dicha por Albert Schweitzer. Espero que te inspire!

Prompt Template:

GPT4 Correct User: Hallo, wie geht es dir?<|end_of_turn|>GPT4 Correct Assistant: Hallo! Ich bin ein künstliches Intelligenzsystem und habe keine persönlichen Gefühle oder körperliche Zustände. Wie kann ich Ihnen helfen?<|end_of_turn|>GPT4 Correct User: Ich benötige nur einen kurzen Satz, den ich in das Prompt Template veröffentlichen kann.<|end_of_turn|>GPT4 Correct Assistant:

*Prompt Example on Temp 0.3 and top_p 0.9

GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant: Hello! How can I help you today? If you have any questions or need assistance, feel free to ask.<|end_of_turn|>GPT4 Correct User: I just need a short sentence to post in the prompt template.<|end_of_turn|>GPT4 Correct Assistant:

*Prompt Example on Temp 0.3 and top_p 0.9

Evaluation

Metric Value
Avg. 66.82
ARC (25-shot) 64.25
HellaSwag (10-shot) 80.99
MMLU (5-shot) 61.71
TruthfulQA (0-shot) 53.53
Winogrande (5-shot) 78.37
GSM8K (5-shot) 62.09

The benchmark results of the individual branches vary greatly. The Laser 3 layer achieved the best benchmark results. The Laser 16 layer had the second best results (it is the main branch) followed by Laser 4 layer and Laser 8 layer

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 websites. We are also grateful for your feedback and suggestions.  

Collaborations

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, Hyperspace.computer

Acknowledgement

Many thanks to openchat for providing such valuable model to the Open-Source community