Suparious commited on
Commit
2de6003
·
verified ·
1 Parent(s): 49d22dd

add model card

Browse files
Files changed (1) hide show
  1. README.md +225 -0
README.md CHANGED
@@ -1,3 +1,228 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ library_name: transformers
4
+ tags:
5
+ - chemistry
6
+ - math
7
+ - code
8
+ - physics
9
+ - quantized
10
+ - 4-bit
11
+ - AWQ
12
+ - text-generation
13
+ - autotrain_compatible
14
+ - endpoints_compatible
15
+ - chatml
16
+ base_model: mistralai/Mistral-7B-v0.1
17
+ datasets:
18
+ - Locutusque/hercules-v2.0
19
+ - Locutusque/hercules-v2.5
20
+ model-index:
21
+ - name: Hercules-2.5-Mistral-7B
22
+ results:
23
+ - task:
24
+ type: text-generation
25
+ name: Text Generation
26
+ dataset:
27
+ name: AI2 Reasoning Challenge (25-Shot)
28
+ type: ai2_arc
29
+ config: ARC-Challenge
30
+ split: test
31
+ args:
32
+ num_few_shot: 25
33
+ metrics:
34
+ - type: acc_norm
35
+ value: 62.03
36
+ name: normalized accuracy
37
+ source:
38
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Locutusque/Hercules-2.5-Mistral-7B
39
+ name: Open LLM Leaderboard
40
+ - task:
41
+ type: text-generation
42
+ name: Text Generation
43
+ dataset:
44
+ name: HellaSwag (10-Shot)
45
+ type: hellaswag
46
+ split: validation
47
+ args:
48
+ num_few_shot: 10
49
+ metrics:
50
+ - type: acc_norm
51
+ value: 83.79
52
+ name: normalized accuracy
53
+ source:
54
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Locutusque/Hercules-2.5-Mistral-7B
55
+ name: Open LLM Leaderboard
56
+ - task:
57
+ type: text-generation
58
+ name: Text Generation
59
+ dataset:
60
+ name: MMLU (5-Shot)
61
+ type: cais/mmlu
62
+ config: all
63
+ split: test
64
+ args:
65
+ num_few_shot: 5
66
+ metrics:
67
+ - type: acc
68
+ value: 63.49
69
+ name: accuracy
70
+ source:
71
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Locutusque/Hercules-2.5-Mistral-7B
72
+ name: Open LLM Leaderboard
73
+ - task:
74
+ type: text-generation
75
+ name: Text Generation
76
+ dataset:
77
+ name: TruthfulQA (0-shot)
78
+ type: truthful_qa
79
+ config: multiple_choice
80
+ split: validation
81
+ args:
82
+ num_few_shot: 0
83
+ metrics:
84
+ - type: mc2
85
+ value: 43.44
86
+ source:
87
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Locutusque/Hercules-2.5-Mistral-7B
88
+ name: Open LLM Leaderboard
89
+ - task:
90
+ type: text-generation
91
+ name: Text Generation
92
+ dataset:
93
+ name: Winogrande (5-shot)
94
+ type: winogrande
95
+ config: winogrande_xl
96
+ split: validation
97
+ args:
98
+ num_few_shot: 5
99
+ metrics:
100
+ - type: acc
101
+ value: 79.72
102
+ name: accuracy
103
+ source:
104
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Locutusque/Hercules-2.5-Mistral-7B
105
+ name: Open LLM Leaderboard
106
+ - task:
107
+ type: text-generation
108
+ name: Text Generation
109
+ dataset:
110
+ name: GSM8k (5-shot)
111
+ type: gsm8k
112
+ config: main
113
+ split: test
114
+ args:
115
+ num_few_shot: 5
116
+ metrics:
117
+ - type: acc
118
+ value: 49.05
119
+ name: accuracy
120
+ source:
121
+ url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=Locutusque/Hercules-2.5-Mistral-7B
122
+ name: Open LLM Leaderboard
123
+ language:
124
+ - en
125
+ model_creator: Locutusque
126
+ model_name: Hercules-2.5-Mistral-7B
127
+ model_type: mistral
128
+ pipeline_tag: text-generation
129
+ inference: false
130
+ prompt_template: '<|im_start|>system
131
+
132
+ {system_message}<|im_end|>
133
+
134
+ <|im_start|>user
135
+
136
+ {prompt}<|im_end|>
137
+
138
+ <|im_start|>assistant
139
+
140
+ '
141
+ quantized_by: Suparious
142
  ---
143
+ # Model Card: Hercules-2.5-Mistral-7B AWQ
144
+
145
+ - Model creator: [Locutusque](https://huggingface.co/Locutusque)
146
+ - Original model: [Hercules-2.5-Mistral-7B](https://huggingface.co/Locutusque/Hercules-2.5-Mistral-7B)
147
+
148
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6437292ecd93f4c9a34b0d47/aaxvEOjNxHKZ7rRGPolW-.png)
149
+
150
+ ## Model Description
151
+
152
+ Hercules-2.5-Mistral-7B is a fine-tuned language model derived from Mistralai/Mistral-7B-v0.1. It is specifically designed to excel in instruction following, function calls, and conversational interactions across various scientific and technical domains. The dataset used for fine-tuning, also named Hercules-v2.5, expands upon the diverse capabilities of OpenHermes-2.5 with contributions from numerous curated datasets. This fine-tuning has hercules-v2.5 with enhanced abilities in:
153
+
154
+ - Complex Instruction Following: Understanding and accurately executing multi-step instructions, even those involving specialized terminology.
155
+ - Function Calling: Seamlessly interpreting and executing function calls, providing appropriate input and output values.
156
+ - Domain-Specific Knowledge: Engaging in informative and educational conversations about Biology, Chemistry, Physics, Mathematics, Medicine, Computer Science, and more.
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/Hercules-2.5-Mistral-7B-AWQ"
173
+ system_message = "You are Senzu, 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
+ ```