Upload folder using huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- merge
|
4 |
+
- mergekit
|
5 |
+
- lazymergekit
|
6 |
+
- CultriX/MonaTrix-v4
|
7 |
+
- bardsai/jaskier-7b-dpo-v5.6
|
8 |
+
- eren23/ogno-monarch-jaskier-merge-7b
|
9 |
+
base_model:
|
10 |
+
- CultriX/MonaTrix-v4
|
11 |
+
- bardsai/jaskier-7b-dpo-v5.6
|
12 |
+
- eren23/ogno-monarch-jaskier-merge-7b
|
13 |
+
---
|
14 |
+
|
15 |
+
# DominaTrix-7B-v2
|
16 |
+
|
17 |
+
DominaTrix-7B-v2 is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
|
18 |
+
* [CultriX/MonaTrix-v4](https://huggingface.co/CultriX/MonaTrix-v4)
|
19 |
+
* [bardsai/jaskier-7b-dpo-v5.6](https://huggingface.co/bardsai/jaskier-7b-dpo-v5.6)
|
20 |
+
* [eren23/ogno-monarch-jaskier-merge-7b](https://huggingface.co/eren23/ogno-monarch-jaskier-merge-7b)
|
21 |
+
|
22 |
+
## 🧩 Configuration
|
23 |
+
|
24 |
+
```yaml
|
25 |
+
models:
|
26 |
+
- model: mistralai/Mistral-7B-Instruct-v0.2
|
27 |
+
# No parameters necessary for base model
|
28 |
+
- model: CultriX/MonaTrix-v4
|
29 |
+
#Emphasize the beginning of Vicuna format models
|
30 |
+
parameters:
|
31 |
+
weight: 0.36
|
32 |
+
density: 0.65
|
33 |
+
- model: bardsai/jaskier-7b-dpo-v5.6
|
34 |
+
parameters:
|
35 |
+
weight: 0.34
|
36 |
+
density: 0.6
|
37 |
+
# Vicuna format
|
38 |
+
- model: eren23/ogno-monarch-jaskier-merge-7b
|
39 |
+
parameters:
|
40 |
+
weight: 0.3
|
41 |
+
density: 0.6
|
42 |
+
merge_method: dare_ties
|
43 |
+
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
44 |
+
parameters:
|
45 |
+
int8_mask: true
|
46 |
+
dtype: bfloat16
|
47 |
+
random_seed: 0
|
48 |
+
```
|
49 |
+
|
50 |
+
## 💻 Usage
|
51 |
+
|
52 |
+
```python
|
53 |
+
!pip install -qU transformers accelerate
|
54 |
+
|
55 |
+
from transformers import AutoTokenizer
|
56 |
+
import transformers
|
57 |
+
import torch
|
58 |
+
|
59 |
+
model = "CultriX/DominaTrix-7B-v2"
|
60 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
61 |
+
|
62 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
63 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
64 |
+
pipeline = transformers.pipeline(
|
65 |
+
"text-generation",
|
66 |
+
model=model,
|
67 |
+
torch_dtype=torch.float16,
|
68 |
+
device_map="auto",
|
69 |
+
)
|
70 |
+
|
71 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
72 |
+
print(outputs[0]["generated_text"])
|
73 |
+
```
|