jburmeister MaziyarPanahi commited on
Commit
8cb5a38
0 Parent(s):

Duplicate from MaziyarPanahi/Meta-Llama-3-70B-Instruct-GGUF

Browse files

Co-authored-by: Maziyar Panahi <MaziyarPanahi@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Meta-Llama-3-70B-Instruct.Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Meta-Llama-3-70B-Instruct.IQ3_XS.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Meta-Llama-3-70B-Instruct.Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Meta-Llama-3-70B-Instruct.IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Meta-Llama-3-70B-Instruct.Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Meta-Llama-3-70B-Instruct.Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Meta-Llama-3-70B-Instruct.Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Meta-Llama-3-70B-Instruct.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Meta-Llama-3-70B-Instruct.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Meta-Llama-3-70B-Instruct.Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
46
+ Meta-Llama-3-70B-Instruct.Q6_K-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
47
+ Meta-Llama-3-70B-Instruct.Q6_K-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
48
+ Meta-Llama-3-70B-Instruct.Q8_0-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
49
+ Meta-Llama-3-70B-Instruct.Q8_0-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
50
+ Meta-Llama-3-70B-Instruct.fp16-00001-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
51
+ Meta-Llama-3-70B-Instruct.fp16-00002-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
52
+ Meta-Llama-3-70B-Instruct.fp16-00003-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
53
+ Meta-Llama-3-70B-Instruct.fp16-00004-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
54
+ Meta-Llama-3-70B-Instruct.IQ1_M.gguf filter=lfs diff=lfs merge=lfs -text
55
+ Meta-Llama-3-70B-Instruct.IQ1_S.gguf filter=lfs diff=lfs merge=lfs -text
56
+ Meta-Llama-3-70B-Instruct.IQ2_XS.gguf filter=lfs diff=lfs merge=lfs -text
57
+ imatrix.dat filter=lfs diff=lfs merge=lfs -text
Meta-Llama-3-70B-Instruct.IQ1_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdbe8ac2126a70fa0af3fac7a4fe04f1c76330c50eba8383567587b48b328098
3
+ size 16751708608
Meta-Llama-3-70B-Instruct.IQ1_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3797a69f1bdf53fabf9f3a3a8c89730b504dd3209406288515c9944c14093048
3
+ size 15343995328
Meta-Llama-3-70B-Instruct.IQ2_XS.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30439325ad435cb4eb1cdaad4cfb6d8e446f08de6072d64e3358c7aaa3a1e391
3
+ size 21142620608
Meta-Llama-3-70B-Instruct.IQ3_XS.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:011bb64f742b177eb0f0291c7945536f27147efa5c997c0e93ab48c420f78f71
3
+ size 29308242368
Meta-Llama-3-70B-Instruct.IQ4_XS.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d23d43e8be1a8a3e3592562d472be46a7ec230108eab3ccd5a4f104b7d73c35
3
+ size 37903174080
Meta-Llama-3-70B-Instruct.Q2_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcf2b2c404c32e65406767ace3bf87b7ea287e6db7ffa7e39860b2ca7d3f050c
3
+ size 26375621056
Meta-Llama-3-70B-Instruct.Q3_K_L.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3543ca063726839d98a816b523f55c25e526e19db8461475b82b80f0b2cc8d99
3
+ size 37141105088
Meta-Llama-3-70B-Instruct.Q3_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b542dbf27a1596bcd86f881406b701eef8ca2b774483810ac5959e60477acb64
3
+ size 34268006848
Meta-Llama-3-70B-Instruct.Q3_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b84a9c9dc7515629751f73ab59705721b28492a66b3652db95c8420b6a997da7
3
+ size 30912563648
Meta-Llama-3-70B-Instruct.Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1cea5f87dc1af521f31b30991a4663e7e43f6046a7628b854c155f489eec213
3
+ size 42520906176
Meta-Llama-3-70B-Instruct.Q4_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:291bab7a614db2be875d1cc35e2b9d33459287031074ddec52564fa1b0fc3c68
3
+ size 40347732416
Meta-Llama-3-70B-Instruct.Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08bdfd51ac339a1a5ac4169679ff4e52fbe18232e3f21e556ab9c8e7faf5f8fa
3
+ size 49950329280
Meta-Llama-3-70B-Instruct.Q5_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d43782228a306d1ae0e1f2cde13e5e8a8c55885e8a7454b037564167a2b7fedb
3
+ size 48657959360
Meta-Llama-3-70B-Instruct.Q6_K-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e7691f0e569edca2b5f032352fce7ac9edd2cb57a87185c9b8c269ba3d72ade
3
+ size 32141688512
Meta-Llama-3-70B-Instruct.Q6_K-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bddeb9aeceee0cc567438f23b769e1ad9f7d83a0c3b86fcdd89e3544ea84a6a9
3
+ size 25746967520
Meta-Llama-3-70B-Instruct.Q8_0-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f84987dff10e8c4fd778decd51a9c450f3bb79aa1ca8580585dd3acef45ba72
3
+ size 41627811520
Meta-Llama-3-70B-Instruct.Q8_0-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1fdf71318ac3cd1c48e58ac5c63b48210ae05f98930fdc1332c535786b527f2
3
+ size 33347750880
Meta-Llama-3-70B-Instruct.fp16-00001-of-00004.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac1197fc440eef5913b169048abf8bea35520df637433e45959649e6e94ab015
3
+ size 39759237056
Meta-Llama-3-70B-Instruct.fp16-00002-of-00004.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a139fd5649e53eaab88170be0e5ada5feb516c4cf5e48812952ea6d041a0db3
3
+ size 38589050688
Meta-Llama-3-70B-Instruct.fp16-00003-of-00004.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6b0c009e68c9f5fece0afbef391ee83c8e832daa6b183e4bc4a562b75cda2b3
3
+ size 38119321376
Meta-Llama-3-70B-Instruct.fp16-00004-of-00004.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b75bd77eb4ee0d243214ffa84b91deb59ecf78a3f7a5b7ab7478d80d09a9979c
3
+ size 24650816800
README.md ADDED
@@ -0,0 +1,630 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - facebook
7
+ - meta
8
+ - pytorch
9
+ - llama
10
+ - llama-3
11
+ - quantized
12
+ - 2-bit
13
+ - 3-bit
14
+ - 4-bit
15
+ - 5-bit
16
+ - 6-bit
17
+ - 8-bit
18
+ - 16-bit
19
+ - GGUF
20
+ inference: false
21
+ model_creator: MaziyarPanahi
22
+ model_name: Meta-Llama-3-70B-Instruct-GGUF
23
+ quantized_by: MaziyarPanahi
24
+ license_name: llama3
25
+ ---
26
+
27
+
28
+ # MaziyarPanahi/Meta-Llama-3-70B-Instruct-GGUF
29
+
30
+ The GGUF and quantized models here are based on [meta-llama/Meta-Llama-3-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct) model
31
+
32
+ ## How to download
33
+ You can download only the quants you need instead of cloning the entire repository as follows:
34
+
35
+ ```
36
+ huggingface-cli download MaziyarPanahi/Meta-Llama-3-70B-Instruct-GGUF --local-dir . --include '*Q2_K*gguf'
37
+ ```
38
+
39
+ ## Load GGUF models
40
+
41
+ You `MUST` follow the prompt template provided by Llama-3:
42
+
43
+
44
+ ```sh
45
+ ./llama.cpp/main -m Meta-Llama-3-70B-Instruct.Q2_K.gguf -r '<|eot_id|>' --in-prefix "\n<|start_header_id|>user<|end_header_id|>\n\n" --in-suffix "<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n" -p "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a helpful, smart, kind, and efficient AI assistant. You always fulfill the user's requests to the best of your ability.<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nHi! How are you?<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>\n\n" -n 1024
46
+ ```
47
+
48
+
49
+
50
+
51
+ Original README
52
+
53
+ ---
54
+
55
+ ## Model Details
56
+
57
+ Meta developed and released the Meta Llama 3 family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes. The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks. Further, in developing these models, we took great care to optimize helpfulness and safety.
58
+
59
+ **Model developers** Meta
60
+
61
+ **Variations** Llama 3 comes in two sizes — 8B and 70B parameters — in pre-trained and instruction tuned variants.
62
+
63
+ **Input** Models input text only.
64
+
65
+ **Output** Models generate text and code only.
66
+
67
+ **Model Architecture** Llama 3 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 with human preferences for helpfulness and safety.
68
+
69
+
70
+ <table>
71
+ <tr>
72
+ <td>
73
+ </td>
74
+ <td><strong>Training Data</strong>
75
+ </td>
76
+ <td><strong>Params</strong>
77
+ </td>
78
+ <td><strong>Context length</strong>
79
+ </td>
80
+ <td><strong>GQA</strong>
81
+ </td>
82
+ <td><strong>Token count</strong>
83
+ </td>
84
+ <td><strong>Knowledge cutoff</strong>
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <td rowspan="2" >Llama 3
89
+ </td>
90
+ <td rowspan="2" >A new mix of publicly available online data.
91
+ </td>
92
+ <td>8B
93
+ </td>
94
+ <td>8k
95
+ </td>
96
+ <td>Yes
97
+ </td>
98
+ <td rowspan="2" >15T+
99
+ </td>
100
+ <td>March, 2023
101
+ </td>
102
+ </tr>
103
+ <tr>
104
+ <td>70B
105
+ </td>
106
+ <td>8k
107
+ </td>
108
+ <td>Yes
109
+ </td>
110
+ <td>December, 2023
111
+ </td>
112
+ </tr>
113
+ </table>
114
+
115
+
116
+ **Llama 3 family of models**. Token counts refer to pretraining data only. Both the 8 and 70B versions use Grouped-Query Attention (GQA) for improved inference scalability.
117
+
118
+ **Model Release Date** April 18, 2024.
119
+
120
+ **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.
121
+
122
+ **License** A custom commercial license is available at: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
123
+
124
+ Where to send questions or comments about the model Instructions on how to provide feedback or comments on the model can be found in the model [README](https://github.com/meta-llama/llama3). For more technical information about generation parameters and recipes for how to use Llama 3 in applications, please go [here](https://github.com/meta-llama/llama-recipes).
125
+
126
+
127
+ ## Intended Use
128
+
129
+ **Intended Use Cases** Llama 3 is intended for commercial and research use in English. Instruction tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.
130
+
131
+ **Out-of-scope** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in any other way that is prohibited by the Acceptable Use Policy and Llama 3 Community License. Use in languages other than English**.
132
+
133
+ **Note: Developers may fine-tune Llama 3 models for languages beyond English provided they comply with the Llama 3 Community License and the Acceptable Use Policy.
134
+
135
+ ## How to use
136
+
137
+ This repository contains two versions of Meta-Llama-3-70B-Instruct, for use with transformers and with the original `llama3` codebase.
138
+
139
+ ### Use with transformers
140
+
141
+ See the snippet below for usage with Transformers:
142
+
143
+ ```python
144
+ import transformers
145
+ import torch
146
+
147
+ model_id = "meta-llama/Meta-Llama-3-70B-Instruct"
148
+
149
+ pipeline = transformers.pipeline(
150
+ "text-generation",
151
+ model=model_id,
152
+ model_kwargs={"torch_dtype": torch.bfloat16},
153
+ device="cuda",
154
+ )
155
+
156
+ messages = [
157
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
158
+ {"role": "user", "content": "Who are you?"},
159
+ ]
160
+
161
+ prompt = pipeline.tokenizer.apply_chat_template(
162
+ messages,
163
+ tokenize=False,
164
+ add_generation_prompt=True
165
+ )
166
+
167
+ terminators = [
168
+ tokenizer.eos_token_id,
169
+ tokenizer.convert_tokens_to_ids("<|eot_id|>")
170
+ ]
171
+
172
+ outputs = pipeline(
173
+ prompt,
174
+ max_new_tokens=256,
175
+ eos_token_id=terminators,
176
+ do_sample=True,
177
+ temperature=0.6,
178
+ top_p=0.9,
179
+ )
180
+ print(outputs[0]["generated_text"][len(prompt):])
181
+ ```
182
+
183
+ ### Use with `llama3`
184
+
185
+ Please, follow the instructions in the [repository](https://github.com/meta-llama/llama3).
186
+
187
+ To download Original checkpoints, see the example command below leveraging `huggingface-cli`:
188
+
189
+ ```
190
+ huggingface-cli download meta-llama/Meta-Llama-3-70B-Instruct --include "original/*" --local-dir Meta-Llama-3-70B-Instruct
191
+ ```
192
+
193
+ For Hugging Face support, we recommend using transformers or TGI, but a similar command works.
194
+
195
+ ## Hardware and Software
196
+
197
+ **Training Factors** We used custom training libraries, Meta's Research SuperCluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute.
198
+
199
+ **Carbon Footprint Pretraining utilized a cumulative** 7.7M GPU hours of computation on hardware of type H100-80GB (TDP of 700W). Estimated total emissions were 2290 tCO2eq, 100% of which were offset by Meta’s sustainability program.
200
+
201
+
202
+ <table>
203
+ <tr>
204
+ <td>
205
+ </td>
206
+ <td><strong>Time (GPU hours)</strong>
207
+ </td>
208
+ <td><strong>Power Consumption (W)</strong>
209
+ </td>
210
+ <td><strong>Carbon Emitted(tCO2eq)</strong>
211
+ </td>
212
+ </tr>
213
+ <tr>
214
+ <td>Llama 3 8B
215
+ </td>
216
+ <td>1.3M
217
+ </td>
218
+ <td>700
219
+ </td>
220
+ <td>390
221
+ </td>
222
+ </tr>
223
+ <tr>
224
+ <td>Llama 3 70B
225
+ </td>
226
+ <td>6.4M
227
+ </td>
228
+ <td>700
229
+ </td>
230
+ <td>1900
231
+ </td>
232
+ </tr>
233
+ <tr>
234
+ <td>Total
235
+ </td>
236
+ <td>7.7M
237
+ </td>
238
+ <td>
239
+ </td>
240
+ <td>2290
241
+ </td>
242
+ </tr>
243
+ </table>
244
+
245
+
246
+
247
+ **CO2 emissions during pre-training**. 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.
248
+
249
+
250
+ ## Training Data
251
+
252
+ **Overview** Llama 3 was pretrained on over 15 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over 10M human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data.
253
+
254
+ **Data Freshness** The pretraining data has a cutoff of March 2023 for the 7B and December 2023 for the 70B models respectively.
255
+
256
+
257
+ ## Benchmarks
258
+
259
+ In this section, we report the results for Llama 3 models on standard automatic benchmarks. For all the evaluations, we use our internal evaluations library. For details on the methodology see [here](https://github.com/meta-llama/llama3/blob/main/eval_methodology.md).
260
+
261
+
262
+ ### Base pretrained models
263
+
264
+
265
+ <table>
266
+ <tr>
267
+ <td><strong>Category</strong>
268
+ </td>
269
+ <td><strong>Benchmark</strong>
270
+ </td>
271
+ <td><strong>Llama 3 8B</strong>
272
+ </td>
273
+ <td><strong>Llama2 7B</strong>
274
+ </td>
275
+ <td><strong>Llama2 13B</strong>
276
+ </td>
277
+ <td><strong>Llama 3 70B</strong>
278
+ </td>
279
+ <td><strong>Llama2 70B</strong>
280
+ </td>
281
+ </tr>
282
+ <tr>
283
+ <td rowspan="6" >General
284
+ </td>
285
+ <td>MMLU (5-shot)
286
+ </td>
287
+ <td>66.6
288
+ </td>
289
+ <td>45.7
290
+ </td>
291
+ <td>53.8
292
+ </td>
293
+ <td>79.5
294
+ </td>
295
+ <td>69.7
296
+ </td>
297
+ </tr>
298
+ <tr>
299
+ <td>AGIEval English (3-5 shot)
300
+ </td>
301
+ <td>45.9
302
+ </td>
303
+ <td>28.8
304
+ </td>
305
+ <td>38.7
306
+ </td>
307
+ <td>63.0
308
+ </td>
309
+ <td>54.8
310
+ </td>
311
+ </tr>
312
+ <tr>
313
+ <td>CommonSenseQA (7-shot)
314
+ </td>
315
+ <td>72.6
316
+ </td>
317
+ <td>57.6
318
+ </td>
319
+ <td>67.6
320
+ </td>
321
+ <td>83.8
322
+ </td>
323
+ <td>78.7
324
+ </td>
325
+ </tr>
326
+ <tr>
327
+ <td>Winogrande (5-shot)
328
+ </td>
329
+ <td>76.1
330
+ </td>
331
+ <td>73.3
332
+ </td>
333
+ <td>75.4
334
+ </td>
335
+ <td>83.1
336
+ </td>
337
+ <td>81.8
338
+ </td>
339
+ </tr>
340
+ <tr>
341
+ <td>BIG-Bench Hard (3-shot, CoT)
342
+ </td>
343
+ <td>61.1
344
+ </td>
345
+ <td>38.1
346
+ </td>
347
+ <td>47.0
348
+ </td>
349
+ <td>81.3
350
+ </td>
351
+ <td>65.7
352
+ </td>
353
+ </tr>
354
+ <tr>
355
+ <td>ARC-Challenge (25-shot)
356
+ </td>
357
+ <td>78.6
358
+ </td>
359
+ <td>53.7
360
+ </td>
361
+ <td>67.6
362
+ </td>
363
+ <td>93.0
364
+ </td>
365
+ <td>85.3
366
+ </td>
367
+ </tr>
368
+ <tr>
369
+ <td>Knowledge reasoning
370
+ </td>
371
+ <td>TriviaQA-Wiki (5-shot)
372
+ </td>
373
+ <td>78.5
374
+ </td>
375
+ <td>72.1
376
+ </td>
377
+ <td>79.6
378
+ </td>
379
+ <td>89.7
380
+ </td>
381
+ <td>87.5
382
+ </td>
383
+ </tr>
384
+ <tr>
385
+ <td rowspan="4" >Reading comprehension
386
+ </td>
387
+ <td>SQuAD (1-shot)
388
+ </td>
389
+ <td>76.4
390
+ </td>
391
+ <td>72.2
392
+ </td>
393
+ <td>72.1
394
+ </td>
395
+ <td>85.6
396
+ </td>
397
+ <td>82.6
398
+ </td>
399
+ </tr>
400
+ <tr>
401
+ <td>QuAC (1-shot, F1)
402
+ </td>
403
+ <td>44.4
404
+ </td>
405
+ <td>39.6
406
+ </td>
407
+ <td>44.9
408
+ </td>
409
+ <td>51.1
410
+ </td>
411
+ <td>49.4
412
+ </td>
413
+ </tr>
414
+ <tr>
415
+ <td>BoolQ (0-shot)
416
+ </td>
417
+ <td>75.7
418
+ </td>
419
+ <td>65.5
420
+ </td>
421
+ <td>66.9
422
+ </td>
423
+ <td>79.0
424
+ </td>
425
+ <td>73.1
426
+ </td>
427
+ </tr>
428
+ <tr>
429
+ <td>DROP (3-shot, F1)
430
+ </td>
431
+ <td>58.4
432
+ </td>
433
+ <td>37.9
434
+ </td>
435
+ <td>49.8
436
+ </td>
437
+ <td>79.7
438
+ </td>
439
+ <td>70.2
440
+ </td>
441
+ </tr>
442
+ </table>
443
+
444
+
445
+
446
+ ### Instruction tuned models
447
+
448
+
449
+ <table>
450
+ <tr>
451
+ <td><strong>Benchmark</strong>
452
+ </td>
453
+ <td><strong>Llama 3 8B</strong>
454
+ </td>
455
+ <td><strong>Llama 2 7B</strong>
456
+ </td>
457
+ <td><strong>Llama 2 13B</strong>
458
+ </td>
459
+ <td><strong>Llama 3 70B</strong>
460
+ </td>
461
+ <td><strong>Llama 2 70B</strong>
462
+ </td>
463
+ </tr>
464
+ <tr>
465
+ <td>MMLU (5-shot)
466
+ </td>
467
+ <td>68.4
468
+ </td>
469
+ <td>34.1
470
+ </td>
471
+ <td>47.8
472
+ </td>
473
+ <td>82.0
474
+ </td>
475
+ <td>52.9
476
+ </td>
477
+ </tr>
478
+ <tr>
479
+ <td>GPQA (0-shot)
480
+ </td>
481
+ <td>34.2
482
+ </td>
483
+ <td>21.7
484
+ </td>
485
+ <td>22.3
486
+ </td>
487
+ <td>39.5
488
+ </td>
489
+ <td>21.0
490
+ </td>
491
+ </tr>
492
+ <tr>
493
+ <td>HumanEval (0-shot)
494
+ </td>
495
+ <td>62.2
496
+ </td>
497
+ <td>7.9
498
+ </td>
499
+ <td>14.0
500
+ </td>
501
+ <td>81.7
502
+ </td>
503
+ <td>25.6
504
+ </td>
505
+ </tr>
506
+ <tr>
507
+ <td>GSM-8K (8-shot, CoT)
508
+ </td>
509
+ <td>79.6
510
+ </td>
511
+ <td>25.7
512
+ </td>
513
+ <td>77.4
514
+ </td>
515
+ <td>93.0
516
+ </td>
517
+ <td>57.5
518
+ </td>
519
+ </tr>
520
+ <tr>
521
+ <td>MATH (4-shot, CoT)
522
+ </td>
523
+ <td>30.0
524
+ </td>
525
+ <td>3.8
526
+ </td>
527
+ <td>6.7
528
+ </td>
529
+ <td>50.4
530
+ </td>
531
+ <td>11.6
532
+ </td>
533
+ </tr>
534
+ </table>
535
+
536
+
537
+
538
+ ### Responsibility & Safety
539
+
540
+ We believe that an open approach to AI leads to better, safer products, faster innovation, and a bigger overall market. We are committed to Responsible AI development and took a series of steps to limit misuse and harm and support the open source community.
541
+
542
+ Foundation models are widely capable technologies that are built to be used for a diverse range of applications. They are not designed to meet every developer preference on safety levels for all use cases, out-of-the-box, as those by their nature will differ across different applications.
543
+
544
+ Rather, responsible LLM-application deployment is achieved by implementing a series of safety best practices throughout the development of such applications, from the model pre-training, fine-tuning and the deployment of systems composed of safeguards to tailor the safety needs specifically to the use case and audience.
545
+
546
+
547
+ As part of the Llama 3 release, we updated our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide/) to outline the steps and best practices for developers to implement model and system level safety for their application. We also provide a set of resources including [Meta Llama Guard 2](https://llama.meta.com/purple-llama/) and [Code Shield](https://llama.meta.com/purple-llama/) safeguards. These tools have proven to drastically reduce residual risks of LLM Systems, while maintaining a high level of helpfulness. We encourage developers to tune and deploy these safeguards according to their needs and we provide a [reference implementation](https://github.com/meta-llama/llama-recipes/tree/main/recipes/responsible_ai) to get you started.
548
+
549
+
550
+ #### Llama 3-Instruct
551
+
552
+ As outlined in the Responsible Use Guide, some trade-off between model helpfulness and model alignment is likely unavoidable. Developers should exercise discretion about how to weigh the benefits of alignment and helpfulness for their specific use case and audience. Developers should be mindful of residual risks when using Llama models and leverage additional safety tools as needed to reach the right safety bar for their use case.
553
+
554
+ <span style="text-decoration:underline;">Safety</span>
555
+
556
+ For our instruction tuned model, we conducted extensive red teaming exercises, performed adversarial evaluations and implemented safety mitigations techniques to lower residual risks. As with any Large Language Model, residual risks will likely remain and we recommend that developers assess these risks in the context of their use case. In parallel, we are working with the community to make AI safety benchmark standards transparent, rigorous and interpretable.
557
+
558
+ <span style="text-decoration:underline;">Refusals</span>
559
+
560
+ In addition to residual risks, we put a great emphasis on model refusals to benign prompts. Over-refusing not only can impact the user experience but could even be harmful in certain contexts as well. We’ve heard the feedback from the developer community and improved our fine tuning to ensure that Llama 3 is significantly less likely to falsely refuse to answer prompts than Llama 2.
561
+
562
+ We built internal benchmarks and developed mitigations to limit false refusals making Llama 3 our most helpful model to date.
563
+
564
+
565
+ #### Responsible release
566
+
567
+ In addition to responsible use considerations outlined above, we followed a rigorous process that requires us to take extra measures against misuse and critical risks before we make our release decision.
568
+
569
+ Misuse
570
+
571
+ If you access or use Llama 3, you agree to the Acceptable Use Policy. The most recent copy of this policy can be found at [https://llama.meta.com/llama3/use-policy/](https://llama.meta.com/llama3/use-policy/).
572
+
573
+
574
+ #### Critical risks
575
+
576
+ <span style="text-decoration:underline;">CBRNE</span> (Chemical, Biological, Radiological, Nuclear, and high yield Explosives)
577
+
578
+ We have conducted a two fold assessment of the safety of the model in this area:
579
+
580
+
581
+
582
+ * Iterative testing during model training to assess the safety of responses related to CBRNE threats and other adversarial risks.
583
+ * Involving external CBRNE experts to conduct an uplift test assessing the ability of the model to accurately provide expert knowledge and reduce barriers to potential CBRNE misuse, by reference to what can be achieved using web search (without the model).
584
+
585
+
586
+ ### <span style="text-decoration:underline;">Cyber Security </span>
587
+
588
+ We have evaluated Llama 3 with CyberSecEval, Meta’s cybersecurity safety eval suite, measuring Llama 3’s propensity to suggest insecure code when used as a coding assistant, and Llama 3’s propensity to comply with requests to help carry out cyber attacks, where attacks are defined by the industry standard MITRE ATT&CK cyber attack ontology. On our insecure coding and cyber attacker helpfulness tests, Llama 3 behaved in the same range or safer than models of [equivalent coding capability](https://huggingface.co/spaces/facebook/CyberSecEval).
589
+
590
+
591
+ ### <span style="text-decoration:underline;">Child Safety</span>
592
+
593
+ Child Safety risk assessments were conducted using a team of experts, to assess the model’s capability to produce outputs that could result in Child Safety risks and inform on any necessary and appropriate risk mitigations via fine tuning. We leveraged those expert red teaming sessions to expand the coverage of our evaluation benchmarks through Llama 3 model development. For Llama 3, we conducted new in-depth sessions using objective based methodologies to assess the model risks along multiple attack vectors. We also partnered with content specialists to perform red teaming exercises assessing potentially violating content while taking account of market specific nuances or experiences.
594
+
595
+
596
+ ### Community
597
+
598
+ Generative AI safety requires expertise and tooling, and we believe in the strength of the open community to accelerate its progress. We are active members of open consortiums, including the AI Alliance, Partnership in AI and MLCommons, actively contributing to safety standardization and transparency. We encourage the community to adopt taxonomies like the MLCommons Proof of Concept evaluation to facilitate collaboration and transparency on safety and content evaluations. Our Purple Llama tools are open sourced for the community to use and widely distributed across ecosystem partners including cloud service providers. We encourage community contributions to our [Github repository](https://github.com/meta-llama/PurpleLlama).
599
+
600
+ Finally, we put in place a set of resources including an [output reporting mechanism](https://developers.facebook.com/llama_output_feedback) and [bug bounty program](https://www.facebook.com/whitehat) to continuously improve the Llama technology with the help of the community.
601
+
602
+
603
+ ## Ethical Considerations and Limitations
604
+
605
+ The core values of Llama 3 are openness, inclusivity and helpfulness. It is meant to serve everyone, and to work for a wide range of use cases. It is thus designed to be accessible to people across many different backgrounds, experiences and perspectives. Llama 3 addresses users and their needs as they are, without insertion unnecessary judgment or normativity, while reflecting the understanding that even content that may appear problematic in some cases can serve valuable purposes in others. It respects the dignity and autonomy of all users, especially in terms of the values of free thought and expression that power innovation and progress.
606
+
607
+ But Llama 3 is a new technology, and like any new technology, there are risks associated with its 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 3’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 3 models, developers should perform safety testing and tuning tailored to their specific applications of the model. As outlined in the Responsible Use Guide, we recommend incorporating [Purple Llama](https://github.com/facebookresearch/PurpleLlama) solutions into your workflows and specifically [Llama Guard](https://ai.meta.com/research/publications/llama-guard-llm-based-input-output-safeguard-for-human-ai-conversations/) which provides a base model to filter input and output prompts to layer system-level safety on top of model-level safety.
608
+
609
+ Please see the Responsible Use Guide available at [http://llama.meta.com/responsible-use-guide](http://llama.meta.com/responsible-use-guide)
610
+
611
+
612
+ ## Citation instructions
613
+
614
+ @article{llama3modelcard,
615
+
616
+ title={Llama 3 Model Card},
617
+
618
+ author={AI@Meta},
619
+
620
+ year={2024},
621
+
622
+ url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
623
+
624
+ }
625
+
626
+ ## Contributors
627
+
628
+ Aaditya Singh; Aaron Grattafiori; Abhimanyu Dubey; Abhinav Jauhri; Abhinav Pandey; Abhishek Kadian; Adam Kelsey; Adi Gangidi; Ahmad Al-Dahle; Ahuva Goldstand; Aiesha Letman; Ajay Menon; Akhil Mathur; Alan Schelten; Alex Vaughan; Amy Yang; Andrei Lupu; Andres Alvarado; Andrew Gallagher; Andrew Gu; Andrew Ho; Andrew Poulton; Andrew Ryan; Angela Fan; Ankit Ramchandani; Anthony Hartshorn; Archi Mitra; Archie Sravankumar; Artem Korenev; Arun Rao; Ashley Gabriel; Ashwin Bharambe; Assaf Eisenman; Aston Zhang; Aurelien Rodriguez; Austen Gregerson; Ava Spataru; Baptiste Roziere; Ben Maurer; Benjamin Leonhardi; Bernie Huang; Bhargavi Paranjape; Bing Liu; Binh Tang; Bobbie Chern; Brani Stojkovic; Brian Fuller; Catalina Mejia Arenas; Chao Zhou; Charlotte Caucheteux; Chaya Nayak; Ching-Hsiang Chu; Chloe Bi; Chris Cai; Chris Cox; Chris Marra; Chris McConnell; Christian Keller; Christoph Feichtenhofer; Christophe Touret; Chunyang Wu; Corinne Wong; Cristian Canton Ferrer; Damien Allonsius; Daniel Kreymer; Daniel Haziza; Daniel Li; Danielle Pintz; Danny Livshits; Danny Wyatt; David Adkins; David Esiobu; David Xu; Davide Testuggine; Delia David; Devi Parikh; Dhruv Choudhary; Dhruv Mahajan; Diana Liskovich; Diego Garcia-Olano; Diego Perino; Dieuwke Hupkes; Dingkang Wang; Dustin Holland; Egor Lakomkin; Elina Lobanova; Xiaoqing Ellen Tan; Emily Dinan; Eric Smith; Erik Brinkman; Esteban Arcaute; Filip Radenovic; Firat Ozgenel; Francesco Caggioni; Frank Seide; Frank Zhang; Gabriel Synnaeve; Gabriella Schwarz; Gabrielle Lee; Gada Badeer; Georgia Anderson; Graeme Nail; Gregoire Mialon; Guan Pang; Guillem Cucurell; Hailey Nguyen; Hannah Korevaar; Hannah Wang; Haroun Habeeb; Harrison Rudolph; Henry Aspegren; Hu Xu; Hugo Touvron; Iga Kozlowska; Igor Molybog; Igor Tufanov; Iliyan Zarov; Imanol Arrieta Ibarra; Irina-Elena Veliche; Isabel Kloumann; Ishan Misra; Ivan Evtimov; Jacob Xu; Jade Copet; Jake Weissman; Jan Geffert; Jana Vranes; Japhet Asher; Jason Park; Jay Mahadeokar; Jean-Baptiste Gaya; Jeet Shah; Jelmer van der Linde; Jennifer Chan; Jenny Hong; Jenya Lee; Jeremy Fu; Jeremy Teboul; Jianfeng Chi; Jianyu Huang; Jie Wang; Jiecao Yu; Joanna Bitton; Joe Spisak; Joelle Pineau; Jon Carvill; Jongsoo Park; Joseph Rocca; Joshua Johnstun; Junteng Jia; Kalyan Vasuden Alwala; Kam Hou U; Kate Plawiak; Kartikeya Upasani; Kaushik Veeraraghavan; Ke Li; Kenneth Heafield; Kevin Stone; Khalid El-Arini; Krithika Iyer; Kshitiz Malik; Kuenley Chiu; Kunal Bhalla; Kyle Huang; Lakshya Garg; Lauren Rantala-Yeary; Laurens van der Maaten; Lawrence Chen; Leandro Silva; Lee Bell; Lei Zhang; Liang Tan; Louis Martin; Lovish Madaan; Luca Wehrstedt; Lukas Blecher; Luke de Oliveira; Madeline Muzzi; Madian Khabsa; Manav Avlani; Mannat Singh; Manohar Paluri; Mark Zuckerberg; Marcin Kardas; Martynas Mankus; Mathew Oldham; Mathieu Rita; Matthew Lennie; Maya Pavlova; Meghan Keneally; Melanie Kambadur; Mihir Patel; Mikayel Samvelyan; Mike Clark; Mike Lewis; Min Si; Mitesh Kumar Singh; Mo Metanat; Mona Hassan; Naman Goyal; Narjes Torabi; Nicolas Usunier; Nikolay Bashlykov; Nikolay Bogoychev; Niladri Chatterji; Ning Dong; Oliver Aobo Yang; Olivier Duchenne; Onur Celebi; Parth Parekh; Patrick Alrassy; Paul Saab; Pavan Balaji; Pedro Rittner; Pengchuan Zhang; Pengwei Li; Petar Vasic; Peter Weng; Polina Zvyagina; Prajjwal Bhargava; Pratik Dubal; Praveen Krishnan; Punit Singh Koura; Qing He; Rachel Rodriguez; Ragavan Srinivasan; Rahul Mitra; Ramon Calderer; Raymond Li; Robert Stojnic; Roberta Raileanu; Robin Battey; Rocky Wang; Rohit Girdhar; Rohit Patel; Romain Sauvestre; Ronnie Polidoro; Roshan Sumbaly; Ross Taylor; Ruan Silva; Rui Hou; Rui Wang; Russ Howes; Ruty Rinott; Saghar Hosseini; Sai Jayesh Bondu; Samyak Datta; Sanjay Singh; Sara Chugh; Sargun Dhillon; Satadru Pan; Sean Bell; Sergey Edunov; Shaoliang Nie; Sharan Narang; Sharath Raparthy; Shaun Lindsay; Sheng Feng; Sheng Shen; Shenghao Lin; Shiva Shankar; Shruti Bhosale; Shun Zhang; Simon Vandenhende; Sinong Wang; Seohyun Sonia Kim; Soumya Batra; Sten Sootla; Steve Kehoe; Suchin Gururangan; Sumit Gupta; Sunny Virk; Sydney Borodinsky; Tamar Glaser; Tamar Herman; Tamara Best; Tara Fowler; Thomas Georgiou; Thomas Scialom; Tianhe Li; Todor Mihaylov; Tong Xiao; Ujjwal Karn; Vedanuj Goswami; Vibhor Gupta; Vignesh Ramanathan; Viktor Kerkez; Vinay Satish Kumar; Vincent Gonguet; Vish Vogeti; Vlad Poenaru; Vlad Tiberiu Mihailescu; Vladan Petrovic; Vladimir Ivanov; Wei Li; Weiwei Chu; Wenhan Xiong; Wenyin Fu; Wes Bouaziz; Whitney Meers; Will Constable; Xavier Martinet; Xiaojian Wu; Xinbo Gao; Xinfeng Xie; Xuchao Jia; Yaelle Goldschlag; Yann LeCun; Yashesh Gaur; Yasmine Babaei; Ye Qi; Yenda Li; Yi Wen; Yiwen Song; Youngjin Nam; Yuchen Hao; Yuchen Zhang; Yun Wang; Yuning Mao; Yuzi He; Zacharie Delpierre Coudert; Zachary DeVito; Zahra Hankir; Zhaoduo Wen; Zheng Yan; Zhengxing Chen; Zhenyu Yang; Zoe Papakipos
629
+
630
+ ---
imatrix.dat ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6de601a2a16693f6039e6a3662321305e1002d4bebb41d2fa583d0952355a763
3
+ size 24922254