johannhartmann
commited on
Commit
•
33a9a73
1
Parent(s):
c7965c8
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- merge
|
4 |
+
- mergekit
|
5 |
+
- lazymergekit
|
6 |
+
- mlabonne/OmniTruthyBeagle-7B-v0
|
7 |
+
- mayflowergmbh/Wiedervereinigung-7b-dpo-laser
|
8 |
+
- cognitivecomputations/openchat-3.5-0106-laser
|
9 |
+
base_model:
|
10 |
+
- mlabonne/OmniTruthyBeagle-7B-v0
|
11 |
+
- mayflowergmbh/Wiedervereinigung-7b-dpo-laser
|
12 |
+
- cognitivecomputations/openchat-3.5-0106-laser
|
13 |
+
---
|
14 |
+
|
15 |
+
# Wiederchat-7b-dpo-laser
|
16 |
+
|
17 |
+
Wiederchat-7b-dpo is a laser-qlorad dpo-aligned merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
|
18 |
+
* [mlabonne/OmniTruthyBeagle-7B-v0](https://huggingface.co/mlabonne/OmniTruthyBeagle-7B-v0)
|
19 |
+
* [mayflowergmbh/Wiedervereinigung-7b-dpo-laser](https://huggingface.co/mayflowergmbh/Wiedervereinigung-7b-dpo-laser)
|
20 |
+
* [cognitivecomputations/openchat-3.5-0106-laser](https://huggingface.co/cognitivecomputations/openchat-3.5-0106-laser)
|
21 |
+
|
22 |
+
## 🧩 Configuration
|
23 |
+
|
24 |
+
```yaml
|
25 |
+
models:
|
26 |
+
- model: mistralai/Mistral-7B-v0.1
|
27 |
+
# no parameters necessary for base model
|
28 |
+
- model: mlabonne/OmniTruthyBeagle-7B-v0
|
29 |
+
parameters:
|
30 |
+
density: 0.60
|
31 |
+
weight: 0.30
|
32 |
+
- model: mayflowergmbh/Wiedervereinigung-7b-dpo-laser
|
33 |
+
parameters:
|
34 |
+
density: 0.65
|
35 |
+
weight: 0.40
|
36 |
+
- model: cognitivecomputations/openchat-3.5-0106-laser
|
37 |
+
parameters:
|
38 |
+
density: 0.6
|
39 |
+
weight: 0.3
|
40 |
+
merge_method: dare_ties
|
41 |
+
base_model: mistralai/Mistral-7B-v0.1
|
42 |
+
parameters:
|
43 |
+
int8_mask: true
|
44 |
+
dtype: bfloat16
|
45 |
+
random_seed: 0
|
46 |
+
```
|
47 |
+
|
48 |
+
## 📈 Mt-Bench-De
|
49 |
+
```json
|
50 |
+
{
|
51 |
+
"first_turn": 7.8875,
|
52 |
+
"second_turn": 7.31875,
|
53 |
+
"categories": {
|
54 |
+
"writing": 8.65,
|
55 |
+
"roleplay": 8.225,
|
56 |
+
"reasoning": 6.5,
|
57 |
+
"math": 4.55,
|
58 |
+
"coding": 6.1,
|
59 |
+
"extraction": 8.25,
|
60 |
+
"stem": 9.2,
|
61 |
+
"humanities": 9.35
|
62 |
+
},
|
63 |
+
"average": 7.603125
|
64 |
+
}
|
65 |
+
```
|
66 |
+
|
67 |
+
|
68 |
+
## 💻 Usage
|
69 |
+
|
70 |
+
```python
|
71 |
+
!pip install -qU transformers accelerate
|
72 |
+
|
73 |
+
from transformers import AutoTokenizer
|
74 |
+
import transformers
|
75 |
+
import torch
|
76 |
+
|
77 |
+
model = "johannhartmann/Wiederchat-7b-dpo-laser"
|
78 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
79 |
+
|
80 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
81 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
82 |
+
pipeline = transformers.pipeline(
|
83 |
+
"text-generation",
|
84 |
+
model=model,
|
85 |
+
torch_dtype=torch.float16,
|
86 |
+
device_map="auto",
|
87 |
+
)
|
88 |
+
|
89 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
90 |
+
print(outputs[0]["generated_text"])
|
91 |
+
```
|