Smokeweaver commited on
Commit
17d1812
1 Parent(s): 2b5ad02

add model card

Browse files
Files changed (1) hide show
  1. README.md +226 -1
README.md CHANGED
@@ -1,3 +1,228 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: cc-by-nc-4.0
3
+ tags:
4
+ - merge
5
+ - mergekit
6
+ - lazymergekit
7
+ - quantized
8
+ - 4-bit
9
+ - AWQ
10
+ - text-generation
11
+ - autotrain_compatible
12
+ - endpoints_compatible
13
+ - chatml
14
+ base_model:
15
+ - mlabonne/OmniTruthyBeagle-7B-v0
16
+ - mlabonne/NeuBeagle-7B
17
+ - mlabonne/NeuralOmniBeagle-7B
18
+ model-index:
19
+ - name: Monarch-7B
20
+ results:
21
+ - task:
22
+ type: text-generation
23
+ name: Text Generation
24
+ dataset:
25
+ name: AI2 Reasoning Challenge (25-Shot)
26
+ type: ai2_arc
27
+ config: ARC-Challenge
28
+ split: test
29
+ args:
30
+ num_few_shot: 25
31
+ metrics:
32
+ - type: acc_norm
33
+ value: 73.04
34
+ name: normalized accuracy
35
+ source:
36
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7B
37
+ name: Open LLM Leaderboard
38
+ - task:
39
+ type: text-generation
40
+ name: Text Generation
41
+ dataset:
42
+ name: HellaSwag (10-Shot)
43
+ type: hellaswag
44
+ split: validation
45
+ args:
46
+ num_few_shot: 10
47
+ metrics:
48
+ - type: acc_norm
49
+ value: 89.03
50
+ name: normalized accuracy
51
+ source:
52
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7B
53
+ name: Open LLM Leaderboard
54
+ - task:
55
+ type: text-generation
56
+ name: Text Generation
57
+ dataset:
58
+ name: MMLU (5-Shot)
59
+ type: cais/mmlu
60
+ config: all
61
+ split: test
62
+ args:
63
+ num_few_shot: 5
64
+ metrics:
65
+ - type: acc
66
+ value: 64.41
67
+ name: accuracy
68
+ source:
69
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7B
70
+ name: Open LLM Leaderboard
71
+ - task:
72
+ type: text-generation
73
+ name: Text Generation
74
+ dataset:
75
+ name: TruthfulQA (0-shot)
76
+ type: truthful_qa
77
+ config: multiple_choice
78
+ split: validation
79
+ args:
80
+ num_few_shot: 0
81
+ metrics:
82
+ - type: mc2
83
+ value: 77.35
84
+ source:
85
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7B
86
+ name: Open LLM Leaderboard
87
+ - task:
88
+ type: text-generation
89
+ name: Text Generation
90
+ dataset:
91
+ name: Winogrande (5-shot)
92
+ type: winogrande
93
+ config: winogrande_xl
94
+ split: validation
95
+ args:
96
+ num_few_shot: 5
97
+ metrics:
98
+ - type: acc
99
+ value: 84.61
100
+ name: accuracy
101
+ source:
102
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7B
103
+ name: Open LLM Leaderboard
104
+ - task:
105
+ type: text-generation
106
+ name: Text Generation
107
+ dataset:
108
+ name: GSM8k (5-shot)
109
+ type: gsm8k
110
+ config: main
111
+ split: test
112
+ args:
113
+ num_few_shot: 5
114
+ metrics:
115
+ - type: acc
116
+ value: 69.07
117
+ name: accuracy
118
+ source:
119
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7B
120
+ name: Open LLM Leaderboard
121
+ library_name: transformers
122
+ language:
123
+ - en
124
+ model_creator: mlabonne
125
+ model_name: Darewin-7B
126
+ model_type: mistral
127
+ pipeline_tag: text-generation
128
+ inference: false
129
+ prompt_template: '<|im_start|>system
130
+
131
+ {system_message}<|im_end|>
132
+
133
+ <|im_start|>user
134
+
135
+ {prompt}<|im_end|>
136
+
137
+ <|im_start|>assistant
138
+
139
+ '
140
+ quantized_by: Suparious
141
  ---
142
+ # mlabonne/Monarch-7B AWQ
143
+
144
+ - Model creator: [mlabonne](https://huggingface.co/mlabonne)
145
+ - Original model: [Monarch-7B](https://huggingface.co/mlabonne/Monarch-7B)
146
+
147
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/zDCZ6uIu68k1JeCOa9bHl.jpeg)
148
+
149
+ ## Model Summary
150
+
151
+ **Update 13/02/24: Monarch-7B is the best-performing model on the YALL leaderboard.**
152
+
153
+ Monarch-7B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
154
+ * [mlabonne/OmniTruthyBeagle-7B-v0](https://huggingface.co/mlabonne/OmniTruthyBeagle-7B-v0)
155
+ * [mlabonne/NeuBeagle-7B](https://huggingface.co/mlabonne/NeuBeagle-7B)
156
+ * [mlabonne/NeuralOmniBeagle-7B](https://huggingface.co/mlabonne/NeuralOmniBeagle-7B)
157
+
158
+ ## How to use
159
+
160
+ ### Install the necessary packages
161
+
162
+ ```bash
163
+ pip install --upgrade autoawq autoawq-kernels
164
+ ```
165
+
166
+ ### Example Python code
167
+
168
+ ```python
169
+ from awq import AutoAWQForCausalLM
170
+ from transformers import AutoTokenizer, TextStreamer
171
+
172
+ model_path = "solidrust/Monarch-7B-AWQ"
173
+ system_message = "You are Darewin, incarnated as a powerful AI."
174
+
175
+ # Load model
176
+ model = AutoAWQForCausalLM.from_quantized(model_path,
177
+ fuse_layers=True)
178
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
179
+ trust_remote_code=True)
180
+ streamer = TextStreamer(tokenizer,
181
+ skip_prompt=True,
182
+ skip_special_tokens=True)
183
+
184
+ # Convert prompt to tokens
185
+ prompt_template = """\
186
+ <|im_start|>system
187
+ {system_message}<|im_end|>
188
+ <|im_start|>user
189
+ {prompt}<|im_end|>
190
+ <|im_start|>assistant"""
191
+
192
+ prompt = "You're standing on the surface of the Earth. "\
193
+ "You walk one mile south, one mile west and one mile north. "\
194
+ "You end up exactly where you started. Where are you?"
195
+
196
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
197
+ return_tensors='pt').input_ids.cuda()
198
+
199
+ # Generate output
200
+ generation_output = model.generate(tokens,
201
+ streamer=streamer,
202
+ max_new_tokens=512)
203
+
204
+ ```
205
+
206
+ ### About AWQ
207
+
208
+ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
209
+
210
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
211
+
212
+ It is supported by:
213
+
214
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
215
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
216
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
217
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
218
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
219
+
220
+ ## Prompt template: ChatML
221
+
222
+ ```plaintext
223
+ <|im_start|>system
224
+ {system_message}<|im_end|>
225
+ <|im_start|>user
226
+ {prompt}<|im_end|>
227
+ <|im_start|>assistant
228
+ ```