Upload folder using huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- merge
|
5 |
+
- mergekit
|
6 |
+
- lazymergekit
|
7 |
+
base_model:
|
8 |
+
- OpenPipe/mistral-ft-optimized-1227
|
9 |
+
- Intel/neural-chat-7b-v3-3
|
10 |
+
- openchat/openchat-3.5-0106
|
11 |
+
- openaccess-ai-collective/DPOpenHermes-7B-v2
|
12 |
+
- mlabonne/NeuralHermes-2.5-Mistral-7B
|
13 |
+
- dolphin-2.6-mistral-7b-dpo-laser
|
14 |
+
- Mistral-7B-OpenOrca
|
15 |
+
---
|
16 |
+
|
17 |
+
# Darewin-7B-v2
|
18 |
+
|
19 |
+
Darewin-7B-v2 is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
|
20 |
+
* [OpenPipe/mistral-ft-optimized-1227](https://huggingface.co/OpenPipe/mistral-ft-optimized-1227)
|
21 |
+
* [Intel/neural-chat-7b-v3-3](https://huggingface.co/Intel/neural-chat-7b-v3-3)
|
22 |
+
* [openchat/openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106)
|
23 |
+
* [openaccess-ai-collective/DPOpenHermes-7B-v2](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2)
|
24 |
+
* [mlabonne/NeuralHermes-2.5-Mistral-7B](https://huggingface.co/mlabonne/NeuralHermes-2.5-Mistral-7B)
|
25 |
+
* [dolphin-2.6-mistral-7b-dpo-laser](https://huggingface.co/dolphin-2.6-mistral-7b-dpo-laser)
|
26 |
+
* [Mistral-7B-OpenOrca](https://huggingface.co/Mistral-7B-OpenOrca)
|
27 |
+
|
28 |
+
## 🧩 Configuration
|
29 |
+
|
30 |
+
```yaml
|
31 |
+
models:
|
32 |
+
- model: mistralai/Mistral-7B-Instruct-v0.2
|
33 |
+
# No parameters necessary for base model
|
34 |
+
- model: OpenPipe/mistral-ft-optimized-1227
|
35 |
+
parameters:
|
36 |
+
density: 0.6
|
37 |
+
weight: 0.25
|
38 |
+
- model: Intel/neural-chat-7b-v3-3
|
39 |
+
parameters:
|
40 |
+
density: 0.55
|
41 |
+
weight: 0.2
|
42 |
+
- model: openchat/openchat-3.5-0106
|
43 |
+
parameters:
|
44 |
+
density: 0.5
|
45 |
+
weight: 0.2
|
46 |
+
- model: openaccess-ai-collective/DPOpenHermes-7B-v2
|
47 |
+
parameters:
|
48 |
+
density: 0.45
|
49 |
+
weight: 0.1
|
50 |
+
- model: mlabonne/NeuralHermes-2.5-Mistral-7B
|
51 |
+
parameters:
|
52 |
+
density: 0.4
|
53 |
+
weight: 0.1
|
54 |
+
- model: dolphin-2.6-mistral-7b-dpo-laser
|
55 |
+
parameters:
|
56 |
+
density: 0.4
|
57 |
+
weight: 0.1
|
58 |
+
- model: Mistral-7B-OpenOrca
|
59 |
+
parameters:
|
60 |
+
density: 0.3
|
61 |
+
weight: 0.05
|
62 |
+
|
63 |
+
merge_method: dare_ties
|
64 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
65 |
+
parameters:
|
66 |
+
int8_mask: true
|
67 |
+
dtype: bfloat16
|
68 |
+
```
|
69 |
+
|
70 |
+
## 💻 Usage
|
71 |
+
|
72 |
+
```python
|
73 |
+
!pip install -qU transformers accelerate
|
74 |
+
|
75 |
+
from transformers import AutoTokenizer
|
76 |
+
import transformers
|
77 |
+
import torch
|
78 |
+
|
79 |
+
model = "mlabonne/Darewin-7B-v2"
|
80 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
81 |
+
|
82 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
83 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
84 |
+
pipeline = transformers.pipeline(
|
85 |
+
"text-generation",
|
86 |
+
model=model,
|
87 |
+
torch_dtype=torch.float16,
|
88 |
+
device_map="auto",
|
89 |
+
)
|
90 |
+
|
91 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
92 |
+
print(outputs[0]["generated_text"])
|
93 |
+
```
|