Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- merge
|
4 |
+
- mergekit
|
5 |
+
- lazymergekit
|
6 |
+
- Kukedlc/NeuTrixOmniBe-7B-model-remix
|
7 |
+
- PetroGPT/WestSeverus-7B-DPO
|
8 |
+
- vanillaOVO/supermario_v4
|
9 |
+
base_model:
|
10 |
+
- Kukedlc/NeuTrixOmniBe-7B-model-remix
|
11 |
+
- PetroGPT/WestSeverus-7B-DPO
|
12 |
+
- vanillaOVO/supermario_v4
|
13 |
+
---
|
14 |
+
|
15 |
+
# MoEv4Config-TestWeightedTIES-7b
|
16 |
+
|
17 |
+
MoEv4Config-TestWeightedTIES-7b is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
|
18 |
+
* [Kukedlc/NeuTrixOmniBe-7B-model-remix](https://huggingface.co/Kukedlc/NeuTrixOmniBe-7B-model-remix)
|
19 |
+
* [PetroGPT/WestSeverus-7B-DPO](https://huggingface.co/PetroGPT/WestSeverus-7B-DPO)
|
20 |
+
* [vanillaOVO/supermario_v4](https://huggingface.co/vanillaOVO/supermario_v4)
|
21 |
+
|
22 |
+
## 🧩 Configuration
|
23 |
+
|
24 |
+
```yaml
|
25 |
+
models:
|
26 |
+
- model: Kukedlc/NeuTrixOmniBe-7B-model-remix
|
27 |
+
# No parameters necessary for base model
|
28 |
+
- model: Kukedlc/NeuTrixOmniBe-7B-model-remix
|
29 |
+
parameters:
|
30 |
+
density: [1, 0.7, 0.1]
|
31 |
+
weight: [0, 0.3, 0.7, 1]
|
32 |
+
- model: PetroGPT/WestSeverus-7B-DPO
|
33 |
+
parameters:
|
34 |
+
density: [1, 0.7, 0.3]
|
35 |
+
weight: [0, 0.25, 0.5, 1]
|
36 |
+
- model: vanillaOVO/supermario_v4
|
37 |
+
parameters:
|
38 |
+
density: 0.33
|
39 |
+
weight:
|
40 |
+
- filter: mlp
|
41 |
+
value: 0.5
|
42 |
+
- value: 0
|
43 |
+
merge_method: ties
|
44 |
+
base_model: Kukedlc/NeuTrixOmniBe-7B-model-remix
|
45 |
+
parameters:
|
46 |
+
int8_mask: true
|
47 |
+
normalize: true
|
48 |
+
sparsify:
|
49 |
+
- filter: mlp
|
50 |
+
value: 0.5
|
51 |
+
- filter: self_attn
|
52 |
+
value: 0.5
|
53 |
+
dtype: bfloat16
|
54 |
+
```
|
55 |
+
|
56 |
+
## 💻 Usage
|
57 |
+
|
58 |
+
```python
|
59 |
+
!pip install -qU transformers accelerate
|
60 |
+
|
61 |
+
from transformers import AutoTokenizer
|
62 |
+
import transformers
|
63 |
+
import torch
|
64 |
+
|
65 |
+
model = "jsfs11/MoEv4Config-TestWeightedTIES-7b"
|
66 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
67 |
+
|
68 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
69 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
70 |
+
pipeline = transformers.pipeline(
|
71 |
+
"text-generation",
|
72 |
+
model=model,
|
73 |
+
torch_dtype=torch.float16,
|
74 |
+
device_map="auto",
|
75 |
+
)
|
76 |
+
|
77 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
78 |
+
print(outputs[0]["generated_text"])
|
79 |
+
```
|