automerger
commited on
Commit
•
e8b9d6d
1
Parent(s):
76b068a
Upload folder using huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- merge
|
5 |
+
- mergekit
|
6 |
+
- lazymergekit
|
7 |
+
- automerger
|
8 |
+
base_model:
|
9 |
+
- allknowingroger/MultiverseEx26-7B-slerp
|
10 |
+
- MaziyarPanahi/MeliodasPercival_01_Experiment26T3q
|
11 |
+
---
|
12 |
+
|
13 |
+
# Multiverseex26Meliodaspercival_01_experiment26t3q-7B
|
14 |
+
|
15 |
+
Multiverseex26Meliodaspercival_01_experiment26t3q-7B is an automated merge created by [Maxime Labonne](https://huggingface.co/mlabonne) using the following configuration.
|
16 |
+
* [allknowingroger/MultiverseEx26-7B-slerp](https://huggingface.co/allknowingroger/MultiverseEx26-7B-slerp)
|
17 |
+
* [MaziyarPanahi/MeliodasPercival_01_Experiment26T3q](https://huggingface.co/MaziyarPanahi/MeliodasPercival_01_Experiment26T3q)
|
18 |
+
|
19 |
+
## 🧩 Configuration
|
20 |
+
|
21 |
+
```yaml
|
22 |
+
slices:
|
23 |
+
- sources:
|
24 |
+
- model: allknowingroger/MultiverseEx26-7B-slerp
|
25 |
+
layer_range: [0, 32]
|
26 |
+
- model: MaziyarPanahi/MeliodasPercival_01_Experiment26T3q
|
27 |
+
layer_range: [0, 32]
|
28 |
+
merge_method: slerp
|
29 |
+
base_model: allknowingroger/MultiverseEx26-7B-slerp
|
30 |
+
parameters:
|
31 |
+
t:
|
32 |
+
- filter: self_attn
|
33 |
+
value: [0, 0.5, 0.3, 0.7, 1]
|
34 |
+
- filter: mlp
|
35 |
+
value: [1, 0.5, 0.7, 0.3, 0]
|
36 |
+
- value: 0.5
|
37 |
+
dtype: bfloat16
|
38 |
+
random_seed: 0
|
39 |
+
```
|
40 |
+
|
41 |
+
## 💻 Usage
|
42 |
+
|
43 |
+
```python
|
44 |
+
!pip install -qU transformers accelerate
|
45 |
+
|
46 |
+
from transformers import AutoTokenizer
|
47 |
+
import transformers
|
48 |
+
import torch
|
49 |
+
|
50 |
+
model = "automerger/Multiverseex26Meliodaspercival_01_experiment26t3q-7B"
|
51 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
52 |
+
|
53 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
54 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
55 |
+
pipeline = transformers.pipeline(
|
56 |
+
"text-generation",
|
57 |
+
model=model,
|
58 |
+
torch_dtype=torch.float16,
|
59 |
+
device_map="auto",
|
60 |
+
)
|
61 |
+
|
62 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
63 |
+
print(outputs[0]["generated_text"])
|
64 |
+
```
|