jsfs11 commited on
Commit
585f113
1 Parent(s): 9dc2239

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - merge
4
+ - mergekit
5
+ - lazymergekit
6
+ - paulml/OGNO-7B
7
+ - nlpguy/AlloyIngot
8
+ - mlabonne/Monarch-7B
9
+ base_model:
10
+ - paulml/OGNO-7B
11
+ - nlpguy/AlloyIngot
12
+ - mlabonne/Monarch-7B
13
+ ---
14
+
15
+ # RandomMergeSparsifyWEIGHTED-7B-DARETIES
16
+
17
+ RandomMergeSparsifyWEIGHTED-7B-DARETIES is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
18
+ * [paulml/OGNO-7B](https://huggingface.co/paulml/OGNO-7B)
19
+ * [nlpguy/AlloyIngot](https://huggingface.co/nlpguy/AlloyIngot)
20
+ * [mlabonne/Monarch-7B](https://huggingface.co/mlabonne/Monarch-7B)
21
+
22
+ ## 🧩 Configuration
23
+
24
+ ```yaml
25
+ models:
26
+ - model: paulml/OGNO-7B
27
+ parameters:
28
+ density: [1, 0.7, 0.3]
29
+ weight: [0, 0.3, 0.7, 1]
30
+ - model: nlpguy/AlloyIngot
31
+ parameters:
32
+ density: [1, 0.7, 0.1]
33
+ weight: [0, 0.25, 0.5, 1]
34
+ - model: mlabonne/Monarch-7B
35
+ parameters:
36
+ weight: 0.33
37
+ density: 0.33
38
+ merge_method: dare_ties
39
+ base_model: mlabonne/Monarch-7B
40
+ parameters:
41
+ int8_mask: true
42
+ normalize: true
43
+ dtype: bfloat16
44
+ ```
45
+
46
+ ## 💻 Usage
47
+
48
+ ```python
49
+ !pip install -qU transformers accelerate
50
+
51
+ from transformers import AutoTokenizer
52
+ import transformers
53
+ import torch
54
+
55
+ model = "jsfs11/RandomMergeSparsifyWEIGHTED-7B-DARETIES"
56
+ messages = [{"role": "user", "content": "What is a large language model?"}]
57
+
58
+ tokenizer = AutoTokenizer.from_pretrained(model)
59
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
60
+ pipeline = transformers.pipeline(
61
+ "text-generation",
62
+ model=model,
63
+ torch_dtype=torch.float16,
64
+ device_map="auto",
65
+ )
66
+
67
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
68
+ print(outputs[0]["generated_text"])
69
+ ```