Text Generation
Transformers
GGUF
PyTorch
English
llama
facebook
meta
llama-2
text-generation-inference
TheBloke commited on
Commit
15aa7ae
1 Parent(s): cefc6d6

Initial GGUF model commit

Browse files
Files changed (1) hide show
  1. README.md +322 -0
README.md ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - garage-bAInd/Open-Platypus
4
+ inference: false
5
+ language:
6
+ - en
7
+ library_name: transformers
8
+ license: llama2
9
+ model_creator: Jiangwen Su
10
+ model_link: https://huggingface.co/uukuguy/speechless-llama2-13b
11
+ model_name: Speechless Llama2 13B
12
+ model_type: llama
13
+ pipeline_tag: text-generation
14
+ quantized_by: TheBloke
15
+ tags:
16
+ - facebook
17
+ - meta
18
+ - pytorch
19
+ - llama
20
+ - llama-2
21
+ ---
22
+
23
+ <!-- header start -->
24
+ <!-- 200823 -->
25
+ <div style="width: auto; margin-left: auto; margin-right: auto">
26
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
27
+ </div>
28
+ <div style="display: flex; justify-content: space-between; width: 100%;">
29
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
30
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
31
+ </div>
32
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
33
+ <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>
34
+ </div>
35
+ </div>
36
+ <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>
37
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
38
+ <!-- header end -->
39
+
40
+ # Speechless Llama2 13B - GGUF
41
+ - Model creator: [Jiangwen Su](https://huggingface.co/uukuguy)
42
+ - Original model: [Speechless Llama2 13B](https://huggingface.co/uukuguy/speechless-llama2-13b)
43
+
44
+ ## Description
45
+
46
+ This repo contains GGUF format model files for [Jiangwen Su's Speechless Llama2 13B](https://huggingface.co/uukuguy/speechless-llama2-13b).
47
+
48
+ <!-- README_GGUF.md-about-gguf start -->
49
+ ### About GGUF
50
+
51
+ 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.
52
+
53
+ The key benefit of GGUF is that it is a extensible, future-proof format which stores more information about the model as metadata. It also includes significantly improved tokenization code, including for the first time full support for special tokens. This should improve performance, especially with models that use new special tokens and implement custom prompt templates.
54
+
55
+ As of August 25th, here is a list of clients and libraries that are known to support GGUF:
56
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp).
57
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI. Supports GGUF with GPU acceleration via the ctransformers backend - llama-cpp-python backend should work soon too.
58
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), now supports GGUF as of release 1.41! A powerful GGML web UI, with full GPU accel. Especially good for story telling.
59
+ * [LM Studio](https://lmstudio.ai/), version 0.2.2 and later support GGUF. A fully featured local GUI with GPU acceleration on both Windows (NVidia and AMD), and macOS.
60
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), should now work, choose the `c_transformers` backend. A great web UI with many interesting features. Supports CUDA GPU acceleration.
61
+ * [ctransformers](https://github.com/marella/ctransformers), now supports GGUF as of version 0.2.24! A Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
62
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), supports GGUF as of version 0.1.79. A Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
63
+ * [candle](https://github.com/huggingface/candle), added GGUF support on August 22nd. Candle is a Rust ML framework with a focus on performance, including GPU support, and ease of use.
64
+
65
+ The clients and libraries below are expecting to add GGUF support shortly:
66
+ <!-- README_GGUF.md-about-gguf end -->
67
+
68
+ <!-- repositories-available start -->
69
+ ## Repositories available
70
+
71
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GPTQ)
72
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF)
73
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGML)
74
+ * [Jiangwen Su's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/uukuguy/speechless-llama2-13b)
75
+ <!-- repositories-available end -->
76
+
77
+ <!-- prompt-template start -->
78
+ ## Prompt template: Alpaca
79
+
80
+ ```
81
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
82
+
83
+ ### Instruction:
84
+ {prompt}
85
+
86
+ ### Response:
87
+
88
+ ```
89
+
90
+ <!-- prompt-template end -->
91
+ <!-- compatibility_gguf start -->
92
+ ## Compatibility
93
+
94
+ These quantised GGUF files are compatible with llama.cpp from August 21st 2023 onwards, as of commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9)
95
+
96
+ They are now also compatible with many third party UIs and libraries - please see the list at the top of the README.
97
+
98
+ ## Explanation of quantisation methods
99
+ <details>
100
+ <summary>Click to see details</summary>
101
+
102
+ The new methods available are:
103
+ * 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)
104
+ * 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.
105
+ * 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.
106
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
107
+ * 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
108
+
109
+ Refer to the Provided Files table below to see what files use which methods, and how.
110
+ </details>
111
+ <!-- compatibility_gguf end -->
112
+
113
+ <!-- README_GGUF.md-provided-files start -->
114
+ ## Provided files
115
+
116
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
117
+ | ---- | ---- | ---- | ---- | ---- | ----- |
118
+ | [speechless-llama2-13b.Q2_K.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q2_K.gguf) | Q2_K | 2 | 5.43 GB| 7.93 GB | smallest, significant quality loss - not recommended for most purposes |
119
+ | [speechless-llama2-13b.Q3_K_S.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q3_K_S.gguf) | Q3_K_S | 3 | 5.66 GB| 8.16 GB | very small, high quality loss |
120
+ | [speechless-llama2-13b.Q3_K_M.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q3_K_M.gguf) | Q3_K_M | 3 | 6.34 GB| 8.84 GB | very small, high quality loss |
121
+ | [speechless-llama2-13b.Q3_K_L.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q3_K_L.gguf) | Q3_K_L | 3 | 6.93 GB| 9.43 GB | small, substantial quality loss |
122
+ | [speechless-llama2-13b.Q4_0.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q4_0.gguf) | Q4_0 | 4 | 7.37 GB| 9.87 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
123
+ | [speechless-llama2-13b.Q4_K_S.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q4_K_S.gguf) | Q4_K_S | 4 | 7.41 GB| 9.91 GB | small, greater quality loss |
124
+ | [speechless-llama2-13b.Q4_K_M.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q4_K_M.gguf) | Q4_K_M | 4 | 7.87 GB| 10.37 GB | medium, balanced quality - recommended |
125
+ | [speechless-llama2-13b.Q5_0.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q5_0.gguf) | Q5_0 | 5 | 8.97 GB| 11.47 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
126
+ | [speechless-llama2-13b.Q5_K_S.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q5_K_S.gguf) | Q5_K_S | 5 | 8.97 GB| 11.47 GB | large, low quality loss - recommended |
127
+ | [speechless-llama2-13b.Q5_K_M.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q5_K_M.gguf) | Q5_K_M | 5 | 9.23 GB| 11.73 GB | large, very low quality loss - recommended |
128
+ | [speechless-llama2-13b.Q6_K.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q6_K.gguf) | Q6_K | 6 | 10.68 GB| 13.18 GB | very large, extremely low quality loss |
129
+ | [speechless-llama2-13b.Q8_0.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
130
+
131
+ **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.
132
+ <!-- README_GGUF.md-provided-files end -->
133
+
134
+ <!-- README_GGUF.md-how-to-run start -->
135
+ ## How to run in `llama.cpp`
136
+
137
+ Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
138
+
139
+ For compatibility with older versions of llama.cpp, or for use with third-party clients and libaries, please use GGML files instead.
140
+
141
+ ```
142
+ ./main -t 10 -ngl 32 -m speechless-llama2-13b.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\nWrite a story about llamas\n\n### Response:"
143
+ ```
144
+ 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`.
145
+
146
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
147
+
148
+ Change `-c 4096` to the desired sequence length for this model. 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.
149
+
150
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
151
+
152
+ 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)
153
+
154
+ ## How to run in `text-generation-webui`
155
+
156
+ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
157
+ <!-- README_GGUF.md-how-to-run end -->
158
+
159
+ <!-- footer start -->
160
+ <!-- 200823 -->
161
+ ## Discord
162
+
163
+ For further support, and discussions on these models and AI in general, join us at:
164
+
165
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
166
+
167
+ ## Thanks, and how to contribute.
168
+
169
+ Thanks to the [chirper.ai](https://chirper.ai) team!
170
+
171
+ 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.
172
+
173
+ 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.
174
+
175
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
176
+
177
+ * Patreon: https://patreon.com/TheBlokeAI
178
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
179
+
180
+ **Special thanks to**: Aemon Algiz.
181
+
182
+ **Patreon special mentions**: Kacper Wikieł, knownsqashed, Leonard Tan, Asp the Wyvern, Daniel P. Andersen, Luke Pendergrass, Stanislav Ovsiannikov, RoA, Dave, Ai Maven, Kalila, Will Dee, Imad Khwaja, Nitin Borwankar, Joseph William Delisle, Tony Hughes, Cory Kujawski, Rishabh Srivastava, Russ Johnson, Stephen Murray, Lone Striker, Johann-Peter Hartmann, Elle, J, Deep Realms, SuperWojo, Raven Klaugh, Sebastain Graf, ReadyPlayerEmma, Alps Aficionado, Mano Prime, Derek Yates, Gabriel Puliatti, Mesiah Bishop, Magnesian, Sean Connelly, biorpg, Iucharbius, Olakabola, Fen Risland, Space Cruiser, theTransient, Illia Dulskyi, Thomas Belote, Spencer Kim, Pieter, John Detwiler, Fred von Graf, Michael Davis, Swaroop Kallakuri, subjectnull, Clay Pascal, Subspace Studios, Chris Smitley, Enrico Ros, usrbinkat, Steven Wood, alfie_i, David Ziegler, Willem Michiel, Matthew Berman, Andrey, Pyrater, Jeffrey Morgan, vamX, LangChain4j, Luke @flexchar, Trenton Dambrowitz, Pierre Kircher, Alex, Sam, James Bentley, Edmond Seymore, Eugene Pentland, Pedro Madruga, Rainer Wilmers, Dan Guido, Nathan LeClaire, Spiking Neurons AB, Talal Aujan, zynix, Artur Olbinski, Michael Levine, 阿明, K, John Villwock, Nikolai Manek, Femi Adebogun, senxiiz, Deo Leter, NimbleBox.ai, Viktor Bowallius, Geoffrey Montalvo, Mandus, Ajan Kanaga, ya boyyy, Jonathan Leane, webtim, Brandon Frisco, danny, Alexandros Triantafyllidis, Gabriel Tamborski, Randy H, terasurfer, Vadim, Junyu Yang, Vitor Caleffi, Chadd, transmissions 11
183
+
184
+
185
+ Thank you to all my generous patrons and donaters!
186
+
187
+ And thank you again to a16z for their generous grant.
188
+
189
+ <!-- footer end -->
190
+
191
+ <!-- original-model-card start -->
192
+ # Original model card: Jiangwen Su's Speechless Llama2 13B
193
+
194
+
195
+ <p><h1> speechless-llama2-13b </h1></p>
196
+ speechless-llama2-13b is a merge of Open-Orca/OpenOrca-Platypus2-13B and WizardLM/WizardLM-13B-V1.2.
197
+
198
+ | Metric | Value |
199
+ | --- | --- |
200
+ | ARC | |
201
+ | HellaSwag | |
202
+ | MMLU | |
203
+ | TruthfulQA | |
204
+ | Average | |
205
+
206
+ # **Llama 2**
207
+ 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.
208
+
209
+ ## Model Details
210
+ *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.*
211
+
212
+ 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.
213
+
214
+ **Model Developers** Meta
215
+
216
+ **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations.
217
+
218
+ **Input** Models input text only.
219
+
220
+ **Output** Models generate text only.
221
+
222
+ **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.
223
+
224
+
225
+ ||Training Data|Params|Content Length|GQA|Tokens|LR|
226
+ |---|---|---|---|---|---|---|
227
+ |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>|
228
+ |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>|
229
+ |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>|
230
+
231
+ *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.
232
+
233
+ **Model Dates** Llama 2 was trained between January 2023 and July 2023.
234
+
235
+ **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.
236
+
237
+ **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/)
238
+
239
+ **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288)
240
+
241
+ ## Intended Use
242
+ **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.
243
+
244
+ 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).
245
+
246
+ **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.
247
+
248
+ ## Hardware and Software
249
+ **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.
250
+
251
+ **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.
252
+
253
+ ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)|
254
+ |---|---|---|---|
255
+ |Llama 2 7B|184320|400|31.22|
256
+ |Llama 2 13B|368640|400|62.44|
257
+ |Llama 2 70B|1720320|400|291.42|
258
+ |Total|3311616||539.00|
259
+
260
+ **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.
261
+
262
+ ## Training Data
263
+ **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.
264
+
265
+ **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023.
266
+
267
+ ## Evaluation Results
268
+
269
+ 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.
270
+
271
+ |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval|
272
+ |---|---|---|---|---|---|---|---|---|---|
273
+ |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9|
274
+ |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9|
275
+ |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7|
276
+ |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6|
277
+ |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3|
278
+ |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1|
279
+ |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**|
280
+
281
+ **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.
282
+
283
+ |||TruthfulQA|Toxigen|
284
+ |---|---|---|---|
285
+ |Llama 1|7B|27.42|23.00|
286
+ |Llama 1|13B|41.74|23.08|
287
+ |Llama 1|33B|44.19|22.57|
288
+ |Llama 1|65B|48.71|21.77|
289
+ |Llama 2|7B|33.29|**21.25**|
290
+ |Llama 2|13B|41.86|26.10|
291
+ |Llama 2|70B|**50.18**|24.60|
292
+
293
+ **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).
294
+
295
+
296
+ |||TruthfulQA|Toxigen|
297
+ |---|---|---|---|
298
+ |Llama-2-Chat|7B|57.04|**0.00**|
299
+ |Llama-2-Chat|13B|62.18|**0.00**|
300
+ |Llama-2-Chat|70B|**64.14**|0.01|
301
+
302
+ **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above.
303
+
304
+ ## Ethical Considerations and Limitations
305
+ 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.
306
+
307
+ Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide)
308
+
309
+ ## Reporting Issues
310
+ Please report any software “bug,” or other problems with the models through one of the following means:
311
+ - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama)
312
+ - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)
313
+ - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)
314
+
315
+ ## Llama Model Index
316
+ |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf|
317
+ |---|---|---|---|---|
318
+ |7B| [Link](https://huggingface.co/llamaste/Llama-2-7b) | [Link](https://huggingface.co/llamaste/Llama-2-7b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-7b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-7b-chat-hf)|
319
+ |13B| [Link](https://huggingface.co/llamaste/Llama-2-13b) | [Link](https://huggingface.co/llamaste/Llama-2-13b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-13b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-13b-hf)|
320
+ |70B| [Link](https://huggingface.co/llamaste/Llama-2-70b) | [Link](https://huggingface.co/llamaste/Llama-2-70b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-70b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-70b-hf)|
321
+
322
+ <!-- original-model-card end -->