RichardErkhov commited on
Commit
c33333d
1 Parent(s): 091442f

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +367 -0
README.md ADDED
@@ -0,0 +1,367 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ Llama-2-13b-hf - GGUF
11
+ - Model creator: https://huggingface.co/meta-llama/
12
+ - Original model: https://huggingface.co/meta-llama/Llama-2-13b-hf/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [Llama-2-13b-hf.Q2_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q2_K.gguf) | Q2_K | 4.52GB |
18
+ | [Llama-2-13b-hf.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.IQ3_XS.gguf) | IQ3_XS | 4.99GB |
19
+ | [Llama-2-13b-hf.IQ3_S.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.IQ3_S.gguf) | IQ3_S | 5.27GB |
20
+ | [Llama-2-13b-hf.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q3_K_S.gguf) | Q3_K_S | 5.27GB |
21
+ | [Llama-2-13b-hf.IQ3_M.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.IQ3_M.gguf) | IQ3_M | 5.57GB |
22
+ | [Llama-2-13b-hf.Q3_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q3_K.gguf) | Q3_K | 5.9GB |
23
+ | [Llama-2-13b-hf.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q3_K_M.gguf) | Q3_K_M | 5.9GB |
24
+ | [Llama-2-13b-hf.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q3_K_L.gguf) | Q3_K_L | 6.45GB |
25
+ | [Llama-2-13b-hf.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.IQ4_XS.gguf) | IQ4_XS | 6.54GB |
26
+ | [Llama-2-13b-hf.Q4_0.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q4_0.gguf) | Q4_0 | 6.86GB |
27
+ | [Llama-2-13b-hf.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.IQ4_NL.gguf) | IQ4_NL | 6.9GB |
28
+ | [Llama-2-13b-hf.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q4_K_S.gguf) | Q4_K_S | 6.91GB |
29
+ | [Llama-2-13b-hf.Q4_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q4_K.gguf) | Q4_K | 7.33GB |
30
+ | [Llama-2-13b-hf.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q4_K_M.gguf) | Q4_K_M | 7.33GB |
31
+ | [Llama-2-13b-hf.Q4_1.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q4_1.gguf) | Q4_1 | 7.61GB |
32
+ | [Llama-2-13b-hf.Q5_0.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q5_0.gguf) | Q5_0 | 8.36GB |
33
+ | [Llama-2-13b-hf.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q5_K_S.gguf) | Q5_K_S | 8.36GB |
34
+ | [Llama-2-13b-hf.Q5_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q5_K.gguf) | Q5_K | 8.6GB |
35
+ | [Llama-2-13b-hf.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q5_K_M.gguf) | Q5_K_M | 8.6GB |
36
+ | [Llama-2-13b-hf.Q5_1.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q5_1.gguf) | Q5_1 | 9.1GB |
37
+ | [Llama-2-13b-hf.Q6_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_Llama-2-13b-hf-gguf/blob/main/Llama-2-13b-hf.Q6_K.gguf) | Q6_K | 9.95GB |
38
+
39
+
40
+
41
+
42
+ Original model description:
43
+ ---
44
+ extra_gated_heading: You need to share contact information with Meta to access this model
45
+ extra_gated_prompt: >-
46
+ ### LLAMA 2 COMMUNITY LICENSE AGREEMENT
47
+
48
+ "Agreement" means the terms and conditions for use, reproduction, distribution
49
+ and modification of the Llama Materials set forth herein.
50
+
51
+ "Documentation" means the specifications, manuals and documentation
52
+ accompanying Llama 2 distributed by Meta at
53
+ https://ai.meta.com/resources/models-and-libraries/llama-downloads/.
54
+
55
+ "Licensee" or "you" means you, or your employer or any other person or entity
56
+ (if you are entering into this Agreement on such person or entity's behalf),
57
+ of the age required under applicable laws, rules or regulations to provide
58
+ legal consent and that has legal authority to bind your employer or such other
59
+ person or entity if you are entering in this Agreement on their behalf.
60
+
61
+ "Llama 2" means the foundational large language models and software and
62
+ algorithms, including machine-learning model code, trained model weights,
63
+ inference-enabling code, training-enabling code, fine-tuning enabling code and
64
+ other elements of the foregoing distributed by Meta at
65
+ ai.meta.com/resources/models-and-libraries/llama-downloads/.
66
+
67
+ "Llama Materials" means, collectively, Meta's proprietary Llama 2 and
68
+ documentation (and any portion thereof) made available under this Agreement.
69
+
70
+ "Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or,
71
+ if you are an entity, your principal place of business is in the EEA or
72
+ Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA
73
+ or Switzerland).
74
+
75
+
76
+ By clicking "I Accept" below or by using or distributing any portion or
77
+ element of the Llama Materials, you agree to be bound by this Agreement.
78
+
79
+ 1. License Rights and Redistribution.
80
+
81
+ a. Grant of Rights. You are granted a non-exclusive, worldwide, non-
82
+ transferable and royalty-free limited license under Meta's intellectual
83
+ property or other rights owned by Meta embodied in the Llama Materials to
84
+ use, reproduce, distribute, copy, create derivative works of, and make
85
+ modifications to the Llama Materials.
86
+
87
+ b. Redistribution and Use.
88
+
89
+ i. If you distribute or make the Llama Materials, or any derivative works
90
+ thereof, available to a third party, you shall provide a copy of this
91
+ Agreement to such third party.
92
+
93
+ ii. If you receive Llama Materials, or any derivative works thereof, from a
94
+ Licensee as part of an integrated end user product, then Section 2 of this
95
+ Agreement will not apply to you.
96
+
97
+ iii. You must retain in all copies of the Llama Materials that you distribute
98
+ the following attribution notice within a "Notice" text file distributed as a
99
+ part of such copies: "Llama 2 is licensed under the LLAMA 2 Community
100
+ License, Copyright (c) Meta Platforms, Inc. All Rights Reserved."
101
+
102
+ iv. Your use of the Llama Materials must comply with applicable laws and
103
+ regulations (including trade compliance laws and regulations) and adhere to
104
+ the Acceptable Use Policy for the Llama Materials (available at
105
+ https://ai.meta.com/llama/use-policy), which is hereby incorporated by
106
+ reference into this Agreement.
107
+
108
+ v. You will not use the Llama Materials or any output or results of the Llama
109
+ Materials to improve any other large language model (excluding Llama 2 or
110
+ derivative works thereof).
111
+
112
+
113
+ 2. Additional Commercial Terms. If, on the Llama 2 version release date, the
114
+ monthly active users of the products or services made available by or for
115
+ Licensee, or Licensee's affiliates, is greater than 700 million monthly
116
+ active users in the preceding calendar month, you must request a license from
117
+ Meta, which Meta may grant to you in its sole discretion, and you are not
118
+ authorized to exercise any of the rights under this Agreement unless or until
119
+ Meta otherwise expressly grants you such rights.
120
+
121
+ 3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA
122
+ MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN "AS IS"
123
+ BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
124
+ WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,
125
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY
126
+ RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING
127
+ THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE
128
+ LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.
129
+
130
+ 4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE
131
+ UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE,
132
+ PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST
133
+ PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR
134
+ PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE
135
+ POSSIBILITY OF ANY OF THE FOREGOING.
136
+
137
+
138
+ 5. Intellectual Property.
139
+
140
+ a. No trademark licenses are granted under this Agreement, and in connection
141
+ with the Llama Materials, neither Meta nor Licensee may use any name or mark
142
+ owned by or associated with the other or any of its affiliates, except as
143
+ required for reasonable and customary use in describing and redistributing
144
+ the Llama Materials.
145
+
146
+ b. Subject to Meta's ownership of Llama Materials and derivatives made by or
147
+ for Meta, with respect to any derivative works and modifications of the Llama
148
+ Materials that are made by you, as between you and Meta, you are and will be
149
+ the owner of such derivative works and modifications.
150
+
151
+ c. If you institute litigation or other proceedings against Meta or any
152
+ entity (including a cross-claim or counterclaim in a lawsuit) alleging that
153
+ the Llama Materials or Llama 2 outputs or results, or any portion of any of
154
+ the foregoing, constitutes infringement of intellectual property or other
155
+ rights owned or licensable by you, then any licenses granted to you under
156
+ this Agreement shall terminate as of the date such litigation or claim is
157
+ filed or instituted. You will indemnify and hold harmless Meta from and
158
+ against any claim by any third party arising out of or related to your use or
159
+ distribution of the Llama Materials.
160
+
161
+ 6. Term and Termination. The term of this Agreement will commence upon your
162
+ acceptance of this Agreement or access to the Llama Materials and will
163
+ continue in full force and effect until terminated in accordance with the
164
+ terms and conditions herein. Meta may terminate this Agreement if you are in
165
+ breach of any term or condition of this Agreement. Upon termination of this
166
+ Agreement, you shall delete and cease use of the Llama Materials. Sections 3,
167
+ 4 and 7 shall survive the termination of this Agreement.
168
+
169
+ 7. Governing Law and Jurisdiction. This Agreement will be governed and
170
+ construed under the laws of the State of California without regard to choice
171
+ of law principles, and the UN Convention on Contracts for the International
172
+ Sale of Goods does not apply to this Agreement. The courts of California
173
+ shall have exclusive jurisdiction of any dispute arising out of this
174
+ Agreement.
175
+
176
+ ### Llama 2 Acceptable Use Policy
177
+
178
+ Meta is committed to promoting safe and fair use of its tools and features,
179
+ including Llama 2. If you access or use Llama 2, you agree to this Acceptable
180
+ Use Policy (“Policy”). The most recent copy of this policy can be found at
181
+ [ai.meta.com/llama/use-policy](http://ai.meta.com/llama/use-policy).
182
+
183
+ #### Prohibited Uses
184
+
185
+ We want everyone to use Llama 2 safely and responsibly. You agree you will not
186
+ use, or allow others to use, Llama 2 to:
187
+
188
+ 1. Violate the law or others’ rights, including to:
189
+ 1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
190
+ 1. Violence or terrorism
191
+ 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
192
+ 3. Human trafficking, exploitation, and sexual violence
193
+ 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.
194
+ 5. Sexual solicitation
195
+ 6. Any other criminal activity
196
+ 2. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
197
+ 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
198
+ 4. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
199
+ 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
200
+ 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
201
+ 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
202
+ 2. Engage in, promote, incite, facilitate, or assist in the planning or
203
+ development of activities that present a risk of death or bodily harm to
204
+ individuals, including use of Llama 2 related to the following:
205
+ 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
206
+ 2. Guns and illegal weapons (including weapon development)
207
+ 3. Illegal drugs and regulated/controlled substances
208
+ 4. Operation of critical infrastructure, transportation technologies, or heavy machinery
209
+ 5. Self-harm or harm to others, including suicide, cutting, and eating disorders
210
+ 6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
211
+ 3. Intentionally deceive or mislead others, including use of Llama 2 related
212
+ to the following:
213
+ 1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
214
+ 2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
215
+ 3. Generating, promoting, or further distributing spam
216
+ 4. Impersonating another individual without consent, authorization, or legal right
217
+ 5. Representing that the use of Llama 2 or outputs are human-generated
218
+ 6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
219
+ 4. Fail to appropriately disclose to end users any known dangers of your AI system
220
+ Please report any violation of this Policy, software “bug,” or other problems
221
+ that could lead to a violation of this Policy through one of the following
222
+ means:
223
+ * Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama)
224
+ * Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)
225
+ * Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)
226
+ * Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama: [[email protected]](mailto:[email protected])
227
+ extra_gated_fields:
228
+ First Name: text
229
+ Last Name: text
230
+ Date of birth: date_picker
231
+ Country: country
232
+ Affiliation: text
233
+ geo: ip_location
234
+ By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy: checkbox
235
+ extra_gated_description: >-
236
+ The information you provide will be collected, stored, processed and shared in
237
+ accordance with the [Meta Privacy
238
+ Policy](https://www.facebook.com/privacy/policy/).
239
+ extra_gated_button_content: Submit
240
+ language:
241
+ - en
242
+ pipeline_tag: text-generation
243
+ tags:
244
+ - facebook
245
+ - meta
246
+ - pytorch
247
+ - llama
248
+ - llama-2
249
+ license: llama2
250
+ ---
251
+
252
+ # **Llama 2**
253
+ Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 13B pretrained model, converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom.
254
+
255
+ ## Model Details
256
+ *Note: Use of this model is governed by the Meta license. In order to download the model weights and tokenizer, please visit the [website](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and accept our License before requesting access here.*
257
+
258
+ Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM.
259
+
260
+ **Model Developers** Meta
261
+
262
+ **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations.
263
+
264
+ **Input** Models input text only.
265
+
266
+ **Output** Models generate text only.
267
+
268
+ **Model Architecture** Llama 2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align to human preferences for helpfulness and safety.
269
+
270
+
271
+ ||Training Data|Params|Content Length|GQA|Tokens|LR|
272
+ |---|---|---|---|---|---|---|
273
+ |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>|
274
+ |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>|
275
+ |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>|
276
+
277
+ *Llama 2 family of models.* Token counts refer to pretraining data only. All models are trained with a global batch-size of 4M tokens. Bigger models - 70B -- use Grouped-Query Attention (GQA) for improved inference scalability.
278
+
279
+ **Model Dates** Llama 2 was trained between January 2023 and July 2023.
280
+
281
+ **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback.
282
+
283
+ **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/)
284
+
285
+ **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288)
286
+
287
+ ## Intended Use
288
+ **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.
289
+
290
+ To get the expected features and performance for the chat versions, a specific formatting needs to be followed, including the `INST` and `<<SYS>>` tags, `BOS` and `EOS` tokens, and the whitespaces and breaklines in between (we recommend calling `strip()` on inputs to avoid double-spaces). See our reference code in github for details: [`chat_completion`](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L212).
291
+
292
+ **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2.
293
+
294
+ ## Hardware and Software
295
+ **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute.
296
+
297
+ **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program.
298
+
299
+ ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)|
300
+ |---|---|---|---|
301
+ |Llama 2 7B|184320|400|31.22|
302
+ |Llama 2 13B|368640|400|62.44|
303
+ |Llama 2 70B|1720320|400|291.42|
304
+ |Total|3311616||539.00|
305
+
306
+ **CO<sub>2</sub> emissions during pretraining.** Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others.
307
+
308
+ ## Training Data
309
+ **Overview** Llama 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data.
310
+
311
+ **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023.
312
+
313
+ ## Evaluation Results
314
+
315
+ In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library.
316
+
317
+ |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval|
318
+ |---|---|---|---|---|---|---|---|---|---|
319
+ |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9|
320
+ |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9|
321
+ |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7|
322
+ |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6|
323
+ |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3|
324
+ |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1|
325
+ |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**|
326
+
327
+ **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1.
328
+
329
+ |||TruthfulQA|Toxigen|
330
+ |---|---|---|---|
331
+ |Llama 1|7B|27.42|23.00|
332
+ |Llama 1|13B|41.74|23.08|
333
+ |Llama 1|33B|44.19|22.57|
334
+ |Llama 1|65B|48.71|21.77|
335
+ |Llama 2|7B|33.29|**21.25**|
336
+ |Llama 2|13B|41.86|26.10|
337
+ |Llama 2|70B|**50.18**|24.60|
338
+
339
+ **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better).
340
+
341
+
342
+ |||TruthfulQA|Toxigen|
343
+ |---|---|---|---|
344
+ |Llama-2-Chat|7B|57.04|**0.00**|
345
+ |Llama-2-Chat|13B|62.18|**0.00**|
346
+ |Llama-2-Chat|70B|**64.14**|0.01|
347
+
348
+ **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above.
349
+
350
+ ## Ethical Considerations and Limitations
351
+ Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model.
352
+
353
+ Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide)
354
+
355
+ ## Reporting Issues
356
+ Please report any software “bug,” or other problems with the models through one of the following means:
357
+ - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama)
358
+ - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)
359
+ - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)
360
+
361
+ ## Llama Model Index
362
+ |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf|
363
+ |---|---|---|---|---|
364
+ |7B| [Link](https://huggingface.co/meta-llama/Llama-2-7b) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)|
365
+ |13B| [Link](https://huggingface.co/meta-llama/Llama-2-13b) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf)|
366
+ |70B| [Link](https://huggingface.co/meta-llama/Llama-2-70b) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf)|
367
+