Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,63 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- moe
|
5 |
+
- frankenmoe
|
6 |
+
- merge
|
7 |
+
- mergekit
|
8 |
+
- lazymergekit
|
9 |
+
- beomi/OPEN-SOLAR-KO-10.7B
|
10 |
+
- hyeogi/SOLAR-10.7B-dpo-v1
|
11 |
+
- GAI-LLM/OPEN-SOLAR-KO-10.7B-mixed-v15
|
12 |
+
- megastudyedu/M-SOLAR-10.7B-v1.1-beta
|
13 |
+
base_model:
|
14 |
+
- beomi/OPEN-SOLAR-KO-10.7B
|
15 |
+
- hyeogi/SOLAR-10.7B-dpo
|
16 |
+
- GAI-LLM/OPEN-SOLAR-KO-10.7B-mixed-v15
|
17 |
+
- megastudyedu/M-SOLAR-10.7B-v1.1-beta
|
18 |
+
|
19 |
---
|
20 |
+
|
21 |
+
# solar_merge_test_2
|
22 |
+
|
23 |
+
## ๐งฉ Configuration
|
24 |
+
|
25 |
+
```yaml
|
26 |
+
base_model: beomi/OPEN-SOLAR-KO-10.7B
|
27 |
+
dtype: float16
|
28 |
+
experts:
|
29 |
+
- source_model: beomi/OPEN-SOLAR-KO-10.7B
|
30 |
+
positive_prompts: ["๋น์ ์ ์น์ ํ ๋ณดํธ์ ์ธ ์ด์์คํดํธ์ด๋ค."]
|
31 |
+
- source_model: hyeogi/SOLAR-10.7B-dpo-v1
|
32 |
+
positive_prompts: ["๋น์ ์ ์น์ ํ ์ด์์คํดํธ์ด๋ค."]
|
33 |
+
- source_model: GAI-LLM/OPEN-SOLAR-KO-10.7B-mixed-v15
|
34 |
+
positive_prompts: ["๋น์ ์ ์น์ ํ ์ด์์คํดํธ์ด๋ค."]
|
35 |
+
- source_model: megastudyedu/M-SOLAR-10.7B-v1.1-beta
|
36 |
+
positive_prompts: ["๋น์ ์ ์น์ ํ ์ด์์คํดํธ์ด๋ค."]
|
37 |
+
gate_mode: cheap_embed
|
38 |
+
tokenizer_source: base
|
39 |
+
```
|
40 |
+
|
41 |
+
## ๐ป Usage
|
42 |
+
|
43 |
+
```python
|
44 |
+
!pip install -qU transformers bitsandbytes accelerate
|
45 |
+
|
46 |
+
from transformers import AutoTokenizer
|
47 |
+
import transformers
|
48 |
+
import torch
|
49 |
+
|
50 |
+
model = "jieunhan/solar_merge_test_2"
|
51 |
+
|
52 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
53 |
+
pipeline = transformers.pipeline(
|
54 |
+
"text-generation",
|
55 |
+
model=model,
|
56 |
+
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
57 |
+
)
|
58 |
+
|
59 |
+
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
|
60 |
+
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
61 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
62 |
+
print(outputs[0]["generated_text"])
|
63 |
+
```
|