zohaib99k commited on
Commit
7483809
1 Parent(s): c08904e

Upload 13 files

Browse files
LICENSE.txt ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LLAMA 2 COMMUNITY LICENSE AGREEMENT
2
+ Llama 2 Version Release Date: July 18, 2023
3
+
4
+ "Agreement" means the terms and conditions for use, reproduction, distribution and
5
+ modification of the Llama Materials set forth herein.
6
+
7
+ "Documentation" means the specifications, manuals and documentation
8
+ accompanying Llama 2 distributed by Meta at ai.meta.com/resources/models-and-
9
+ libraries/llama-downloads/.
10
+
11
+ "Licensee" or "you" means you, or your employer or any other person or entity (if
12
+ you are entering into this Agreement on such person or entity's behalf), of the age
13
+ required under applicable laws, rules or regulations to provide legal consent and that
14
+ has legal authority to bind your employer or such other person or entity if you are
15
+ entering in this Agreement on their behalf.
16
+
17
+ "Llama 2" means the foundational large language models and software and
18
+ algorithms, including machine-learning model code, trained model weights,
19
+ inference-enabling code, training-enabling code, fine-tuning enabling code and other
20
+ elements of the foregoing distributed by Meta at ai.meta.com/resources/models-and-
21
+ libraries/llama-downloads/.
22
+
23
+ "Llama Materials" means, collectively, Meta's proprietary Llama 2 and
24
+ Documentation (and any portion thereof) made available under this Agreement.
25
+
26
+ "Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or, if you
27
+ are an entity, your principal place of business is in the EEA or Switzerland) and Meta
28
+ Platforms, Inc. (if you are located outside of the EEA or Switzerland).
29
+
30
+ By clicking "I Accept" below or by using or distributing any portion or element of the
31
+ Llama Materials, you agree to be bound by this Agreement.
32
+
33
+ 1. License Rights and Redistribution.
34
+
35
+ a. Grant of Rights. You are granted a non-exclusive, worldwide, non-
36
+ transferable and royalty-free limited license under Meta's intellectual property or
37
+ other rights owned by Meta embodied in the Llama Materials to use, reproduce,
38
+ distribute, copy, create derivative works of, and make modifications to the Llama
39
+ Materials.
40
+
41
+ b. Redistribution and Use.
42
+
43
+ i. If you distribute or make the Llama Materials, or any derivative works
44
+ thereof, available to a third party, you shall provide a copy of this Agreement to such
45
+ third party.
46
+ ii. If you receive Llama Materials, or any derivative works thereof, from
47
+ a Licensee as part of an integrated end user product, then Section 2 of this
48
+ Agreement will not apply to you.
49
+
50
+ iii. You must retain in all copies of the Llama Materials that you
51
+ distribute the following attribution notice within a "Notice" text file distributed as a
52
+ part of such copies: "Llama 2 is licensed under the LLAMA 2 Community License,
53
+ Copyright (c) Meta Platforms, Inc. All Rights Reserved."
54
+
55
+ iv. Your use of the Llama Materials must comply with applicable laws
56
+ and regulations (including trade compliance laws and regulations) and adhere to the
57
+ Acceptable Use Policy for the Llama Materials (available at
58
+ https://ai.meta.com/llama/use-policy), which is hereby incorporated by reference into
59
+ this Agreement.
60
+
61
+ v. You will not use the Llama Materials or any output or results of the
62
+ Llama Materials to improve any other large language model (excluding Llama 2 or
63
+ derivative works thereof).
64
+
65
+ 2. Additional Commercial Terms. If, on the Llama 2 version release date, the
66
+ monthly active users of the products or services made available by or for Licensee,
67
+ or Licensee's affiliates, is greater than 700 million monthly active users in the
68
+ preceding calendar month, you must request a license from Meta, which Meta may
69
+ grant to you in its sole discretion, and you are not authorized to exercise any of the
70
+ rights under this Agreement unless or until Meta otherwise expressly grants you
71
+ such rights.
72
+
73
+ 3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE
74
+ LLAMA MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE
75
+ PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
76
+ EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY
77
+ WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR
78
+ FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE
79
+ FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING
80
+ THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR
81
+ USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.
82
+
83
+ 4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE
84
+ LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT,
85
+ NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS
86
+ AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL,
87
+ CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN
88
+ IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF
89
+ ANY OF THE FOREGOING.
90
+
91
+ 5. Intellectual Property.
92
+
93
+ a. No trademark licenses are granted under this Agreement, and in
94
+ connection with the Llama Materials, neither Meta nor Licensee may use any name
95
+ or mark owned by or associated with the other or any of its affiliates, except as
96
+ required for reasonable and customary use in describing and redistributing the
97
+ Llama Materials.
98
+
99
+ b. Subject to Meta's ownership of Llama Materials and derivatives made by or
100
+ for Meta, with respect to any derivative works and modifications of the Llama
101
+ Materials that are made by you, as between you and Meta, you are and will be the
102
+ owner of such derivative works and modifications.
103
+
104
+ c. If you institute litigation or other proceedings against Meta or any entity
105
+ (including a cross-claim or counterclaim in a lawsuit) alleging that the Llama
106
+ Materials or Llama 2 outputs or results, or any portion of any of the foregoing,
107
+ constitutes infringement of intellectual property or other rights owned or licensable
108
+ by you, then any licenses granted to you under this Agreement shall terminate as of
109
+ the date such litigation or claim is filed or instituted. You will indemnify and hold
110
+ harmless Meta from and against any claim by any third party arising out of or related
111
+ to your use or distribution of the Llama Materials.
112
+
113
+ 6. Term and Termination. The term of this Agreement will commence upon your
114
+ acceptance of this Agreement or access to the Llama Materials and will continue in
115
+ full force and effect until terminated in accordance with the terms and conditions
116
+ herein. Meta may terminate this Agreement if you are in breach of any term or
117
+ condition of this Agreement. Upon termination of this Agreement, you shall delete
118
+ and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the
119
+ termination of this Agreement.
120
+
121
+ 7. Governing Law and Jurisdiction. This Agreement will be governed and
122
+ construed under the laws of the State of California without regard to choice of law
123
+ principles, and the UN Convention on Contracts for the International Sale of Goods
124
+ does not apply to this Agreement. The courts of California shall have exclusive
125
+ jurisdiction of any dispute arising out of this Agreement.
126
+
Notice.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Llama 2 is licensed under the LLAMA 2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
README.md ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ language:
4
+ - en
5
+ license: other
6
+ model_type: llama
7
+ tags:
8
+ - llama-2
9
+ - self-instruct
10
+ - distillation
11
+ - synthetic instruction
12
+ ---
13
+
14
+ <!-- header start -->
15
+ <div style="width: 100%;">
16
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
17
+ </div>
18
+ <div style="display: flex; justify-content: space-between; width: 100%;">
19
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
20
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
21
+ </div>
22
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
23
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
24
+ </div>
25
+ </div>
26
+ <!-- header end -->
27
+
28
+ # Nous Research's Nous Hermes Llama 2 13B GPTQ
29
+
30
+ These files are GPTQ model files for [Nous Research's Nous Hermes Llama 2 13B](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b).
31
+
32
+ Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
33
+
34
+
35
+ ## Repositories available
36
+
37
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Nous-Hermes-Llama2-GPTQ)
38
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Nous-Hermes-Llama2-GGML)
39
+ * [Original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b)
40
+
41
+ ## Prompt template: Alpaca
42
+
43
+ ```
44
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
45
+
46
+ ### Instruction: {prompt}
47
+
48
+ ### Response:
49
+ ```
50
+
51
+ ## Provided files
52
+
53
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
54
+
55
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
56
+
57
+ | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
58
+ | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
59
+ | main | 4 | 128 | False | 7.26 GB | True | AutoGPTQ | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
60
+ | gptq-4bit-32g-actorder_True | 4 | 32 | True | 8.00 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 32g gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
61
+ | gptq-4bit-64g-actorder_True | 4 | 64 | True | 7.51 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 64g uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
62
+ | gptq-4bit-128g-actorder_True | 4 | 128 | True | 7.26 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 128g uses even less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
63
+ | gptq-8bit-128g-actorder_True | 8 | 128 | True | 13.65 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
64
+ | gptq-8bit-64g-actorder_True | 8 | 64 | True | 13.95 GB | False | AutoGPTQ | 8-bit, with group size 64g and Act Order for maximum inference quality. Poor AutoGPTQ CUDA speed. |
65
+ | gptq-8bit-128g-actorder_False | 8 | 128 | False | 13.65 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
66
+ | gptq-8bit--1g-actorder_True | 8 | None | True | 13.36 GB | False | AutoGPTQ | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
67
+
68
+ ## How to download from branches
69
+
70
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Nous-Hermes-Llama2-GPTQ:gptq-4bit-32g-actorder_True`
71
+ - With Git, you can clone a branch with:
72
+ ```
73
+ git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Nous-Hermes-Llama2-GPTQ`
74
+ ```
75
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
76
+
77
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
78
+
79
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
80
+
81
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
82
+
83
+ 1. Click the **Model tab**.
84
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Nous-Hermes-Llama2-GPTQ`.
85
+ - To download from a specific branch, enter for example `TheBloke/Nous-Hermes-Llama2-GPTQ:gptq-4bit-32g-actorder_True`
86
+ - see Provided Files above for the list of branches for each option.
87
+ 3. Click **Download**.
88
+ 4. The model will start downloading. Once it's finished it will say "Done"
89
+ 5. In the top left, click the refresh icon next to **Model**.
90
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Nous-Hermes-Llama2-GPTQ`
91
+ 7. The model will automatically load, and is now ready for use!
92
+ 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
93
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
94
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
95
+
96
+ ## How to use this GPTQ model from Python code
97
+
98
+ First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
99
+
100
+ `GITHUB_ACTIONS=true pip install auto-gptq`
101
+
102
+ Then try the following example code:
103
+
104
+ ```python
105
+ from transformers import AutoTokenizer, pipeline, logging
106
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
107
+
108
+ model_name_or_path = "TheBloke/Nous-Hermes-Llama2-GPTQ"
109
+ model_basename = "gptq_model-4bit-128g"
110
+
111
+ use_triton = False
112
+
113
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
114
+
115
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
116
+ model_basename=model_basename,
117
+ use_safetensors=True,
118
+ trust_remote_code=False,
119
+ device="cuda:0",
120
+ use_triton=use_triton,
121
+ quantize_config=None)
122
+
123
+ """
124
+ To download from a specific branch, use the revision parameter, as in this example:
125
+
126
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
127
+ revision="gptq-4bit-32g-actorder_True",
128
+ model_basename=model_basename,
129
+ use_safetensors=True,
130
+ trust_remote_code=False,
131
+ device="cuda:0",
132
+ quantize_config=None)
133
+ """
134
+
135
+ prompt = "Tell me about AI"
136
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
137
+
138
+ ### Instruction: {prompt}
139
+
140
+ ### Response:
141
+ '''
142
+
143
+ print("\n\n*** Generate:")
144
+
145
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
146
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
147
+ print(tokenizer.decode(output[0]))
148
+
149
+ # Inference can also be done using transformers' pipeline
150
+
151
+ # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
152
+ logging.set_verbosity(logging.CRITICAL)
153
+
154
+ print("*** Pipeline:")
155
+ pipe = pipeline(
156
+ "text-generation",
157
+ model=model,
158
+ tokenizer=tokenizer,
159
+ max_new_tokens=512,
160
+ temperature=0.7,
161
+ top_p=0.95,
162
+ repetition_penalty=1.15
163
+ )
164
+
165
+ print(pipe(prompt_template)[0]['generated_text'])
166
+ ```
167
+
168
+ ## Compatibility
169
+
170
+ The files provided will work with AutoGPTQ (CUDA and Triton modes), GPTQ-for-LLaMa (only CUDA has been tested), and Occ4m's GPTQ-for-LLaMa fork.
171
+
172
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
173
+
174
+ <!-- footer start -->
175
+ ## Discord
176
+
177
+ For further support, and discussions on these models and AI in general, join us at:
178
+
179
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
180
+
181
+ ## Thanks, and how to contribute.
182
+
183
+ Thanks to the [chirper.ai](https://chirper.ai) team!
184
+
185
+ 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.
186
+
187
+ 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.
188
+
189
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
190
+
191
+ * Patreon: https://patreon.com/TheBlokeAI
192
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
193
+
194
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
195
+
196
+ **Patreon special mentions**: Slarti, Chadd, John Detwiler, Pieter, zynix, K, Mano Prime, ReadyPlayerEmma, Ai Maven, Leonard Tan, Edmond Seymore, Joseph William Delisle, Luke @flexchar, Fred von Graf, Viktor Bowallius, Rishabh Srivastava, Nikolai Manek, Matthew Berman, Johann-Peter Hartmann, ya boyyy, Greatston Gnanesh, Femi Adebogun, Talal Aujan, Jonathan Leane, terasurfer, David Flickinger, William Sang, Ajan Kanaga, Vadim, Artur Olbinski, Raven Klaugh, Michael Levine, Oscar Rangel, Randy H, Cory Kujawski, RoA, Dave, Alex, Alexandros Triantafyllidis, Fen Risland, Eugene Pentland, vamX, Elle, Nathan LeClaire, Khalefa Al-Ahmad, Rainer Wilmers, subjectnull, Junyu Yang, Daniel P. Andersen, SuperWojo, LangChain4j, Mandus, Kalila, Illia Dulskyi, Trenton Dambrowitz, Asp the Wyvern, Derek Yates, Jeffrey Morgan, Deep Realms, Imad Khwaja, Pyrater, Preetika Verma, biorpg, Gabriel Tamborski, Stephen Murray, Spiking Neurons AB, Iucharbius, Chris Smitley, Willem Michiel, Luke Pendergrass, Sebastain Graf, senxiiz, Will Dee, Space Cruiser, Karl Bernard, Clay Pascal, Lone Striker, transmissions 11, webtim, WelcomeToTheClub, Sam, theTransient, Pierre Kircher, chris gileta, John Villwock, Sean Connelly, Willian Hasse
197
+
198
+
199
+ Thank you to all my generous patrons and donaters!
200
+
201
+ <!-- footer end -->
202
+
203
+ # Original model card: Nous Research's Nous Hermes Llama 2 13B
204
+
205
+
206
+ # Model Card: Nous-Hermes-Llama2-13b
207
+
208
+ Compute provided by our project sponsor Redmond AI, thank you! Follow RedmondAI on Twitter @RedmondAI.
209
+
210
+ ## Model Description
211
+
212
+ Nous-Hermes-Llama2-13b is a state-of-the-art language model fine-tuned on over 300,000 instructions. This model was fine-tuned by Nous Research, with Teknium and Emozilla leading the fine tuning process and dataset curation, Redmond AI sponsoring the compute, and several other contributors.
213
+
214
+ This Hermes model uses the exact same dataset as Hermes on Llama-1. This is to ensure consistency between the old Hermes and new, for anyone who wanted to keep Hermes as similar to the old one, just more capable.
215
+
216
+ This model stands out for its long responses, lower hallucination rate, and absence of OpenAI censorship mechanisms. The fine-tuning process was performed with a 4096 sequence length on an 8x a100 80GB DGX machine.
217
+
218
+ ## Example Outputs:
219
+ ![Example4](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example5.png "Example 4")
220
+ ![Example1](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/Example1.png "Example 1")
221
+ ![Example2](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example2.png "Example 2")
222
+ ![Example3](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example3.png "Example 3")
223
+
224
+ ## Model Training
225
+
226
+ The model was trained almost entirely on synthetic GPT-4 outputs. Curating high quality GPT-4 datasets enables incredibly high quality in knowledge, task completion, and style.
227
+
228
+ This includes data from diverse sources such as GPTeacher, the general, roleplay v1&2, code instruct datasets, Nous Instruct & PDACTL (unpublished), and several others, detailed further below
229
+
230
+ ## Collaborators
231
+ The model fine-tuning and the datasets were a collaboration of efforts and resources between Teknium, Karan4D, Emozilla, Huemin Art, and Redmond AI.
232
+
233
+ Special mention goes to @winglian for assisting in some of the training issues.
234
+
235
+ Huge shoutout and acknowledgement is deserved for all the dataset creators who generously share their datasets openly.
236
+
237
+ Among the contributors of datasets:
238
+ - GPTeacher was made available by Teknium
239
+ - Wizard LM by nlpxucan
240
+ - Nous Research Instruct Dataset was provided by Karan4D and HueminArt.
241
+ - GPT4-LLM and Unnatural Instructions were provided by Microsoft
242
+ - Airoboros dataset by jondurbin
243
+ - Camel-AI's domain expert datasets are from Camel-AI
244
+ - CodeAlpaca dataset by Sahil 2801.
245
+
246
+ If anyone was left out, please open a thread in the community tab.
247
+
248
+ ## Prompt Format
249
+
250
+ The model follows the Alpaca prompt format:
251
+ ```
252
+ ### Instruction:
253
+ <prompt>
254
+
255
+ ### Response:
256
+ <leave a newline blank for model to respond>
257
+
258
+ ```
259
+
260
+ or
261
+
262
+ ```
263
+ ### Instruction:
264
+ <prompt>
265
+
266
+ ### Input:
267
+ <additional context>
268
+
269
+ ### Response:
270
+ <leave a newline blank for model to respond>
271
+
272
+ ```
273
+
274
+ ## Benchmark Results
275
+ AGI-Eval
276
+ ```
277
+ | Task |Version| Metric |Value | |Stderr|
278
+ |agieval_aqua_rat | 0|acc |0.2362|± |0.0267|
279
+ | | |acc_norm|0.2480|± |0.0272|
280
+ |agieval_logiqa_en | 0|acc |0.3425|± |0.0186|
281
+ | | |acc_norm|0.3472|± |0.0187|
282
+ |agieval_lsat_ar | 0|acc |0.2522|± |0.0287|
283
+ | | |acc_norm|0.2087|± |0.0269|
284
+ |agieval_lsat_lr | 0|acc |0.3510|± |0.0212|
285
+ | | |acc_norm|0.3627|± |0.0213|
286
+ |agieval_lsat_rc | 0|acc |0.4647|± |0.0305|
287
+ | | |acc_norm|0.4424|± |0.0303|
288
+ |agieval_sat_en | 0|acc |0.6602|± |0.0331|
289
+ | | |acc_norm|0.6165|± |0.0340|
290
+ |agieval_sat_en_without_passage| 0|acc |0.4320|± |0.0346|
291
+ | | |acc_norm|0.4272|± |0.0345|
292
+ |agieval_sat_math | 0|acc |0.2909|± |0.0307|
293
+ | | |acc_norm|0.2727|± |0.0301|
294
+ ```
295
+ GPT-4All Benchmark Set
296
+ ```
297
+ | Task |Version| Metric |Value | |Stderr|
298
+ |arc_challenge| 0|acc |0.5102|± |0.0146|
299
+ | | |acc_norm|0.5213|± |0.0146|
300
+ |arc_easy | 0|acc |0.7959|± |0.0083|
301
+ | | |acc_norm|0.7567|± |0.0088|
302
+ |boolq | 1|acc |0.8394|± |0.0064|
303
+ |hellaswag | 0|acc |0.6164|± |0.0049|
304
+ | | |acc_norm|0.8009|± |0.0040|
305
+ |openbookqa | 0|acc |0.3580|± |0.0215|
306
+ | | |acc_norm|0.4620|± |0.0223|
307
+ |piqa | 0|acc |0.7992|± |0.0093|
308
+ | | |acc_norm|0.8069|± |0.0092|
309
+ |winogrande | 0|acc |0.7127|± |0.0127|
310
+ ```
311
+ BigBench Reasoning Test
312
+ ```
313
+ | Task |Version| Metric |Value | |Stderr|
314
+
315
+ |bigbench_causal_judgement | 0|multiple_choice_grade|0.5526|± |0.0362|
316
+ |bigbench_date_understanding | 0|multiple_choice_grade|0.7344|± |0.0230|
317
+ |bigbench_disambiguation_qa | 0|multiple_choice_grade|0.2636|± |0.0275|
318
+ |bigbench_geometric_shapes | 0|multiple_choice_grade|0.0195|± |0.0073|
319
+ | | |exact_str_match |0.0000|± |0.0000|
320
+ |bigbench_logical_deduction_five_objects | 0|multiple_choice_grade|0.2760|± |0.0200|
321
+ |bigbench_logical_deduction_seven_objects | 0|multiple_choice_grade|0.2100|± |0.0154|
322
+ |bigbench_logical_deduction_three_objects | 0|multiple_choice_grade|0.4400|± |0.0287|
323
+ |bigbench_movie_recommendation | 0|multiple_choice_grade|0.2440|± |0.0192|
324
+ |bigbench_navigate | 0|multiple_choice_grade|0.4950|± |0.0158|
325
+ |bigbench_reasoning_about_colored_objects | 0|multiple_choice_grade|0.5570|± |0.0111|
326
+ |bigbench_ruin_names | 0|multiple_choice_grade|0.3728|± |0.0229|
327
+ |bigbench_salient_translation_error_detection | 0|multiple_choice_grade|0.1854|± |0.0123|
328
+ |bigbench_snarks | 0|multiple_choice_grade|0.6298|± |0.0360|
329
+ |bigbench_sports_understanding | 0|multiple_choice_grade|0.6156|± |0.0155|
330
+ |bigbench_temporal_sequences | 0|multiple_choice_grade|0.3140|± |0.0147|
331
+ |bigbench_tracking_shuffled_objects_five_objects | 0|multiple_choice_grade|0.2032|± |0.0114|
332
+ |bigbench_tracking_shuffled_objects_seven_objects| 0|multiple_choice_grade|0.1406|± |0.0083|
333
+ |bigbench_tracking_shuffled_objects_three_objects| 0|multiple_choice_grade|0.4400|± |0.0287|
334
+ ```
335
+
336
+ These are the highest benchmarks Hermes has seen on every metric, achieving the following average scores:
337
+ - GPT4All benchmark average is now 70.0 - from 68.8 in Hermes-Llama1
338
+ - 0.3657 on BigBench, up from 0.328 on hermes-llama1
339
+ - 0.372 on AGIEval, up from 0.354 on Hermes-llama1
340
+
341
+ These benchmarks currently have us at #1 on ARC-c, ARC-e, Hellaswag, and OpenBookQA, and 2nd place on Winogrande, comparing to GPT4all's benchmarking list, supplanting Hermes 1 for the new top position.
342
+
343
+ ## Resources for Applied Use Cases:
344
+ For an example of a back and forth chatbot using huggingface transformers and discord, check out: https://github.com/teknium1/alpaca-discord
345
+ For an example of a roleplaying discord chatbot, check out this: https://github.com/teknium1/alpaca-roleplay-discordbot
346
+
347
+ ## Future Plans
348
+ We plan to continue to iterate on both more high quality data, and new data filtering techniques to eliminate lower quality data going forward.
349
+
350
+ ## Model Usage
351
+ The model is available for download on Hugging Face. It is suitable for a wide range of language tasks, from generating creative text to understanding and following complex instructions.
352
+
USE_POLICY.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Llama 2 Acceptable Use Policy
2
+
3
+ Meta is committed to promoting safe and fair use of its tools and features, including Llama 2. If you access or use Llama 2, you agree to this Acceptable Use Policy (“Policy”). The most recent copy of this policy can be found at [ai.meta.com/llama/use-policy](http://ai.meta.com/llama/use-policy).
4
+
5
+ ## Prohibited Uses
6
+ We want everyone to use Llama 2 safely and responsibly. You agree you will not use, or allow others to use, Llama 2 to:
7
+
8
+ 1. Violate the law or others’ rights, including to:
9
+ 1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
10
+ 1. Violence or terrorism
11
+ 2. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material
12
+ 3. Human trafficking, exploitation, and sexual violence
13
+ 4. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.
14
+ 5. Sexual solicitation
15
+ 6. Any other criminal activity
16
+ 2. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
17
+ 3. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services
18
+ 4. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
19
+ 5. Collect, process, disclose, generate, or infer health, demographic, or other sensitive personal or private information about individuals without rights and consents required by applicable laws
20
+ 6. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama 2 Materials
21
+ 7. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system
22
+
23
+
24
+
25
+ 2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of Llama 2 related to the following:
26
+ 1. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State
27
+ 2. Guns and illegal weapons (including weapon development)
28
+ 3. Illegal drugs and regulated/controlled substances
29
+ 4. Operation of critical infrastructure, transportation technologies, or heavy machinery
30
+ 5. Self-harm or harm to others, including suicide, cutting, and eating disorders
31
+ 6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
32
+
33
+
34
+
35
+ 3. Intentionally deceive or mislead others, including use of Llama 2 related to the following:
36
+ 1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
37
+ 2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
38
+ 3. Generating, promoting, or further distributing spam
39
+ 4. Impersonating another individual without consent, authorization, or legal right
40
+ 5. Representing that the use of Llama 2 or outputs are human-generated
41
+ 6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
42
+ 4. Fail to appropriately disclose to end users any known dangers of your AI system
43
+
44
+ Please report any violation of this Policy, software “bug,” or other problems that could lead to a violation of this Policy through one of the following means:
45
+
46
+ * Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama)
47
+ * Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)
48
+ * Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)
49
+ * Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama: [[email protected]](mailto:[email protected])
50
+
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<pad>": 32000
3
+ }
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "output/hermes-llama2-4k/checkpoint-2259",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "bos_token_id": 1,
7
+ "eos_token_id": 2,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 5120,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 13824,
12
+ "max_position_embeddings": 4096,
13
+ "model_type": "llama",
14
+ "num_attention_heads": 40,
15
+ "num_hidden_layers": 40,
16
+ "num_key_value_heads": 40,
17
+ "pad_token_id": 0,
18
+ "pretraining_tp": 1,
19
+ "rms_norm_eps": 1e-05,
20
+ "rope_scaling": null,
21
+ "tie_word_embeddings": false,
22
+ "torch_dtype": "bfloat16",
23
+ "transformers_version": "4.32.0.dev0",
24
+ "use_cache": true,
25
+ "vocab_size": 32032
26
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "pad_token_id": 0,
6
+ "temperature": 0.9,
7
+ "top_p": 0.6,
8
+ "transformers_version": "4.32.0.dev0"
9
+ }
gptq_model-8bit-128g.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cf1aaf60f335209fe8ce0508e08c122fdae937900896ba79a223075657c40ed
3
+ size 13653553504
quantize_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 8,
3
+ "group_size": 128,
4
+ "damp_percent": 0.01,
5
+ "desc_act": true,
6
+ "sym": true,
7
+ "true_sequential": true,
8
+ "model_name_or_path": null,
9
+ "model_file_base_name": null
10
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<unk>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "__type": "AddedToken",
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": true,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ "clean_up_tokenization_spaces": false,
11
+ "eos_token": {
12
+ "__type": "AddedToken",
13
+ "content": "</s>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false
18
+ },
19
+ "legacy": false,
20
+ "model_max_length": 1000000000000000019884624838656,
21
+ "pad_token": null,
22
+ "sp_model_kwargs": {},
23
+ "tokenizer_class": "LlamaTokenizer",
24
+ "unk_token": {
25
+ "__type": "AddedToken",
26
+ "content": "<unk>",
27
+ "lstrip": false,
28
+ "normalized": true,
29
+ "rstrip": false,
30
+ "single_word": false
31
+ }
32
+ }