Upload folder using huggingface_hub
Browse files- README.md +283 -0
- USE_POLICY.md +50 -0
- config.json +3 -0
- huggingface-metadata.txt +18 -0
- llama-2-7b.ggmlv3.q2_K.bin +3 -0
- llama-2-7b.ggmlv3.q3_K_L.bin +3 -0
- llama-2-7b.ggmlv3.q3_K_M.bin +3 -0
- llama-2-7b.ggmlv3.q3_K_S.bin +3 -0
- llama-2-7b.ggmlv3.q4_0.bin +3 -0
- llama-2-7b.ggmlv3.q4_1.bin +3 -0
- llama-2-7b.ggmlv3.q4_K_M.bin +3 -0
- llama-2-7b.ggmlv3.q4_K_S.bin +3 -0
- llama-2-7b.ggmlv3.q5_0.bin +3 -0
- llama-2-7b.ggmlv3.q5_1.bin +3 -0
- llama-2-7b.ggmlv3.q5_K_M.bin +3 -0
- llama-2-7b.ggmlv3.q5_K_S.bin +3 -0
- llama-2-7b.ggmlv3.q6_K.bin +3 -0
- llama-2-7b.ggmlv3.q8_0.bin +3 -0
README.md
ADDED
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
inference: false
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
tags:
|
7 |
+
- facebook
|
8 |
+
- meta
|
9 |
+
- pytorch
|
10 |
+
- llama
|
11 |
+
- llama-2
|
12 |
+
model_type: llama
|
13 |
+
license: other
|
14 |
+
---
|
15 |
+
|
16 |
+
<!-- header start -->
|
17 |
+
<div style="width: 100%;">
|
18 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
19 |
+
</div>
|
20 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
21 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
22 |
+
<p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
|
23 |
+
</div>
|
24 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
25 |
+
<p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
<!-- header end -->
|
29 |
+
|
30 |
+
# Meta's Llama 2 7B GGML
|
31 |
+
|
32 |
+
These files are GGML format model files for [Meta's Llama 2 7B](https://huggingface.co/meta-llama/Llama-2-7b-hf).
|
33 |
+
|
34 |
+
GGML files are for CPU + GPU inference using [llama.cpp](https://github.com/ggerganov/llama.cpp) and libraries and UIs which support this format, such as:
|
35 |
+
* [KoboldCpp](https://github.com/LostRuins/koboldcpp), a powerful GGML web UI with full GPU acceleration out of the box. Especially good for story telling.
|
36 |
+
* [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with GPU acceleration via the c_transformers backend.
|
37 |
+
* [LM Studio](https://lmstudio.ai/), a fully featured local GUI. Supports full GPU accel on macOS. Also supports Windows, without GPU accel.
|
38 |
+
* [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most popular web UI. Requires extra steps to enable GPU accel via llama.cpp backend.
|
39 |
+
* [ctransformers](https://github.com/marella/ctransformers), a Python library with LangChain support and OpenAI-compatible AI server.
|
40 |
+
* [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with OpenAI-compatible API server.
|
41 |
+
|
42 |
+
## Repositories available
|
43 |
+
|
44 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Llama-2-7B-GPTQ)
|
45 |
+
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Llama-2-7B-GGML)
|
46 |
+
* [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/meta-llama/Llama-2-7b-hf)
|
47 |
+
|
48 |
+
## Prompt template: None
|
49 |
+
|
50 |
+
```
|
51 |
+
{prompt}
|
52 |
+
```
|
53 |
+
|
54 |
+
<!-- compatibility_ggml start -->
|
55 |
+
## Compatibility
|
56 |
+
|
57 |
+
### Original llama.cpp quant methods: `q4_0, q4_1, q5_0, q5_1, q8_0`
|
58 |
+
|
59 |
+
These are guaranteed to be compatible with any UIs, tools and libraries released since late May. They may be phased out soon, as they are largely superseded by the new k-quant methods.
|
60 |
+
|
61 |
+
### New k-quant methods: `q2_K, q3_K_S, q3_K_M, q3_K_L, q4_K_S, q4_K_M, q5_K_S, q6_K`
|
62 |
+
|
63 |
+
These new quantisation methods are compatible with llama.cpp as of June 6th, commit `2d43387`.
|
64 |
+
|
65 |
+
They are now also compatible with recent releases of text-generation-webui, KoboldCpp, llama-cpp-python, ctransformers, rustformers and most others. For compatibility with other tools and libraries, please check their documentation.
|
66 |
+
|
67 |
+
## Explanation of the new k-quant methods
|
68 |
+
<details>
|
69 |
+
<summary>Click to see details</summary>
|
70 |
+
|
71 |
+
The new methods available are:
|
72 |
+
* 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)
|
73 |
+
* 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.
|
74 |
+
* 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.
|
75 |
+
* GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
|
76 |
+
* 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
|
77 |
+
* 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.
|
78 |
+
|
79 |
+
Refer to the Provided Files table below to see what files use which methods, and how.
|
80 |
+
</details>
|
81 |
+
<!-- compatibility_ggml end -->
|
82 |
+
|
83 |
+
## Provided files
|
84 |
+
| Name | Quant method | Bits | Size | Max RAM required | Use case |
|
85 |
+
| ---- | ---- | ---- | ---- | ---- | ----- |
|
86 |
+
| llama-2-7b.ggmlv3.q2_K.bin | q2_K | 2 | 2.87 GB| 5.37 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. |
|
87 |
+
| llama-2-7b.ggmlv3.q3_K_L.bin | q3_K_L | 3 | 3.60 GB| 6.10 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 |
|
88 |
+
| llama-2-7b.ggmlv3.q3_K_M.bin | q3_K_M | 3 | 3.28 GB| 5.78 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 |
|
89 |
+
| llama-2-7b.ggmlv3.q3_K_S.bin | q3_K_S | 3 | 2.95 GB| 5.45 GB | New k-quant method. Uses GGML_TYPE_Q3_K for all tensors |
|
90 |
+
| llama-2-7b.ggmlv3.q4_0.bin | q4_0 | 4 | 3.79 GB| 6.29 GB | Original quant method, 4-bit. |
|
91 |
+
| llama-2-7b.ggmlv3.q4_1.bin | q4_1 | 4 | 4.21 GB| 6.71 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. |
|
92 |
+
| llama-2-7b.ggmlv3.q4_K_M.bin | q4_K_M | 4 | 4.08 GB| 6.58 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 |
|
93 |
+
| llama-2-7b.ggmlv3.q4_K_S.bin | q4_K_S | 4 | 3.83 GB| 6.33 GB | New k-quant method. Uses GGML_TYPE_Q4_K for all tensors |
|
94 |
+
| llama-2-7b.ggmlv3.q5_0.bin | q5_0 | 5 | 4.63 GB| 7.13 GB | Original quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. |
|
95 |
+
| llama-2-7b.ggmlv3.q5_1.bin | q5_1 | 5 | 5.06 GB| 7.56 GB | Original quant method, 5-bit. Even higher accuracy, resource usage and slower inference. |
|
96 |
+
| llama-2-7b.ggmlv3.q5_K_M.bin | q5_K_M | 5 | 4.78 GB| 7.28 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 |
|
97 |
+
| llama-2-7b.ggmlv3.q5_K_S.bin | q5_K_S | 5 | 4.65 GB| 7.15 GB | New k-quant method. Uses GGML_TYPE_Q5_K for all tensors |
|
98 |
+
| llama-2-7b.ggmlv3.q6_K.bin | q6_K | 6 | 5.53 GB| 8.03 GB | New k-quant method. Uses GGML_TYPE_Q8_K for all tensors - 6-bit quantization |
|
99 |
+
| llama-2-7b.ggmlv3.q8_0.bin | q8_0 | 8 | 7.16 GB| 9.66 GB | Original quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
|
100 |
+
|
101 |
+
**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.
|
102 |
+
|
103 |
+
## How to run in `llama.cpp`
|
104 |
+
|
105 |
+
I use the following command line; adjust for your tastes and needs:
|
106 |
+
|
107 |
+
```
|
108 |
+
./main -t 10 -ngl 32 -m llama-2-7b.ggmlv3.q4_0.bin --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### Instruction: Write a story about llamas\n### Response:"
|
109 |
+
```
|
110 |
+
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`.
|
111 |
+
|
112 |
+
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
113 |
+
|
114 |
+
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
115 |
+
|
116 |
+
## How to run in `text-generation-webui`
|
117 |
+
|
118 |
+
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).
|
119 |
+
|
120 |
+
<!-- footer start -->
|
121 |
+
## Discord
|
122 |
+
|
123 |
+
For further support, and discussions on these models and AI in general, join us at:
|
124 |
+
|
125 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
126 |
+
|
127 |
+
## Thanks, and how to contribute.
|
128 |
+
|
129 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
130 |
+
|
131 |
+
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.
|
132 |
+
|
133 |
+
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.
|
134 |
+
|
135 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
136 |
+
|
137 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
138 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
139 |
+
|
140 |
+
**Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
|
141 |
+
|
142 |
+
**Patreon special mentions**: Space Cruiser, Nikolai Manek, Sam, Chris McCloskey, Rishabh Srivastava, Kalila, Spiking Neurons AB, Khalefa Al-Ahmad, WelcomeToTheClub, Chadd, Lone Striker, Viktor Bowallius, Edmond Seymore, Ai Maven, Chris Smitley, Dave, Alexandros Triantafyllidis, Luke @flexchar, Elle, ya boyyy, Talal Aujan, Alex , Jonathan Leane, Deep Realms, Randy H, subjectnull, Preetika Verma, Joseph William Delisle, Michael Levine, chris gileta, K, Oscar Rangel, LangChain4j, Trenton Dambrowitz, Eugene Pentland, Johann-Peter Hartmann, Femi Adebogun, Illia Dulskyi, senxiiz, Daniel P. Andersen, Sean Connelly, Artur Olbinski, RoA, Mano Prime, Derek Yates, Raven Klaugh, David Flickinger, Willem Michiel, Pieter, Willian Hasse, vamX, Luke Pendergrass, webtim, Ghost , Rainer Wilmers, Nathan LeClaire, Will Dee, Cory Kujawski, John Detwiler, Fred von Graf, biorpg, Iucharbius , Imad Khwaja, Pierre Kircher, terasurfer , Asp the Wyvern, John Villwock, theTransient, zynix , Gabriel Tamborski, Fen Risland, Gabriel Puliatti, Matthew Berman, Pyrater, SuperWojo, Stephen Murray, Karl Bernard, Ajan Kanaga, Greatston Gnanesh, Junyu Yang.
|
143 |
+
|
144 |
+
Thank you to all my generous patrons and donaters!
|
145 |
+
|
146 |
+
<!-- footer end -->
|
147 |
+
|
148 |
+
# Original model card: Meta's Llama 2 7B
|
149 |
+
|
150 |
+
---
|
151 |
+
extra_gated_heading: Access Llama 2 on Hugging Face
|
152 |
+
extra_gated_description: >-
|
153 |
+
This is a form to enable access to Llama 2 on Hugging Face after you have been
|
154 |
+
granted access from Meta. Please visit the [Meta website](https://ai.meta.com/resources/models-and-libraries/llama-downloads) and accept our
|
155 |
+
license terms and acceptable use policy before submitting this form. Requests
|
156 |
+
will be processed in 1-2 days.
|
157 |
+
extra_gated_button_content: Submit
|
158 |
+
extra_gated_fields:
|
159 |
+
I agree to share my name, email address and username with Meta and confirm that I have already been granted download access on the Meta website: checkbox
|
160 |
+
language:
|
161 |
+
- en
|
162 |
+
pipeline_tag: text-generation
|
163 |
+
inference: false
|
164 |
+
tags:
|
165 |
+
- facebook
|
166 |
+
- meta
|
167 |
+
- pytorch
|
168 |
+
- llama
|
169 |
+
- llama-2
|
170 |
+
---
|
171 |
+
# **Llama 2**
|
172 |
+
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 7B pretrained model, converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom.
|
173 |
+
|
174 |
+
## Model Details
|
175 |
+
*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.*
|
176 |
+
|
177 |
+
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.
|
178 |
+
|
179 |
+
**Model Developers** Meta
|
180 |
+
|
181 |
+
**Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations.
|
182 |
+
|
183 |
+
**Input** Models input text only.
|
184 |
+
|
185 |
+
**Output** Models generate text only.
|
186 |
+
|
187 |
+
**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.
|
188 |
+
|
189 |
+
|
190 |
+
||Training Data|Params|Content Length|GQA|Tokens|LR|
|
191 |
+
|---|---|---|---|---|---|---|
|
192 |
+
|Llama 2|*A new mix of publicly available online data*|7B|4k|✗|2.0T|3.0 x 10<sup>-4</sup>|
|
193 |
+
|Llama 2|*A new mix of publicly available online data*|13B|4k|✗|2.0T|3.0 x 10<sup>-4</sup>|
|
194 |
+
|Llama 2|*A new mix of publicly available online data*|70B|4k|✔|2.0T|1.5 x 10<sup>-4</sup>|
|
195 |
+
|
196 |
+
*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.
|
197 |
+
|
198 |
+
**Model Dates** Llama 2 was trained between January 2023 and July 2023.
|
199 |
+
|
200 |
+
**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.
|
201 |
+
|
202 |
+
**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/)
|
203 |
+
|
204 |
+
## Intended Use
|
205 |
+
**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.
|
206 |
+
|
207 |
+
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).
|
208 |
+
|
209 |
+
**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.
|
210 |
+
|
211 |
+
## Hardware and Software
|
212 |
+
**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.
|
213 |
+
|
214 |
+
**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.
|
215 |
+
|
216 |
+
||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)|
|
217 |
+
|---|---|---|---|
|
218 |
+
|Llama 2 7B|184320|400|31.22|
|
219 |
+
|Llama 2 13B|368640|400|62.44|
|
220 |
+
|Llama 2 70B|1720320|400|291.42|
|
221 |
+
|Total|3311616||539.00|
|
222 |
+
|
223 |
+
**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.
|
224 |
+
|
225 |
+
## Training Data
|
226 |
+
**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.
|
227 |
+
|
228 |
+
**Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023.
|
229 |
+
|
230 |
+
## Evaluation Results
|
231 |
+
|
232 |
+
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.
|
233 |
+
|
234 |
+
|Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval|
|
235 |
+
|---|---|---|---|---|---|---|---|---|---|
|
236 |
+
|Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9|
|
237 |
+
|Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9|
|
238 |
+
|Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7|
|
239 |
+
|Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6|
|
240 |
+
|Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3|
|
241 |
+
|Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1|
|
242 |
+
|Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**|
|
243 |
+
|
244 |
+
**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.
|
245 |
+
|
246 |
+
|||TruthfulQA|Toxigen|
|
247 |
+
|---|---|---|---|
|
248 |
+
|Llama 1|7B|27.42|23.00|
|
249 |
+
|Llama 1|13B|41.74|23.08|
|
250 |
+
|Llama 1|33B|44.19|22.57|
|
251 |
+
|Llama 1|65B|48.71|21.77|
|
252 |
+
|Llama 2|7B|33.29|**21.25**|
|
253 |
+
|Llama 2|13B|41.86|26.10|
|
254 |
+
|Llama 2|70B|**50.18**|24.60|
|
255 |
+
|
256 |
+
**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).
|
257 |
+
|
258 |
+
|
259 |
+
|||TruthfulQA|Toxigen|
|
260 |
+
|---|---|---|---|
|
261 |
+
|Llama-2-Chat|7B|57.04|**0.00**|
|
262 |
+
|Llama-2-Chat|13B|62.18|**0.00**|
|
263 |
+
|Llama-2-Chat|70B|**64.14**|0.01|
|
264 |
+
|
265 |
+
**Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above.
|
266 |
+
|
267 |
+
## Ethical Considerations and Limitations
|
268 |
+
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.
|
269 |
+
|
270 |
+
Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide)
|
271 |
+
|
272 |
+
## Reporting Issues
|
273 |
+
Please report any software “bug,” or other problems with the models through one of the following means:
|
274 |
+
- Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama)
|
275 |
+
- Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)
|
276 |
+
- Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)
|
277 |
+
|
278 |
+
## Llama Model Index
|
279 |
+
|Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf|
|
280 |
+
|---|---|---|---|---|
|
281 |
+
|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)|
|
282 |
+
|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)|
|
283 |
+
|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)|
|
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 |
+
|
config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_type": "llama"
|
3 |
+
}
|
huggingface-metadata.txt
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
url: https://huggingface.co/TheBloke/Llama-2-7B-GGML
|
2 |
+
branch: main
|
3 |
+
download date: 2023-08-17 14:17:10
|
4 |
+
sha256sum:
|
5 |
+
4639919d56b05e0cf44edcee7627f345a7b3d3b35cfafb347864acadf503ef28 llama-2-7b.ggmlv3.q2_K.bin
|
6 |
+
b32750ddc5bfb52bae45f846080d67eb9cb6be2a5843ae061dcc91cb3f0dc411 llama-2-7b.ggmlv3.q3_K_L.bin
|
7 |
+
1ef7ec8f8fac2793448fdbc672afc6f43f470e72f50bb5b26c170b430e9d9746 llama-2-7b.ggmlv3.q3_K_M.bin
|
8 |
+
a20353e17c3f92834a261dd59e3362576f98d213e68b2c55ab61e0a1d5e7d1a0 llama-2-7b.ggmlv3.q3_K_S.bin
|
9 |
+
bfa26d855e44629c4cf919985e90bd7fa03b77eea1676791519e39a4d45fd4d5 llama-2-7b.ggmlv3.q4_0.bin
|
10 |
+
83c7c75d51ad6ed5dd58a3a3005375a0340aa614842ebcb2cff6596bd6dec159 llama-2-7b.ggmlv3.q4_1.bin
|
11 |
+
16baf59cbb724f99def35f000d1e0fd9c71938649b1856dd81d3a7e3b3a752bd llama-2-7b.ggmlv3.q4_K_M.bin
|
12 |
+
acaf2b0976608a1ae663e48c50199fc96db038367931a3d1928135d6d8f35651 llama-2-7b.ggmlv3.q4_K_S.bin
|
13 |
+
a3e3233c8c46d88a7c692d2204bfc7212d13397d0f984114b814ab160f7b43d2 llama-2-7b.ggmlv3.q5_0.bin
|
14 |
+
f850c4b9d3448b11bfdd9a538efef014174eed839066e55396a4b47c5bc3cd03 llama-2-7b.ggmlv3.q5_1.bin
|
15 |
+
2a352392044c1919c7380dd53e3e5dcf6bd77b97f5f0663d72da68e372483cf6 llama-2-7b.ggmlv3.q5_K_M.bin
|
16 |
+
90915617425bb045f5d2d468d1b05935b69ea4b09e4dad51c8a8d1e9186caa35 llama-2-7b.ggmlv3.q5_K_S.bin
|
17 |
+
4a729c62010251307772561f86a49b8f9f53e569ef41dbf0f0577dea6e07acc3 llama-2-7b.ggmlv3.q6_K.bin
|
18 |
+
5bb0702855f0c8abc645ea68c4d41e05207964ff54dd38c2787c1c1206cae121 llama-2-7b.ggmlv3.q8_0.bin
|
llama-2-7b.ggmlv3.q2_K.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4639919d56b05e0cf44edcee7627f345a7b3d3b35cfafb347864acadf503ef28
|
3 |
+
size 2866807424
|
llama-2-7b.ggmlv3.q3_K_L.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b32750ddc5bfb52bae45f846080d67eb9cb6be2a5843ae061dcc91cb3f0dc411
|
3 |
+
size 3596821120
|
llama-2-7b.ggmlv3.q3_K_M.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1ef7ec8f8fac2793448fdbc672afc6f43f470e72f50bb5b26c170b430e9d9746
|
3 |
+
size 3282248320
|
llama-2-7b.ggmlv3.q3_K_S.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a20353e17c3f92834a261dd59e3362576f98d213e68b2c55ab61e0a1d5e7d1a0
|
3 |
+
size 2948014720
|
llama-2-7b.ggmlv3.q4_0.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bfa26d855e44629c4cf919985e90bd7fa03b77eea1676791519e39a4d45fd4d5
|
3 |
+
size 3791725184
|
llama-2-7b.ggmlv3.q4_1.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:83c7c75d51ad6ed5dd58a3a3005375a0340aa614842ebcb2cff6596bd6dec159
|
3 |
+
size 4212859520
|
llama-2-7b.ggmlv3.q4_K_M.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:16baf59cbb724f99def35f000d1e0fd9c71938649b1856dd81d3a7e3b3a752bd
|
3 |
+
size 4080714368
|
llama-2-7b.ggmlv3.q4_K_S.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:acaf2b0976608a1ae663e48c50199fc96db038367931a3d1928135d6d8f35651
|
3 |
+
size 3825517184
|
llama-2-7b.ggmlv3.q5_0.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a3e3233c8c46d88a7c692d2204bfc7212d13397d0f984114b814ab160f7b43d2
|
3 |
+
size 4633993856
|
llama-2-7b.ggmlv3.q5_1.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f850c4b9d3448b11bfdd9a538efef014174eed839066e55396a4b47c5bc3cd03
|
3 |
+
size 5055128192
|
llama-2-7b.ggmlv3.q5_K_M.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2a352392044c1919c7380dd53e3e5dcf6bd77b97f5f0663d72da68e372483cf6
|
3 |
+
size 4782867072
|
llama-2-7b.ggmlv3.q5_K_S.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:90915617425bb045f5d2d468d1b05935b69ea4b09e4dad51c8a8d1e9186caa35
|
3 |
+
size 4651401856
|
llama-2-7b.ggmlv3.q6_K.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4a729c62010251307772561f86a49b8f9f53e569ef41dbf0f0577dea6e07acc3
|
3 |
+
size 5528904320
|
llama-2-7b.ggmlv3.q8_0.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5bb0702855f0c8abc645ea68c4d41e05207964ff54dd38c2787c1c1206cae121
|
3 |
+
size 7160799872
|