automerger
commited on
Commit
•
4f3c33c
1
Parent(s):
0c3697b
Upload folder using huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- merge
|
5 |
+
- mergekit
|
6 |
+
- lazymergekit
|
7 |
+
- automerger
|
8 |
+
---
|
9 |
+
|
10 |
+
# MistrollPercival_01-7B
|
11 |
+
|
12 |
+
MistrollPercival_01-7B is an automated merge created by [Maxime Labonne](https://huggingface.co/mlabonne) using the following configuration.
|
13 |
+
|
14 |
+
## 🧩 Configuration
|
15 |
+
|
16 |
+
```yaml
|
17 |
+
models:
|
18 |
+
- model: mistralai/Mistral-7B-v0.1
|
19 |
+
- model: BarraHome/Mistroll-7B-v2.2
|
20 |
+
- model: AurelPx/Percival_01-7b-slerp
|
21 |
+
merge_method: model_stock
|
22 |
+
base_model: mistralai/Mistral-7B-v0.1
|
23 |
+
dtype: bfloat16
|
24 |
+
```
|
25 |
+
|
26 |
+
## 💻 Usage
|
27 |
+
|
28 |
+
```python
|
29 |
+
!pip install -qU transformers accelerate
|
30 |
+
|
31 |
+
from transformers import AutoTokenizer
|
32 |
+
import transformers
|
33 |
+
import torch
|
34 |
+
|
35 |
+
model = "automerger/MistrollPercival_01-7B"
|
36 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
37 |
+
|
38 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
39 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
40 |
+
pipeline = transformers.pipeline(
|
41 |
+
"text-generation",
|
42 |
+
model=model,
|
43 |
+
torch_dtype=torch.float16,
|
44 |
+
device_map="auto",
|
45 |
+
)
|
46 |
+
|
47 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
48 |
+
print(outputs[0]["generated_text"])
|
49 |
+
```
|