|
--- |
|
base_model: mistralai/Mistral-7B-v0.1 |
|
tags: |
|
- mistral |
|
- chatml |
|
- merge |
|
model-index: |
|
- name: Lelantos-7B |
|
results: [] |
|
license: apache-2.0 |
|
language: |
|
- en |
|
--- |
|
|
|
# Lelantos - Mistral 7B |
|
|
|
![image/png](https://huggingface.co/SanjiWatsuki/Lelantos-7B/resolve/main/Assets/lelantos.png) |
|
|
|
*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.* |
|
|
|
## Model description |
|
|
|
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. |
|
|
|
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). |
|
|
|
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. |
|
|
|
## Example Prompt |
|
``` |
|
<|im_start|>system |
|
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|> |
|
``` |
|
|
|
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. |
|
|
|
More broadly, just use a general ChatML prompt. Hermes was trained on system prompts and multi-turn chats so Lelantos can handle it, too. |
|
|
|
Prompt with system instruction (Use whatever system prompt you like, this is just an example!): |
|
``` |
|
<|im_start|>system |
|
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|> |
|
<|im_start|>user |
|
Hello, who are you?<|im_end|> |
|
<|im_start|>assistant |
|
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|> |
|
``` |
|
|
|
This prompt is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating), which means you can format messages using the |
|
`tokenizer.apply_chat_template()` method: |
|
|
|
```python |
|
messages = [ |
|
{"role": "system", "content": "You are Lelantos."}, |
|
{"role": "user", "content": "Hello, who are you?"} |
|
] |
|
gen_input = tokenizer.apply_chat_template(message, return_tensors="pt") |
|
model.generate(**gen_input) |
|
``` |
|
|
|
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 |
|
that the model continues with an assistant response. |
|
|
|
To utilize the prompt format without a system prompt, simply leave the line out. |
|
|
|
## Benchmark Results |
|
|
|
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. |
|
|
|
**MT-Bench Average Turn** |
|
| model | score | size |
|
|--------------------|-----------|-------- |
|
| gpt-4 | 8.99 | - |
|
| xDAN-L1-Chat-RL-v1 | 8.24^1 | 7b |
|
| Starling-7B | 8.09 | 7b |
|
| Claude-2 | 8.06 | - |
|
| **Lelantos-7B** | 8.01 | 7b |
|
| gpt-3.5-turbo | 7.94 | 20b? |
|
| Claude-1 | 7.90 | - |
|
| *DPOpenHermes-v2* | 7.86 | 7b |
|
| OpenChat-3.5 | 7.81 | 7b |
|
| vicuna-33b-v1.3 | 7.12 | 33b |
|
| vicuna-33b-v1.3 | 7.12 | 33b |
|
| wizardlm-30b | 7.01 | 30b |
|
| Llama-2-70b-chat | 6.86 | 70b |
|
|
|
^1 xDAN's testing placed it 8.35 - this number is from my independent MT-Bench run. |
|
|
|
![image/png](https://huggingface.co/SanjiWatsuki/Lelantos-7B/resolve/main/Assets/mt-bench-chart.png) |
|
|