jieunhan commited on
Commit
39cbf54
โ€ข
1 Parent(s): e28d475

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -0
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
+ ```