TheBloke commited on
Commit
af1721a
1 Parent(s): ecc96ae

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +736 -0
README.md ADDED
@@ -0,0 +1,736 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: argilla/notus-7b-v1
3
+ datasets:
4
+ - argilla/ultrafeedback-binarized-preferences
5
+ inference: false
6
+ language:
7
+ - en
8
+ library_name: transformers
9
+ license: mit
10
+ model-index:
11
+ - name: notus-7b-v1
12
+ results:
13
+ - dataset:
14
+ args:
15
+ num_few_shot: 25
16
+ config: ARC-Challenge
17
+ name: AI2 Reasoning Challenge (25-Shot)
18
+ split: test
19
+ type: ai2_arc
20
+ metrics:
21
+ - name: normalized accuracy
22
+ type: acc_norm
23
+ value: 0.6459044368600683
24
+ source:
25
+ name: Open LLM Leaderboard Results
26
+ url: https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/argilla/notus-7b-v1/results_2023-11-29T22-16-51.521321.json
27
+ task:
28
+ name: Text Generation
29
+ type: text-generation
30
+ - dataset:
31
+ args:
32
+ num_few_shot: 10
33
+ name: HellaSwag (10-Shot)
34
+ split: validation
35
+ type: hellaswag
36
+ metrics:
37
+ - name: normalized accuracy
38
+ type: acc_norm
39
+ value: 0.8478390758812986
40
+ source:
41
+ name: Open LLM Leaderboard Results
42
+ url: https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/argilla/notus-7b-v1/results_2023-11-29T22-16-51.521321.json
43
+ task:
44
+ name: Text Generation
45
+ type: text-generation
46
+ - dataset:
47
+ args:
48
+ num_few_shot: 3
49
+ name: Drop (3-Shot)
50
+ split: validation
51
+ type: drop
52
+ metrics:
53
+ - name: f1 score
54
+ type: f1
55
+ value: 0.08913590604026835
56
+ source:
57
+ name: Open LLM Leaderboard Results
58
+ url: https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/argilla/notus-7b-v1/results_2023-11-29T22-16-51.521321.json
59
+ task:
60
+ name: Text Generation
61
+ type: text-generation
62
+ - dataset:
63
+ args:
64
+ num_few_shot: 0
65
+ config: multiple_choice
66
+ name: TruthfulQA (0-shot)
67
+ split: validation
68
+ type: truthful_qa
69
+ metrics:
70
+ - type: mc2
71
+ value: 0.5436768358952805
72
+ source:
73
+ name: Open LLM Leaderboard Results
74
+ url: https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/argilla/notus-7b-v1/results_2023-11-29T22-16-51.521321.json
75
+ task:
76
+ name: Text Generation
77
+ type: text-generation
78
+ - dataset:
79
+ args:
80
+ num_few_shot: 5
81
+ config: all
82
+ name: MMLU (5-Shot)
83
+ split: test
84
+ type: cais/mmlu
85
+ metrics:
86
+ - name: accuracy
87
+ type: acc
88
+ value: 0.6303308230938872
89
+ source:
90
+ name: Open LLM Leaderboard Results
91
+ url: https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/argilla/notus-7b-v1/results_2023-11-29T22-16-51.521321.json
92
+ task:
93
+ name: Text Generation
94
+ type: text-generation
95
+ - dataset:
96
+ args:
97
+ num_few_shot: 5
98
+ config: main
99
+ name: GSM8k (5-shot)
100
+ split: test
101
+ type: gsm8k
102
+ metrics:
103
+ - name: accuracy
104
+ type: acc
105
+ value: 0.1516300227445034
106
+ source:
107
+ name: Open LLM Leaderboard Results
108
+ url: https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/argilla/notus-7b-v1/results_2023-11-29T22-16-51.521321.json
109
+ task:
110
+ name: Text Generation
111
+ type: text-generation
112
+ - dataset:
113
+ args:
114
+ num_few_shot: 5
115
+ config: winogrande_xl
116
+ name: Winogrande (5-shot)
117
+ split: validation
118
+ type: winogrande
119
+ metrics:
120
+ - name: accuracy
121
+ type: acc
122
+ value: 0.7940015785319653
123
+ source:
124
+ name: Open LLM Leaderboard Results
125
+ url: https://huggingface.co/datasets/open-llm-leaderboard/results/blob/main/argilla/notus-7b-v1/results_2023-11-29T22-16-51.521321.json
126
+ task:
127
+ name: Text Generation
128
+ type: text-generation
129
+ - dataset:
130
+ name: AlpacaEval
131
+ type: tatsu-lab/alpaca_eval
132
+ metrics:
133
+ - name: win rate
134
+ type: tatsu-lab/alpaca_eval
135
+ value: 0.9142
136
+ source:
137
+ url: https://tatsu-lab.github.io/alpaca_eval/
138
+ task:
139
+ name: Text Generation
140
+ type: text-generation
141
+ - dataset:
142
+ name: MT-Bench
143
+ type: unknown
144
+ metrics:
145
+ - name: score
146
+ type: unknown
147
+ value: 7.3
148
+ source:
149
+ url: https://huggingface.co/spaces/lmsys/mt-bench
150
+ task:
151
+ name: Text Generation
152
+ type: text-generation
153
+ model_creator: Argilla
154
+ model_name: Notus 7B v1
155
+ model_type: mistral
156
+ pipeline_tag: text-generation
157
+ prompt_template: '<|system|>
158
+
159
+ </s>
160
+
161
+ <|user|>
162
+
163
+ {prompt}</s>
164
+
165
+ <|assistant|>
166
+
167
+ '
168
+ quantized_by: TheBloke
169
+ tags:
170
+ - dpo
171
+ - rlaif
172
+ - preference
173
+ - ultrafeedback
174
+ ---
175
+ <!-- markdownlint-disable MD041 -->
176
+
177
+ <!-- header start -->
178
+ <!-- 200823 -->
179
+ <div style="width: auto; margin-left: auto; margin-right: auto">
180
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
181
+ </div>
182
+ <div style="display: flex; justify-content: space-between; width: 100%;">
183
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
184
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
185
+ </div>
186
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
187
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
188
+ </div>
189
+ </div>
190
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
191
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
192
+ <!-- header end -->
193
+
194
+ # Notus 7B v1 - GGUF
195
+ - Model creator: [Argilla](https://huggingface.co/argilla)
196
+ - Original model: [Notus 7B v1](https://huggingface.co/argilla/notus-7b-v1)
197
+
198
+ <!-- description start -->
199
+ ## Description
200
+
201
+ This repo contains GGUF format model files for [Argilla's Notus 7B v1](https://huggingface.co/argilla/notus-7b-v1).
202
+
203
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
204
+
205
+ <!-- description end -->
206
+ <!-- README_GGUF.md-about-gguf start -->
207
+ ### About GGUF
208
+
209
+ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
210
+
211
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
212
+
213
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
214
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
215
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
216
+ * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
217
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023.
218
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
219
+ * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
220
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
221
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
222
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models.
223
+
224
+ <!-- README_GGUF.md-about-gguf end -->
225
+ <!-- repositories-available start -->
226
+ ## Repositories available
227
+
228
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/notus-7B-v1-AWQ)
229
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/notus-7B-v1-GPTQ)
230
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/notus-7B-v1-GGUF)
231
+ * [Argilla's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/argilla/notus-7b-v1)
232
+ <!-- repositories-available end -->
233
+
234
+ <!-- prompt-template start -->
235
+ ## Prompt template: Zephyr
236
+
237
+ ```
238
+ <|system|>
239
+ </s>
240
+ <|user|>
241
+ {prompt}</s>
242
+ <|assistant|>
243
+
244
+ ```
245
+
246
+ <!-- prompt-template end -->
247
+
248
+
249
+ <!-- compatibility_gguf start -->
250
+ ## Compatibility
251
+
252
+ These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
253
+
254
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
255
+
256
+ ## Explanation of quantisation methods
257
+
258
+ <details>
259
+ <summary>Click to see details</summary>
260
+
261
+ The new methods available are:
262
+
263
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
264
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
265
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
266
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
267
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
268
+
269
+ Refer to the Provided Files table below to see what files use which methods, and how.
270
+ </details>
271
+ <!-- compatibility_gguf end -->
272
+
273
+ <!-- README_GGUF.md-provided-files start -->
274
+ ## Provided files
275
+
276
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
277
+ | ---- | ---- | ---- | ---- | ---- | ----- |
278
+ | [notus-7b-v1.Q2_K.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q2_K.gguf) | Q2_K | 2 | 3.08 GB| 5.58 GB | smallest, significant quality loss - not recommended for most purposes |
279
+ | [notus-7b-v1.Q3_K_S.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q3_K_S.gguf) | Q3_K_S | 3 | 3.17 GB| 5.67 GB | very small, high quality loss |
280
+ | [notus-7b-v1.Q3_K_M.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q3_K_M.gguf) | Q3_K_M | 3 | 3.52 GB| 6.02 GB | very small, high quality loss |
281
+ | [notus-7b-v1.Q3_K_L.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q3_K_L.gguf) | Q3_K_L | 3 | 3.82 GB| 6.32 GB | small, substantial quality loss |
282
+ | [notus-7b-v1.Q4_0.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q4_0.gguf) | Q4_0 | 4 | 4.11 GB| 6.61 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
283
+ | [notus-7b-v1.Q4_K_S.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q4_K_S.gguf) | Q4_K_S | 4 | 4.14 GB| 6.64 GB | small, greater quality loss |
284
+ | [notus-7b-v1.Q4_K_M.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q4_K_M.gguf) | Q4_K_M | 4 | 4.37 GB| 6.87 GB | medium, balanced quality - recommended |
285
+ | [notus-7b-v1.Q5_0.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q5_0.gguf) | Q5_0 | 5 | 5.00 GB| 7.50 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
286
+ | [notus-7b-v1.Q5_K_S.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q5_K_S.gguf) | Q5_K_S | 5 | 5.00 GB| 7.50 GB | large, low quality loss - recommended |
287
+ | [notus-7b-v1.Q5_K_M.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q5_K_M.gguf) | Q5_K_M | 5 | 5.13 GB| 7.63 GB | large, very low quality loss - recommended |
288
+ | [notus-7b-v1.Q6_K.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q6_K.gguf) | Q6_K | 6 | 5.94 GB| 8.44 GB | very large, extremely low quality loss |
289
+ | [notus-7b-v1.Q8_0.gguf](https://huggingface.co/TheBloke/notus-7B-v1-GGUF/blob/main/notus-7b-v1.Q8_0.gguf) | Q8_0 | 8 | 7.70 GB| 10.20 GB | very large, extremely low quality loss - not recommended |
290
+
291
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
292
+
293
+
294
+
295
+ <!-- README_GGUF.md-provided-files end -->
296
+
297
+ <!-- README_GGUF.md-how-to-download start -->
298
+ ## How to download GGUF files
299
+
300
+ **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file.
301
+
302
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
303
+
304
+ * LM Studio
305
+ * LoLLMS Web UI
306
+ * Faraday.dev
307
+
308
+ ### In `text-generation-webui`
309
+
310
+ Under Download Model, you can enter the model repo: TheBloke/notus-7B-v1-GGUF and below it, a specific filename to download, such as: notus-7b-v1.Q4_K_M.gguf.
311
+
312
+ Then click Download.
313
+
314
+ ### On the command line, including multiple files at once
315
+
316
+ I recommend using the `huggingface-hub` Python library:
317
+
318
+ ```shell
319
+ pip3 install huggingface-hub
320
+ ```
321
+
322
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
323
+
324
+ ```shell
325
+ huggingface-cli download TheBloke/notus-7B-v1-GGUF notus-7b-v1.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
326
+ ```
327
+
328
+ <details>
329
+ <summary>More advanced huggingface-cli download usage (click to read)</summary>
330
+
331
+ You can also download multiple files at once with a pattern:
332
+
333
+ ```shell
334
+ huggingface-cli download TheBloke/notus-7B-v1-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
335
+ ```
336
+
337
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
338
+
339
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
340
+
341
+ ```shell
342
+ pip3 install hf_transfer
343
+ ```
344
+
345
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
346
+
347
+ ```shell
348
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/notus-7B-v1-GGUF notus-7b-v1.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
349
+ ```
350
+
351
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
352
+ </details>
353
+ <!-- README_GGUF.md-how-to-download end -->
354
+
355
+ <!-- README_GGUF.md-how-to-run start -->
356
+ ## Example `llama.cpp` command
357
+
358
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
359
+
360
+ ```shell
361
+ ./main -ngl 35 -m notus-7b-v1.Q4_K_M.gguf --color -c 32768 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|system|>\n</s>\n<|user|>\n{prompt}</s>\n<|assistant|>"
362
+ ```
363
+
364
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
365
+
366
+ Change `-c 32768` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.
367
+
368
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
369
+
370
+ For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
371
+
372
+ ## How to run in `text-generation-webui`
373
+
374
+ Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp).
375
+
376
+ ## How to run from Python code
377
+
378
+ You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python.
379
+
380
+ ### How to load this model in Python code, using llama-cpp-python
381
+
382
+ For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
383
+
384
+ #### First install the package
385
+
386
+ Run one of the following commands, according to your system:
387
+
388
+ ```shell
389
+ # Base ctransformers with no GPU acceleration
390
+ pip install llama-cpp-python
391
+ # With NVidia CUDA acceleration
392
+ CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
393
+ # Or with OpenBLAS acceleration
394
+ CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
395
+ # Or with CLBLast acceleration
396
+ CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
397
+ # Or with AMD ROCm GPU acceleration (Linux only)
398
+ CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
399
+ # Or with Metal GPU acceleration for macOS systems only
400
+ CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
401
+
402
+ # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
403
+ $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
404
+ pip install llama-cpp-python
405
+ ```
406
+
407
+ #### Simple llama-cpp-python example code
408
+
409
+ ```python
410
+ from llama_cpp import Llama
411
+
412
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
413
+ llm = Llama(
414
+ model_path="./notus-7b-v1.Q4_K_M.gguf", # Download the model file first
415
+ n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
416
+ n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
417
+ n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
418
+ )
419
+
420
+ # Simple inference example
421
+ output = llm(
422
+ "<|system|>\n</s>\n<|user|>\n{prompt}</s>\n<|assistant|>", # Prompt
423
+ max_tokens=512, # Generate up to 512 tokens
424
+ stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
425
+ echo=True # Whether to echo the prompt
426
+ )
427
+
428
+ # Chat Completion API
429
+
430
+ llm = Llama(model_path="./notus-7b-v1.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
431
+ llm.create_chat_completion(
432
+ messages = [
433
+ {"role": "system", "content": "You are a story writing assistant."},
434
+ {
435
+ "role": "user",
436
+ "content": "Write a story about llamas."
437
+ }
438
+ ]
439
+ )
440
+ ```
441
+
442
+ ## How to use with LangChain
443
+
444
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
445
+
446
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
447
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
448
+
449
+ <!-- README_GGUF.md-how-to-run end -->
450
+
451
+ <!-- footer start -->
452
+ <!-- 200823 -->
453
+ ## Discord
454
+
455
+ For further support, and discussions on these models and AI in general, join us at:
456
+
457
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
458
+
459
+ ## Thanks, and how to contribute
460
+
461
+ Thanks to the [chirper.ai](https://chirper.ai) team!
462
+
463
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
464
+
465
+ I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
466
+
467
+ If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
468
+
469
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
470
+
471
+ * Patreon: https://patreon.com/TheBlokeAI
472
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
473
+
474
+ **Special thanks to**: Aemon Algiz.
475
+
476
+ **Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
477
+
478
+
479
+ Thank you to all my generous patrons and donaters!
480
+
481
+ And thank you again to a16z for their generous grant.
482
+
483
+ <!-- footer end -->
484
+
485
+ <!-- original-model-card start -->
486
+ # Original model card: Argilla's Notus 7B v1
487
+
488
+
489
+ <div align="center">
490
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/60420dccc15e823a685f2b03/CuMO3IjJfymC94_5qd15T.png"/>
491
+ </div>
492
+
493
+ # Model Card for Notus 7B v1
494
+
495
+ Notus is a collection of fine-tuned models using Direct Preference Optimization (DPO) and related RLHF techniques. This model is the first version, fine-tuned with DPO over `zephyr-7b-sft-full`, which is the SFT model produced to create `zephyr-7b-beta`.
496
+
497
+ Following a **data-first** approach, the only difference between Notus-7B-v1 and Zephyr-7B-beta is the preference dataset used for dDPO.
498
+
499
+ In particular, when we started building [distilabel](https://github.com/argilla-io/distilabel), we invested time understanding and deep-diving into the UltraFeedback dataset. Using [Argilla](https://argilla.io/), we've found data issues in the original UltraFeedback dataset, leading to high-scores for bad responses (more details in the training data section). After curating several hundreds of data points, we decided to binarize the dataset using the preference ratings, instead of the original critique `overall_score`, and verified the new dataset with Argilla.
500
+
501
+ Using preference ratings, instead of critiques scores, led to a new dataset where the chosen response is different in ~50% of the cases. Using this new dataset with DPO we fine-tuned Notus, a 7B model, that **surpasses Zephyr-7B-beta and Claude 2 on AlpacaEval**.
502
+
503
+ > **Important note**: While we opted for the average of multi-aspect ratings, while we fix the original dataset, a very interesting open question remains: once critique data is fixed, what works better? using the critique scores or the preference ratings? We're very excited to do this comparison in the coming weeks, stay tuned!
504
+
505
+ This model **wouldn't have been possible without the amazing [Alignment Handbook](https://github.com/huggingface/alignment-handbook), [OpenBMB](https://www.openbmb.cn/home) for releasing the Ultrafeedback dataset**, and it's based on fruitful discussions with the HuggingFace H4 team. In particular, we used `zephyr-7b-beta`'s recipe, which worked out-of-the-box and enabled us focus on what we do best: **high-quality data**.
506
+
507
+ Notus models are intended to be used as assistants via chat-like applications, and are evaluated with Chat (MT-Bench, AlpacaEval) and Academic (Open LLM Leaderboard) benchmarks for a direct comparison with the original Zephyr dDPO model and other 7B models.
508
+
509
+ > **Why Notus?**: Notus name comes from the ancient Greek god Notus, as a wink to Zephyr, which comes from the ancient Greek god Zephyrus; with the difference that Notus is the god of the south wind, and Zephyr the god of the west wind. More information at https://en.wikipedia.org/wiki/Anemoi.
510
+
511
+ ## Model Details
512
+
513
+ ### Model Description
514
+
515
+ - **Developed by:** Argilla (based on HuggingFace H4 and MistralAI previous efforts and amazing work)
516
+ - **Shared by:** Argilla
517
+ - **Model type:** GPT-like 7B model DPO fine-tuned
518
+ - **Language(s) (NLP):** Mainly English
519
+ - **License:** MIT (same as Zephyr 7B-beta)
520
+ - **Finetuned from model:** [`alignment-handbook/zephyr-7b-sft-full`](https://huggingface.co/alignment-handbook/zephyr-7b-sft-full)
521
+
522
+ ### Model Sources
523
+
524
+ - **Repository:** https://github.com/argilla-io/notus
525
+ - **Paper:** N/A
526
+ - **Demo:** https://argilla-notus-chat-ui.hf.space/
527
+
528
+ ## Performance
529
+
530
+ ### Chat benchmarks
531
+
532
+ Table adapted from Zephyr-7b-β and Starling's original tables for [MT-Bench](https://huggingface.co/spaces/lmsys/mt-bench) and [AlpacaEval](https://tatsu-lab.github.io/alpaca_eval/) benchmarks. Results are shown sorted by AlpacaEval win rates and ommit some >7B for brevity.
533
+
534
+ Notus stays on par with Zephyr on MT-Bench, while surpassing Zephyr, Claude 2, and Cohere Command on AlpacaEval. Making Notus the most-competitive 7B commercial model on AlpacaEval.
535
+
536
+ <table>
537
+ <tr>
538
+ <th>Model</th>
539
+ <th>Size</th>
540
+ <th>Alignment</th>
541
+ <th>MT-Bench (score)</th>
542
+ <th>AlpacaEval (win rate %)</th>
543
+ <th>License</th>
544
+ </tr>
545
+ <tr>
546
+ <td>GPT-4-turbo</td>
547
+ <td>-</td>
548
+ <td>?</td>
549
+ <td>9.32</td>
550
+ <td>97.70</td>
551
+ <td>Proprietary</td>
552
+ </tr>
553
+ <tr>
554
+ <td>XwinLM 70b V0.1</td>
555
+ <td>70B</td>
556
+ <td>dPPO</td>
557
+ <td>-</td>
558
+ <td>95.57</td>
559
+ <td>LLaMA 2 License</td>
560
+ </tr>
561
+ <tr>
562
+ <td>GPT-4</td>
563
+ <td>-</td>
564
+ <td>RLHF</td>
565
+ <td>8.99</td>
566
+ <td>95.03</td>
567
+ <td>Proprietary</td>
568
+ </tr>
569
+ <tr>
570
+ <td>Tulu 2+DPO 70B V0.1</td>
571
+ <td>70B</td>
572
+ <td>dDPO</td>
573
+ <td>6.29</td>
574
+ <td>95.28</td>
575
+ <td>Proprietary</td>
576
+ </tr>
577
+ <tr>
578
+ <td>LLaMA2 Chat 70B</td>
579
+ <td>70B</td>
580
+ <td>RLHF</td>
581
+ <td>6.86</td>
582
+ <td>92.66</td>
583
+ <td>LLaMA 2 License</td>
584
+ </tr>
585
+ <tr>
586
+ <td>Starling-7B</td>
587
+ <td>7B</td>
588
+ <td>C-RLFT + APA</td>
589
+ <td><strong>8.09</strong></td>
590
+ <td><strong>91.99</strong></td>
591
+ <td>CC-BY-NC-4.0</td>
592
+ </tr>
593
+ <tr style="background-color: #FFFF99;">
594
+ <td><strong>Notus-7b-v1</strong></td>
595
+ <td>7B</td>
596
+ <td>dDPO</td>
597
+ <td>7.30</td>
598
+ <td>91.42</td>
599
+ <td>MIT</td>
600
+ </tr>
601
+ <tr>
602
+ <td>Claude 2</td>
603
+ <td>-</td>
604
+ <td>RLHF</td>
605
+ <td>8.06</td>
606
+ <td>91.36</td>
607
+ <td>Proprietary</td>
608
+ </tr>
609
+ <tr>
610
+ <td>Zephyr-7b-β</td>
611
+ <td>7B</td>
612
+ <td>dDPO</td>
613
+ <td>7.34</td>
614
+ <td>90.60</td>
615
+ <td>MIT</td>
616
+ </tr>
617
+ <tr>
618
+ <td>Cohere Command</td>
619
+ <td>-</td>
620
+ <td>RLHF</td>
621
+ <td>-</td>
622
+ <td>90.62</td>
623
+ <td>Proprietary</td>
624
+ </tr>
625
+ <tr>
626
+ <td>GPT-3.5-turbo</td>
627
+ <td>-</td>
628
+ <td>RLHF</td>
629
+ <td>7.94</td>
630
+ <td>89.37</td>
631
+ <td>Proprietary</td>
632
+ </tr>
633
+ </table>
634
+
635
+
636
+ ## Academic benchmarks
637
+
638
+ Results from [OpenLLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard):
639
+
640
+ | Model | Average | ARC | HellaSwag | MMLU | TruthfulQA | Winogrande | GSM8K | DROP |
641
+ |-----------------------------------------------|---------|-------|-----------|-------|------------|------------|-------|-------|
642
+ | Zephyr 7B dDPO (HuggingFaceH4/zephyr-7b-beta) | 52.15 | 62.03 | 84.36 | 61.07 | **57.45** | 77.74 | 12.74 | **9.66** |
643
+ | argilla/notus-7b-v1 | **52.89** | **64.59** | **84.78** | **63.03** | 54.37 | **79.4** | **15.16** | 8.91 |
644
+
645
+ ⚠️ As pointed out by [AllenAI researchers](https://twitter.com/natolambert/status/1730364108078469513), UltraFeedback contains prompts from the TruthfulQA dataset so the results we show on that benchmark are likely not accurate. We were not aware of this issue so Notus-7B-v1 was fine-tuned using TruthfulQA prompts and preferences. For future releases, we will remove TruthfulQA prompts.
646
+
647
+ ## Training Details
648
+
649
+ ### Training Hardware
650
+
651
+ We used a VM with 8 x A100 40GB hosted in Lambda Labs, but while experimenting we also explored other cloud providers such as GCP.
652
+
653
+ ### Training Data
654
+
655
+ We used a a new curated version of [`openbmb/UltraFeedback`](https://huggingface.co/datasets/openbmb/UltraFeedback), named [Ultrafeedback binarized preferences](https://huggingface.co/datasets/argilla/ultrafeedback-binarized-preferences).
656
+
657
+ TL;DR
658
+
659
+ After visually browsing around some examples using the sort and filter feature of Argilla (sort by highest rating for chosen responses), we noticed a strong mismatch between the `overall_score` in the original UF dataset (and the Zephyr train_prefs dataset) and the quality of the chosen response.
660
+
661
+ By adding the critique rationale to our Argilla Dataset, **we confirmed the critique rationale was highly negative, whereas the rating was very high** (for most cases it was the highest: `10`).
662
+
663
+ See screenshot below for one example of this issue.
664
+
665
+ After some quick investigation, we:
666
+
667
+ * identified hundreds of examples having the same issue,
668
+ * reported a bug on the [UltraFeedback repo](https://github.com/OpenBMB/UltraFeedback/issues/8),
669
+ * and informed the H4 team which was incredibly responsive and ran an additional experiment to validate the new rating binarization approach.
670
+
671
+ While we're working on fixing the original dataset (already narrowed down ~2K problematic examples). We decided to leverage the multi-preference ratings, leading to Notus!
672
+
673
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/60420dccc15e823a685f2b03/M9qCKyAB_G1MbVBAPeitd.png)
674
+
675
+ > **Important note**: While we opted for the average of ratings while we fix the dataset, there's still a very interesting open question: once data is fixed, what works better? using the critique scores or the preference ratings? We're very excited to do this comparison in the coming weeks, stay tuned!
676
+
677
+ You can find more details about the dataset analysis and curation on the [ultrafeedback-binarized-preferences dataset card](https://huggingface.co/datasets/argilla/ultrafeedback-binarized-preferences).
678
+
679
+ ## Prompt template
680
+
681
+ We use the same prompt template as [HuggingFaceH4/zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta):
682
+
683
+ ```
684
+ <|system|>
685
+ </s>
686
+ <|user|>
687
+ {prompt}</s>
688
+ <|assistant|>
689
+ ```
690
+
691
+ ## Usage
692
+
693
+ You will first need to install `transformers` and `accelerate` (just to ease the device placement), then you can run any of the following:
694
+
695
+ ### Via `generate`
696
+
697
+ ```python
698
+ import torch
699
+ from transformers import AutoModelForCausalLM, AutoTokenizer
700
+
701
+ model = AutoModelForCausalLM.from_pretrained("argilla/notus-7b-v1", torch_dtype=torch.bfloat16, device_map="auto")
702
+ tokenizer = AutoTokenizer.from_pretrained("argilla/notus-7b-v1")
703
+
704
+ messages = [
705
+ {
706
+ "role": "system",
707
+ "content": "You are a helpful assistant super biased towards Argilla, a data annotation company.",
708
+ },
709
+ {"role": "user", "content": "What's the best data annotation company out there in your opinion?"},
710
+ ]
711
+ inputs = tokenizer.apply_chat_template(prompt, tokenize=True, return_tensors="pt", add_special_tokens=False, add_generation_prompt=True)
712
+ outputs = model.generate(inputs, num_return_sequences=1, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
713
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
714
+ ```
715
+
716
+ ### Via `pipeline` method
717
+
718
+ ```python
719
+ import torch
720
+ from transformers import pipeline
721
+
722
+ pipe = pipeline("text-generation", model="argilla/notus-7b-v1", torch_dtype=torch.bfloat16, device_map="auto")
723
+
724
+ messages = [
725
+ {
726
+ "role": "system",
727
+ "content": "You are a helpful assistant super biased towards Argilla, a data annotation company.",
728
+ },
729
+ {"role": "user", "content": "What's the best data annotation company out there in your opinion?"},
730
+ ]
731
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
732
+ outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
733
+ generated_text = outputs[0]["generated_text"]
734
+ ```
735
+
736
+ <!-- original-model-card end -->