Jakolo121 commited on
Commit
3321f4f
1 Parent(s): 5111611

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +62 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - merge
4
+ - mergekit
5
+ - lazymergekit
6
+ - Jakolo121/Sappho_V0.0.3
7
+ - VAGOsolutions/SauerkrautLM-7b-HerO
8
+ base_model:
9
+ - Jakolo121/Sappho_V0.0.3
10
+ - VAGOsolutions/SauerkrautLM-7b-HerO
11
+ ---
12
+
13
+ # Sappho_V0.0.4
14
+
15
+ Sappho_V0.0.4 is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
16
+ * [Jakolo121/Sappho_V0.0.3](https://huggingface.co/Jakolo121/Sappho_V0.0.3)
17
+ * [VAGOsolutions/SauerkrautLM-7b-HerO](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-HerO)
18
+
19
+ ## 🧩 Configuration
20
+
21
+ ```yaml
22
+ slices:
23
+ - sources:
24
+ - model: Jakolo121/Sappho_V0.0.3
25
+ layer_range: [0, 32]
26
+ - model: VAGOsolutions/SauerkrautLM-7b-HerO
27
+ layer_range: [0, 32]
28
+ merge_method: slerp
29
+ base_model: Jakolo121/Sappho_V0.0.3
30
+ parameters:
31
+ t:
32
+ - filter: self_attn
33
+ value: [0, 0.5, 0.3, 0.7, 1]
34
+ - filter: mlp
35
+ value: [1, 0.5, 0.7, 0.3, 0]
36
+ - value: 0.5
37
+ ```
38
+
39
+ ## 💻 Usage
40
+
41
+ ```python
42
+ !pip install -qU transformers accelerate
43
+
44
+ from transformers import AutoTokenizer
45
+ import transformers
46
+ import torch
47
+
48
+ model = "Jakolo121/Sappho_V0.0.4"
49
+ messages = [{"role": "user", "content": "What is a large language model?"}]
50
+
51
+ tokenizer = AutoTokenizer.from_pretrained(model)
52
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
53
+ pipeline = transformers.pipeline(
54
+ "text-generation",
55
+ model=model,
56
+ torch_dtype=torch.float16,
57
+ device_map="auto",
58
+ )
59
+
60
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
61
+ print(outputs[0]["generated_text"])
62
+ ```