automerger commited on
Commit
8885b63
1 Parent(s): 9ae0972

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +58 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - merge
5
+ - mergekit
6
+ - lazymergekit
7
+ - automerger
8
+ base_model:
9
+ - CorticalStack/shadow-clown-7B-slerp
10
+ ---
11
+
12
+ # Percival_01Shadow-7B
13
+
14
+ Percival_01Shadow-7B is an automated merge created by [Maxime Labonne](https://huggingface.co/mlabonne) using the following configuration.
15
+ * [CorticalStack/shadow-clown-7B-slerp](https://huggingface.co/CorticalStack/shadow-clown-7B-slerp)
16
+
17
+ ## 🧩 Configuration
18
+
19
+ ```yaml
20
+ models:
21
+ - model: AurelPx/Percival_01-7b-slerp
22
+ # No parameters necessary for base model
23
+ - model: CorticalStack/shadow-clown-7B-slerp
24
+ parameters:
25
+ density: 0.53
26
+ weight: 0.6
27
+ merge_method: dare_ties
28
+ base_model: AurelPx/Percival_01-7b-slerp
29
+ parameters:
30
+ int8_mask: true
31
+ dtype: bfloat16
32
+ random_seed: 0
33
+ ```
34
+
35
+ ## 💻 Usage
36
+
37
+ ```python
38
+ !pip install -qU transformers accelerate
39
+
40
+ from transformers import AutoTokenizer
41
+ import transformers
42
+ import torch
43
+
44
+ model = "automerger/Percival_01Shadow-7B"
45
+ messages = [{"role": "user", "content": "What is a large language model?"}]
46
+
47
+ tokenizer = AutoTokenizer.from_pretrained(model)
48
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
49
+ pipeline = transformers.pipeline(
50
+ "text-generation",
51
+ model=model,
52
+ torch_dtype=torch.float16,
53
+ device_map="auto",
54
+ )
55
+
56
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
57
+ print(outputs[0]["generated_text"])
58
+ ```