lodrick-the-lafted commited on
Commit
d64cb44
1 Parent(s): 4d76f70

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - lodrick-the-lafted/Hermes-40K
5
+ - garage-bAInd/Open-Platypus
6
+ - jondurbin/airoboros-3.2
7
+ ---
8
+
9
+ <img src=https://huggingface.co/lodrick-the-lafted/Grafted-Hermetic-Platypus-D-2x7B/resolve/main/ghp.png>
10
+
11
+ # Grafted-Hermetic-Platypus-D-2x7B
12
+
13
+ MoE merge of
14
+ - [Platyboros-Instruct-7B](https://huggingface.co/lodrick-the-lafted/Platyboros-Instruct-7B)
15
+ - [Hermes-Instruct-7B-v0.2](https://huggingface.co/lodrick-the-lafted/Hermes-Instruct-7B-v0.2)
16
+
17
+ Basically the same thing as GHP-A.
18
+
19
+ <br />
20
+ <br />
21
+
22
+ # Prompt Format
23
+
24
+ Both the default Mistral-Instruct tags and Alpaca are fine, so either:
25
+ ```
26
+ <s>[INST] {sys_prompt} {instruction} [/INST]
27
+ ```
28
+
29
+ or
30
+
31
+
32
+ ```
33
+ {sys_prompt}
34
+
35
+ ### Instruction:
36
+ {instruction}
37
+
38
+ ### Response:
39
+
40
+ ```
41
+ The tokenizer default is Alpaca this time around.
42
+
43
+ <br />
44
+ <br />
45
+
46
+ # Usage
47
+
48
+ ```python
49
+ from transformers import AutoTokenizer
50
+ import transformers
51
+ import torch
52
+
53
+ model = "lodrick-the-lafted/Grafted-Hermetic-Platypus-A-2x7B"
54
+
55
+ tokenizer = AutoTokenizer.from_pretrained(model)
56
+ pipeline = transformers.pipeline(
57
+ "text-generation",
58
+ model=model,
59
+ model_kwargs={"torch_dtype": torch.bfloat16},
60
+ )
61
+
62
+ messages = [{"role": "user", "content": "Give me a cooking recipe for an pumpkin pie."}]
63
+ prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
64
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_p=0.95)
65
+ print(outputs[0]["generated_text"])
66
+ ```
67
+