--- tags: - merge - mergekit license: llama3 language: - de - en --- # llama3-8b-spaetzle-v39 llama3-8b-spaetzle-v39 is a merge of the following models: ``` - cstr/llama3-8b-spaetzle-v38 - cstr/llama3-8b-spaetzle-v36 - cstr/llama3-8b-spaetzle-v33 - cstr/llama3-8b-spaetzle-v28 ``` ### Evaluation [Quantised as q4km gguf](https://huggingface.co/cstr/llama3-8b-spaetzle-v39-GGUF), it achieves ``` on EQ Bench (v2_de): 65.12 (171 parseable), on EQ Bench (v2): 73.64 (171 parseable). ``` | Model |AGIEval|GPT4All|TruthfulQA|Bigbench|Average| |----------------------------------------------------------------------------|------:|------:|---------:|-------:|------:| |[llama3-8b-spaetzle-v39](https://huggingface.co/cstr/llama3-8b-spaetzle-v39)| 43.43| 73.31| 60| 45.89| 55.66| ### GPT4All | Task |Version| Metric |Value| |Stderr| |-------------|------:|--------|----:|---|-----:| |arc_challenge| 0|acc |60.75|± | 1.43| | | |acc_norm|63.40|± | 1.41| |arc_easy | 0|acc |85.10|± | 0.73| | | |acc_norm|83.46|± | 0.76| |boolq | 1|acc |84.74|± | 0.63| |hellaswag | 0|acc |62.23|± | 0.48| | | |acc_norm|80.73|± | 0.39| |openbookqa | 0|acc |38.00|± | 2.17| | | |acc_norm|46.80|± | 2.23| |piqa | 0|acc |79.92|± | 0.93| | | |acc_norm|80.25|± | 0.93| |winogrande | 0|acc |73.80|± | 1.24| ## Sample output ``` >>> What is 7777 + 3333? Let's do the math: 7777 + 3333 = 11110 >>> I have 10 apples. I find 3 gold coins in the bottom of a river. The river runs near a big city that has something to ... do with what I can spend the coins on. I then lose 4 apples but gain a gold coin. Three birds run into my path and dr ... op 6 apples each. I play an online game and win 6 gold coins but I have to share them equally with my 2 teammates. I ... buy apples for all the coins I have. The price of an apple is 0.5 coins. How many apples do I have? And where is the ... river? Let's break this down step by step! Initially, you have 10 apples. You find 3 gold coins in the river. No mention of spending these coins yet. You lose 4 apples, leaving you with 6 apples. You gain a gold coin, so now you have 4 coins (3 + 1). Then, three birds drop 6 apples each, which is a total of 18 apples. You now have: 6 (initial apples) + 18 (new apples) = 24 apples In the online game, you win 6 gold coins, but since you have to share with teammates, each of you gets 2 coins (6 ÷ 3). So, you gain 2 new coins. You now have a total of 6 coins (4 initial + 2 gained). With your 6 coins, you can buy apples at a rate of 0.5 coins per apple. To find out how many apples you can buy, divide the number of coins by the price per apple: 6 coins ÷ 0.5 coins/apple = 12 apples So, after buying apples with all your coins, you have a total of 24 (initial) + 12 (new) = 36 apples. As for where the river is, it runs near a big city that has something to do with spending gold coins. Since you bought apples with your coins, we can infer that this city might be a market or a place where fruits and goods are sold. However, the exact location of the river is not specified in the story. >>> Two years ago, I was three times as old as my brother was. In three years, I will be twice as old as my brother. How ... old is each of us now? ... Let's use variables to represent the current ages: * My current age = M * My brother's current age = B Two years ago, the equation would be: M - 2 = 3(B - 2) Since I was three times as old as my brother two years ago, we can simplify the equation: M - 2 = 3B - 6 M = 3B - 4 Now, let's look at the future situation in three years: M + 3 = 2(B + 3) Expanding and simplifying: M + 3 = 2B + 6 M = 2B + 3 We now have two equations with two variables: 1) M = 3B - 4 2) M = 2B + 3 Equating the right sides of these equations, we get: 3B - 4 = 2B + 3 Simplifying and solving for B (my brother's current age): B = 7 Now that we know my brother's current age, we can find mine: M = 3B - 4 = 3(7) - 4 = 21 - 4 = 17 So, I am currently 17 years old, and my brother is currently 7 years old. ``` ## 🧩 Configuration ```yaml models: - model: cstr/llama3-8b-spaetzle-v33 - model: cstr/llama3-8b-spaetzle-v38 - model: cstr/llama3-8b-spaetzle-v36 - model: cstr/llama3-8b-spaetzle-v28 merge_method: model_stock base_model: cstr/llama3-8b-spaetzle-v33 dtype: bfloat16 ``` ## 💻 Usage ```python !pip install -qU transformers accelerate from transformers import AutoTokenizer import transformers import torch model = "cstr/llama3-8b-spaetzle-v39" messages = [{"role": "user", "content": "What is a large language model?"}] tokenizer = AutoTokenizer.from_pretrained(model) prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", ) outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95) print(outputs[0]["generated_text"]) ```