Text Generation
Transformers
English
llama
TheBloke commited on
Commit
1acd095
1 Parent(s): 24c40cd

Initial GGML model commit

Browse files
Files changed (1) hide show
  1. README.md +282 -0
README.md ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - psmathur/orca_mini_v1_dataset
4
+ - ehartford/dolphin
5
+ inference: false
6
+ language:
7
+ - en
8
+ library_name: transformers
9
+ license: llama2
10
+ model_creator: Pankaj Mathur
11
+ model_link: https://huggingface.co/psmathur/orca_mini_v3_70b
12
+ model_name: Orca Mini v3 70B
13
+ model_type: llama
14
+ pipeline_tag: text-generation
15
+ quantized_by: TheBloke
16
+ ---
17
+
18
+ <!-- header start -->
19
+ <div style="width: 100%;">
20
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
21
+ </div>
22
+ <div style="display: flex; justify-content: space-between; width: 100%;">
23
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
24
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
25
+ </div>
26
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
27
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
28
+ </div>
29
+ </div>
30
+ <!-- header end -->
31
+
32
+ # Orca Mini v3 70B - GGML
33
+ - Model creator: [Pankaj Mathur](https://huggingface.co/psmathur)
34
+ - Original model: [Orca Mini v3 70B](https://huggingface.co/psmathur/orca_mini_v3_70b)
35
+
36
+ ## Description
37
+
38
+ This repo contains GGML format model files for [Pankaj Mathur's Orca Mini v3 70B](https://huggingface.co/psmathur/orca_mini_v3_70b).
39
+
40
+ GPU acceleration is now available for Llama 2 70B GGML files, with both CUDA (NVidia) and Metal (macOS). The following clients/libraries are known to work with these files, including with GPU acceleration:
41
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp), commit `e76d630` and later.
42
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI.
43
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), version 1.37 and later. A powerful GGML web UI, especially good for story telling.
44
+ * [LM Studio](https://lmstudio.ai/), a fully featured local GUI with GPU acceleration for both Windows and macOS. Use 0.1.11 or later for macOS GPU acceleration with 70B models.
45
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), version 0.1.77 and later. A Python library with LangChain support, and OpenAI-compatible API server.
46
+ * [ctransformers](https://github.com/marella/ctransformers), version 0.2.15 and later. A Python library with LangChain support, and OpenAI-compatible API server.
47
+
48
+ ## Repositories available
49
+
50
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/orca_mini_v3_70B-GPTQ)
51
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML)
52
+ * [Pankaj Mathur's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/psmathur/orca_mini_v3_70b)
53
+
54
+ ## Prompt template: Orca-Hashes
55
+
56
+ ```
57
+ ### System:
58
+ {system_message}
59
+
60
+ ### User:
61
+ {prompt}
62
+
63
+ ### Assistant:
64
+ ```
65
+
66
+ <!-- compatibility_ggml start -->
67
+ ## Compatibility
68
+
69
+ ### Requires llama.cpp [commit `e76d630`](https://github.com/ggerganov/llama.cpp/commit/e76d630df17e235e6b9ef416c45996765d2e36fb) or later.
70
+
71
+ Or one of the other tools and libraries listed above.
72
+
73
+ To use in llama.cpp, you must add `-gqa 8` argument.
74
+
75
+ For other UIs and libraries, please check the docs.
76
+
77
+ ## Explanation of the new k-quant methods
78
+ <details>
79
+ <summary>Click to see details</summary>
80
+
81
+ The new methods available are:
82
+ * 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)
83
+ * 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.
84
+ * 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.
85
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
86
+ * 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
87
+ * GGML_TYPE_Q8_K - "type-0" 8-bit quantization. Only used for quantizing intermediate results. The difference to the existing Q8_0 is that the block size is 256. All 2-6 bit dot products are implemented for this quantization type.
88
+
89
+ Refer to the Provided Files table below to see what files use which methods, and how.
90
+ </details>
91
+ <!-- compatibility_ggml end -->
92
+
93
+ ## Provided files
94
+
95
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
96
+ | ---- | ---- | ---- | ---- | ---- | ----- |
97
+ | [orca_mini_v3_70b.ggmlv3.q2_K.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q2_K.bin) | q2_K | 2 | 28.59 GB| 31.09 GB | New k-quant method. Uses GGML_TYPE_Q4_K for the attention.vw and feed_forward.w2 tensors, GGML_TYPE_Q2_K for the other tensors. |
98
+ | [orca_mini_v3_70b.ggmlv3.q3_K_L.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q3_K_L.bin) | q3_K_L | 3 | 36.15 GB| 38.65 GB | New k-quant method. Uses GGML_TYPE_Q5_K for the attention.wv, attention.wo, and feed_forward.w2 tensors, else GGML_TYPE_Q3_K |
99
+ | [orca_mini_v3_70b.ggmlv3.q3_K_M.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q3_K_M.bin) | q3_K_M | 3 | 33.04 GB| 35.54 GB | New k-quant method. Uses GGML_TYPE_Q4_K for the attention.wv, attention.wo, and feed_forward.w2 tensors, else GGML_TYPE_Q3_K |
100
+ | [orca_mini_v3_70b.ggmlv3.q3_K_S.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q3_K_S.bin) | q3_K_S | 3 | 29.75 GB| 32.25 GB | New k-quant method. Uses GGML_TYPE_Q3_K for all tensors |
101
+ | [orca_mini_v3_70b.ggmlv3.q4_0.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q4_0.bin) | q4_0 | 4 | 38.87 GB| 41.37 GB | Original quant method, 4-bit. |
102
+ | [orca_mini_v3_70b.ggmlv3.q4_1.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q4_1.bin) | q4_1 | 4 | 43.17 GB| 45.67 GB | Original quant method, 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. |
103
+ | [orca_mini_v3_70b.ggmlv3.q4_K_M.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q4_K_M.bin) | q4_K_M | 4 | 41.38 GB| 43.88 GB | New k-quant method. Uses GGML_TYPE_Q6_K for half of the attention.wv and feed_forward.w2 tensors, else GGML_TYPE_Q4_K |
104
+ | [orca_mini_v3_70b.ggmlv3.q4_K_S.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q4_K_S.bin) | q4_K_S | 4 | 38.87 GB| 41.37 GB | New k-quant method. Uses GGML_TYPE_Q4_K for all tensors |
105
+ | [orca_mini_v3_70b.ggmlv3.q5_0.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q5_0.bin) | q5_0 | 5 | 47.46 GB| 49.96 GB | Original quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. |
106
+ | [orca_mini_v3_70b.ggmlv3.q5_K_M.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q5_K_M.bin) | q5_K_M | 5 | 48.75 GB| 51.25 GB | New k-quant method. Uses GGML_TYPE_Q6_K for half of the attention.wv and feed_forward.w2 tensors, else GGML_TYPE_Q5_K |
107
+ | [orca_mini_v3_70b.ggmlv3.q5_K_S.bin](https://huggingface.co/TheBloke/orca_mini_v3_70B-GGML/blob/main/orca_mini_v3_70b.ggmlv3.q5_K_S.bin) | q5_K_S | 5 | 47.46 GB| 49.96 GB | New k-quant method. Uses GGML_TYPE_Q5_K for all tensors |
108
+
109
+ **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.
110
+
111
+ ## How to run in `llama.cpp`
112
+
113
+ I use the following command line; adjust for your tastes and needs:
114
+
115
+ ```
116
+ ./main -t 10 -ngl 40 -gqa 8 -m orca_mini_v3_70b.ggmlv3.q4_K_M.bin --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### System:\nYou are a story writing assistant.\n\n### User:\nWrite a story about llamas\n\n### Assistant:"
117
+ ```
118
+ Change `-t 10` to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use `-t 8`. If you are fully offloading the model to GPU, use `-t 1`
119
+
120
+ Change `-ngl 40` to the number of GPU layers you have VRAM for. Use `-ngl 100` to offload all layers to VRAM - if you have a 48GB card, or 2 x 24GB, or similar. Otherwise you can partially offload as many as you have VRAM for, on one or more GPUs.
121
+
122
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
123
+
124
+ Remember the `-gqa 8` argument, required for Llama 70B models.
125
+
126
+ Change `-c 4096` to the desired sequence length for this model. For models that use RoPE, add `--rope-freq-base 10000 --rope-freq-scale 0.5` for doubled context, or `--rope-freq-base 10000 --rope-freq-scale 0.25` for 4x context.
127
+
128
+ 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)
129
+
130
+ ## How to run in `text-generation-webui`
131
+
132
+ Further instructions here: [text-generation-webui/docs/llama.cpp-models.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp-models.md).
133
+
134
+ <!-- footer start -->
135
+ ## Discord
136
+
137
+ For further support, and discussions on these models and AI in general, join us at:
138
+
139
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
140
+
141
+ ## Thanks, and how to contribute.
142
+
143
+ Thanks to the [chirper.ai](https://chirper.ai) team!
144
+
145
+ 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.
146
+
147
+ 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.
148
+
149
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
150
+
151
+ * Patreon: https://patreon.com/TheBlokeAI
152
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
153
+
154
+ **Special thanks to**: Aemon Algiz.
155
+
156
+ **Patreon special mentions**: Ajan Kanaga, David Ziegler, Raymond Fosdick, SuperWojo, Sam, webtim, Steven Wood, knownsqashed, Tony Hughes, Junyu Yang, J, Olakabola, Dan Guido, Stephen Murray, John Villwock, vamX, William Sang, Sean Connelly, LangChain4j, Olusegun Samson, Fen Risland, Derek Yates, Karl Bernard, transmissions 11, Trenton Dambrowitz, Pieter, Preetika Verma, Swaroop Kallakuri, Andrey, Slarti, Jonathan Leane, Michael Levine, Kalila, Joseph William Delisle, Rishabh Srivastava, Deo Leter, Luke Pendergrass, Spencer Kim, Geoffrey Montalvo, Thomas Belote, Jeffrey Morgan, Mandus, ya boyyy, Matthew Berman, Magnesian, Ai Maven, senxiiz, Alps Aficionado, Luke @flexchar, Raven Klaugh, Imad Khwaja, Gabriel Puliatti, Johann-Peter Hartmann, usrbinkat, Spiking Neurons AB, Artur Olbinski, chris gileta, danny, Willem Michiel, WelcomeToTheClub, Deep Realms, alfie_i, Dave, Leonard Tan, NimbleBox.ai, Randy H, Daniel P. Andersen, Pyrater, Will Dee, Elle, Space Cruiser, Gabriel Tamborski, Asp the Wyvern, Illia Dulskyi, Nikolai Manek, Sid, Brandon Frisco, Nathan LeClaire, Edmond Seymore, Enrico Ros, Pedro Madruga, Eugene Pentland, John Detwiler, Mano Prime, Stanislav Ovsiannikov, Alex, Vitor Caleffi, K, biorpg, Michael Davis, Lone Striker, Pierre Kircher, theTransient, Fred von Graf, Sebastain Graf, Vadim, Iucharbius, Clay Pascal, Chadd, Mesiah Bishop, terasurfer, Rainer Wilmers, Alexandros Triantafyllidis, Stefan Sabev, Talal Aujan, Cory Kujawski, Viktor Bowallius, subjectnull, ReadyPlayerEmma, zynix
157
+
158
+
159
+ Thank you to all my generous patrons and donaters!
160
+
161
+ <!-- footer end -->
162
+
163
+ # Original model card: Pankaj Mathur's Orca Mini v3 70B
164
+
165
+
166
+ # orca_mini_v3_70b
167
+
168
+ A Llama2-70b model trained on Orca Style datasets.
169
+
170
+ #### legal disclaimer:
171
+
172
+ This model is bound by the usage restrictions of the original Llama-2 model. And comes with no warranty or gurantees of any kind.
173
+
174
+ ## Evaluation
175
+
176
+ We evaluated orca_mini_v3_70b on a wide range of tasks using [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) from EleutherAI.
177
+
178
+ Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
179
+
180
+ |||||
181
+ |:------:|:--------:|:-------:|:--------:|
182
+ |**Task**|**Metric**|**Value**|**Stderr**|
183
+ |*arc_challenge*|acc_norm|0.7098|0.0132|
184
+ |*hellaswag*|acc_norm|0.8779|0.0032|
185
+ |*mmlu*|acc_norm|0.6904|0.0351|
186
+ |*truthfulqa_mc*|mc2|0.6196|0.0151|
187
+ |**Total Average**|-|**0.722175**||
188
+
189
+
190
+ **P.S. I am actively seeking sponsorship and partnership opportunities. If you're interested, please connect with me at www.linkedin.com/in/pankajam.**
191
+
192
+ ## Example Usage
193
+
194
+ Here is the prompt format
195
+
196
+ ```
197
+ ### System:
198
+ You are an AI assistant that follows instruction extremely well. Help as much as you can.
199
+
200
+ ### User:
201
+ Tell me about Orcas.
202
+
203
+ ### Assistant:
204
+
205
+ ```
206
+
207
+ Below shows a code example on how to use this model
208
+
209
+ ```python
210
+ import torch
211
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
212
+
213
+ tokenizer = AutoTokenizer.from_pretrained("psmathur/orca_mini_v3_70b")
214
+ model = AutoModelForCausalLM.from_pretrained(
215
+ "psmathur/orca_mini_v3_70b",
216
+ torch_dtype=torch.float16,
217
+ load_in_8bit=True,
218
+ low_cpu_mem_usage=True,
219
+ device_map="auto"
220
+ )
221
+ system_prompt = "### System:\nYou are an AI assistant that follows instruction extremely well. Help as much as you can.\n\n"
222
+
223
+ #generate text steps
224
+ instruction = "Tell me about Orcas."
225
+ prompt = f"{system_prompt}### User: {instruction}\n\n### Assistant:\n"
226
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
227
+ output = model.generate(**inputs, do_sample=True, top_p=0.95, top_k=0, max_new_tokens=4096)
228
+
229
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
230
+
231
+ ```
232
+
233
+
234
+ #### Limitations & Biases:
235
+
236
+ While this model aims for accuracy, it can occasionally produce inaccurate or misleading results.
237
+
238
+ Despite diligent efforts in refining the pretraining data, there remains a possibility for the generation of inappropriate, biased, or offensive content.
239
+
240
+ Exercise caution and cross-check information when necessary.
241
+
242
+
243
+
244
+ ### Citiation:
245
+
246
+ Please kindly cite using the following BibTeX:
247
+
248
+ ```
249
+ @misc{orca_mini_v3_70b,
250
+ author = {Pankaj Mathur},
251
+ title = {orca_mini_v3_70b: An Orca Style Llama2-70b model},
252
+ year = {2023},
253
+ publisher = {HuggingFace},
254
+ journal = {HuggingFace repository},
255
+ howpublished = {\url{https://https://huggingface.co/psmathur/orca_mini_v3_70b},
256
+ }
257
+ ```
258
+
259
+ ```
260
+ @misc{mukherjee2023orca,
261
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
262
+ author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
263
+ year={2023},
264
+ eprint={2306.02707},
265
+ archivePrefix={arXiv},
266
+ primaryClass={cs.CL}
267
+ }
268
+ ```
269
+
270
+ ```
271
+ @software{touvron2023llama2,
272
+ title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
273
+ author={Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava,
274
+ Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller,
275
+ Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez Madian Khabsa, Isabel Kloumann,
276
+ Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov,
277
+ Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith,
278
+ Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu , Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan,
279
+ Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, Thomas Scialom},
280
+ year={2023}
281
+ }
282
+ ```