jieunhan commited on
Commit
b73a228
โ€ข
1 Parent(s): e971e60

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md CHANGED
@@ -1,3 +1,54 @@
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
+ base_model:
12
+ - beomi/OPEN-SOLAR-KO-10.7B
13
+ - hyeogi/SOLAR-10.7B-dpo-v1
14
  ---
15
+
16
+ # solar_merge_test_1
17
+
18
+ ## ๐Ÿงฉ Configuration
19
+
20
+ ```yaml
21
+ base_model: beomi/OPEN-SOLAR-KO-10.7B
22
+ dtype: float16
23
+ experts:
24
+ - source_model: beomi/OPEN-SOLAR-KO-10.7B
25
+ positive_prompts: ["๋‹น์‹ ์€ ์นœ์ ˆํ•œ ๋ณดํŽธ์ ์ธ ์–ด์‹œ์Šคํ„ดํŠธ์ด๋‹ค."]
26
+ - source_model: hyeogi/SOLAR-10.7B-dpo-v1
27
+ positive_prompts: ["๋‹น์‹ ์€ ์นœ์ ˆํ•œ ์–ด์‹œ์Šคํ„ดํŠธ์ด๋‹ค."]
28
+ gate_mode: cheap_embed
29
+ tokenizer_source: base
30
+ ```
31
+
32
+ ## ๐Ÿ’ป Usage
33
+
34
+ ```python
35
+ !pip install -qU transformers bitsandbytes accelerate
36
+
37
+ from transformers import AutoTokenizer
38
+ import transformers
39
+ import torch
40
+
41
+ model = "jieunhan/solar_merge_test_1"
42
+
43
+ tokenizer = AutoTokenizer.from_pretrained(model)
44
+ pipeline = transformers.pipeline(
45
+ "text-generation",
46
+ model=model,
47
+ model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
48
+ )
49
+
50
+ messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
51
+ prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
52
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
53
+ print(outputs[0]["generated_text"])
54
+ ```