ilevytate commited on
Commit
cf91445
1 Parent(s): 7a9e02e

Upload folder using huggingface_hub

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