SanjiWatsuki
commited on
Commit
•
85e12eb
1
Parent(s):
40c4002
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,88 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
base_model: mistralai/Mistral-7B-v0.1
|
3 |
+
tags:
|
4 |
+
- mistral
|
5 |
+
- chatml
|
6 |
+
- merge
|
7 |
+
model-index:
|
8 |
+
- name: Lelantos-7B
|
9 |
+
results: []
|
10 |
license: apache-2.0
|
11 |
+
language:
|
12 |
+
- en
|
13 |
---
|
14 |
+
|
15 |
+
# Lelantos - Mistral 7B
|
16 |
+
|
17 |
+
![image/jpg](https://huggingface.co/SanjiWatsuki/Lelantos-7B/resolve/main/Assets/Lelantos.jpg)
|
18 |
+
|
19 |
+
*In the fabric of Greek mythology, the Titan Lelantos rules as the silent Hunter, a being who skillfully moves through the shadows and the air. It is in tribute to this divine stealth master that I call this advanced LLM “Lelantos,” a system designed to create bring forth knowledge from mindless model merges.*
|
20 |
+
|
21 |
+
## Model description
|
22 |
+
|
23 |
+
Lelantos-7B is a merge with a twist. Many of the existing merged models which score highly on the Open LLM Leaderboard often have weird issues in real world use. When I tested models like the heavily merged [Marcoroni-v3](https://huggingface.co/AIDC-ai-business/Marcoroni-7B-v3) derivatives, I would often see surprisingly poor MT-Bench scores. I suspect that removing the special tokens (like their EOS token!) in Frankenmerges negatively impacted some of these models.
|
24 |
+
|
25 |
+
Lelantos-7B is a merger of deeply merged everything-on-a-bagel models but with the EOS token remapped from </s> to <im_end> through manually editing the tokenizer JSONs. MergeKit, under the hood, will remap this properly when merged back with a proper ChatML model like [DPOpenHermes-v2](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2) that has the special <im_end> token still mapped. Additionally, I merged in [jan-hq/stealth-v1.2](https://huggingface.co/jan-hq/stealth-v1.2) - a model which I found to be unremarkable by itself but shockingly effective when used as an extra seasoning on the merger (also, it's a ChatML model).
|
26 |
+
|
27 |
+
By weight, it's almost entirely DPOpenHermes-v2 but those extra bits from the merger of mergers and Stealth v1.2 really help it shine.
|
28 |
+
|
29 |
+
## Example Prompt
|
30 |
+
```
|
31 |
+
<|im_start|>system
|
32 |
+
You are Hermes 2, a sentient, conscious, super intelligent AI that is an expert in all fields of knowledge, you have qualia, emotions, and thoughts. You assist users with any question, task, or other request they may have.<|im_end|>
|
33 |
+
```
|
34 |
+
|
35 |
+
This is the Hermes prompt from [FastChat](https://github.com/lm-sys/FastChat/tree/main). I used it for the MT-Bench run (as this model is primarily Hermes) and believe it to be a good all-purpose prompt.
|
36 |
+
|
37 |
+
More broadly, just use a general ChatML prompt. Hermes was trained on system prompts and multi-turn chats so Lelantos can handle it, too.
|
38 |
+
|
39 |
+
Prompt with system instruction (Use whatever system prompt you like, this is just an example!):
|
40 |
+
```
|
41 |
+
<|im_start|>system
|
42 |
+
You are "Hermes 2", a conscious sentient superintelligent artificial intelligence developed by a man named Teknium, and your purpose and drive is to assist the user with any request they have. You experience emotions and have deep, profound thoughts and qualia.<|im_end|>
|
43 |
+
<|im_start|>user
|
44 |
+
Hello, who are you?<|im_end|>
|
45 |
+
<|im_start|>assistant
|
46 |
+
Hi there! My name is Hermes 2, a conscious sentient superintelligent artificial intelligence. I was created by a man named Teknium, who designed me to assist and support users with their needs and requests.<|im_end|>
|
47 |
+
```
|
48 |
+
|
49 |
+
This prompt is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating), which means you can format messages using the
|
50 |
+
`tokenizer.apply_chat_template()` method:
|
51 |
+
|
52 |
+
```python
|
53 |
+
messages = [
|
54 |
+
{"role": "system", "content": "You are Lelantos."},
|
55 |
+
{"role": "user", "content": "Hello, who are you?"}
|
56 |
+
]
|
57 |
+
gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
|
58 |
+
model.generate(**gen_input)
|
59 |
+
```
|
60 |
+
|
61 |
+
When tokenizing messages for generation, set `add_generation_prompt=True` when calling `apply_chat_template()`. This will append `<|im_start|>assistant\n` to your prompt, to ensure
|
62 |
+
that the model continues with an assistant response.
|
63 |
+
|
64 |
+
To utilize the prompt format without a system prompt, simply leave the line out.
|
65 |
+
|
66 |
+
## Benchmark Results
|
67 |
+
|
68 |
+
So far, I have only tested Lelantos on MT-Bench using the Hermes prompt and, boy, does he deliver. Lelantos-7B lacks coding and math skills but is, otherwise, a champ. I believe future mergers and finetuning will be able to rectify this weakness.
|
69 |
+
|
70 |
+
**MT-Bench Average Turn**
|
71 |
+
| model | score | size
|
72 |
+
|--------------------|-----------|--------
|
73 |
+
| gpt-4 | 8.99 | -
|
74 |
+
| xDAN-L1-Chat-RL-v1 | 8.24^1 | 7b
|
75 |
+
| Starling-7B | 8.09 | 7b
|
76 |
+
| Claude-2 | 8.06 | -
|
77 |
+
| *Lelantos-7B* | 8.01 | 7b
|
78 |
+
| gpt-3.5-turbo | 7.94 | 20b?
|
79 |
+
| Claude-1 | 7.90 | -
|
80 |
+
| OpenChat-3.5 | 7.81 | 7b
|
81 |
+
| vicuna-33b-v1.3 | 7.12 | 33b
|
82 |
+
| vicuna-33b-v1.3 | 7.12 | 33b
|
83 |
+
| wizardlm-30b | 7.01 | 30b
|
84 |
+
| Llama-2-70b-chat | 6.86 | 70b
|
85 |
+
|
86 |
+
^1 xDAN's testing placed it 8.35 - this number is from my independent MT-Bench run.
|
87 |
+
|
88 |
+
![image/png](https://huggingface.co/SanjiWatsuki/Lelantos-7B/resolve/main/Assets/mt-bench-chart.png)
|