MaziyarPanahi commited on
Commit
b3340de
1 Parent(s): fcd7947

Update README.md (#17)

Browse files

- Update README.md (43468611cd078c616bb8d0a922d3cdbbb6233350)

Files changed (1) hide show
  1. README.md +607 -23
README.md CHANGED
@@ -1,5 +1,13 @@
1
  ---
 
 
 
2
  tags:
 
 
 
 
 
3
  - quantized
4
  - 2-bit
5
  - 3-bit
@@ -7,41 +15,617 @@ tags:
7
  - 5-bit
8
  - 6-bit
9
  - 8-bit
 
10
  - GGUF
11
- - text-generation
12
- - mixtral
13
- - text-generation
14
- model_name: Meta-Llama-3-8B-Instruct-GGUF
15
  base_model: meta-llama/Meta-Llama-3-8B-Instruct
16
  inference: false
17
- model_creator: meta-llama
18
- pipeline_tag: text-generation
19
  quantized_by: MaziyarPanahi
 
20
  ---
21
  # [MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF](https://huggingface.co/MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF)
22
  - Model creator: [meta-llama](https://huggingface.co/meta-llama)
23
  - Original model: [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)
24
 
25
- ## Description
26
- [MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF](https://huggingface.co/MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF) contains GGUF format model files for [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- ### About GGUF
29
 
30
- 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.
31
 
32
- Here is an incomplete list of clients and libraries that are known to support GGUF:
33
 
34
- * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
35
- * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
36
- * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023.
37
- * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
38
- * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
39
- * [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
40
- * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
41
- * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
42
- * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
43
- * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models.
44
 
45
- ## Special thanks
46
 
47
- 🙏 Special thanks to [Georgi Gerganov](https://github.com/ggerganov) and the whole team working on [llama.cpp](https://github.com/ggerganov/llama.cpp/) for making all of this possible.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
 
15
  - 5-bit
16
  - 6-bit
17
  - 8-bit
18
+ - 16-bit
19
  - GGUF
 
 
 
 
20
  base_model: meta-llama/Meta-Llama-3-8B-Instruct
21
  inference: false
22
+ model_creator: MaziyarPanahi
23
+ model_name: Meta-Llama-3-8B-Instruct-GGUF
24
  quantized_by: MaziyarPanahi
25
+ license_name: llama3
26
  ---
27
  # [MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF](https://huggingface.co/MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF)
28
  - Model creator: [meta-llama](https://huggingface.co/meta-llama)
29
  - Original model: [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)
30
 
31
+ The GGUF and quantized models here are based on [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) model
32
+
33
+ ## How to download
34
+ You can download only the quants you need instead of cloning the entire repository as follows:
35
+
36
+ ```
37
+ huggingface-cli download MaziyarPanahi/Meta-Llama-3-8B-Instruct-GGUF --local-dir . --include '*Q2_K*gguf'
38
+ ```
39
+
40
+ ## Load GGUF models
41
+
42
+ You `MUST` follow the prompt template provided by Llama-3:
43
+
44
+
45
+ ```sh
46
+ ./llama.cpp/main -m Meta-Llama-3-8B-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
47
+ ```
48
+
49
+
50
+
51
+
52
+ Original README
53
+
54
+ ---
55
+
56
+ ## Model Details
57
+
58
+ 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.
59
+
60
+ **Model developers** Meta
61
+
62
+ **Variations** Llama 3 comes in two sizes — 8B and 70B parameters — in pre-trained and instruction tuned variants.
63
+
64
+ **Input** Models input text only.
65
+
66
+ **Output** Models generate text and code only.
67
+
68
+ **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.
69
+
70
+
71
+ <table>
72
+ <tr>
73
+ <td>
74
+ </td>
75
+ <td><strong>Training Data</strong>
76
+ </td>
77
+ <td><strong>Params</strong>
78
+ </td>
79
+ <td><strong>Context length</strong>
80
+ </td>
81
+ <td><strong>GQA</strong>
82
+ </td>
83
+ <td><strong>Token count</strong>
84
+ </td>
85
+ <td><strong>Knowledge cutoff</strong>
86
+ </td>
87
+ </tr>
88
+ <tr>
89
+ <td rowspan="2" >Llama 3
90
+ </td>
91
+ <td rowspan="2" >A new mix of publicly available online data.
92
+ </td>
93
+ <td>8B
94
+ </td>
95
+ <td>8k
96
+ </td>
97
+ <td>Yes
98
+ </td>
99
+ <td rowspan="2" >15T+
100
+ </td>
101
+ <td>March, 2023
102
+ </td>
103
+ </tr>
104
+ <tr>
105
+ <td>70B
106
+ </td>
107
+ <td>8k
108
+ </td>
109
+ <td>Yes
110
+ </td>
111
+ <td>December, 2023
112
+ </td>
113
+ </tr>
114
+ </table>
115
+
116
+
117
+ **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.
118
+
119
+ **Model Release Date** April 18, 2024.
120
+
121
+ **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.
122
+
123
+ **License** A custom commercial license is available at: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
124
+
125
+ 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).
126
+
127
+
128
+ ## Intended Use
129
+
130
+ **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.
131
+
132
+ **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**.
133
+
134
+ **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.
135
+
136
+ ## How to use
137
+
138
+ This repository contains two versions of Meta-Llama-3-70B-Instruct, for use with transformers and with the original `llama3` codebase.
139
+
140
+ ### Use with transformers
141
+
142
+ See the snippet below for usage with Transformers:
143
+
144
+ ```python
145
+ import transformers
146
+ import torch
147
+
148
+ model_id = "meta-llama/Meta-Llama-3-70B-Instruct"
149
+
150
+ pipeline = transformers.pipeline(
151
+ "text-generation",
152
+ model=model_id,
153
+ model_kwargs={"torch_dtype": torch.bfloat16},
154
+ device="cuda",
155
+ )
156
+
157
+ messages = [
158
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
159
+ {"role": "user", "content": "Who are you?"},
160
+ ]
161
+
162
+ prompt = pipeline.tokenizer.apply_chat_template(
163
+ messages,
164
+ tokenize=False,
165
+ add_generation_prompt=True
166
+ )
167
+
168
+ terminators = [
169
+ tokenizer.eos_token_id,
170
+ tokenizer.convert_tokens_to_ids("<|eot_id|>")
171
+ ]
172
+
173
+ outputs = pipeline(
174
+ prompt,
175
+ max_new_tokens=256,
176
+ eos_token_id=terminators,
177
+ do_sample=True,
178
+ temperature=0.6,
179
+ top_p=0.9,
180
+ )
181
+ print(outputs[0]["generated_text"][len(prompt):])
182
+ ```
183
+
184
+ ### Use with `llama3`
185
+
186
+ Please, follow the instructions in the [repository](https://github.com/meta-llama/llama3).
187
+
188
+ To download Original checkpoints, see the example command below leveraging `huggingface-cli`:
189
+
190
+ ```
191
+ huggingface-cli download meta-llama/Meta-Llama-3-70B-Instruct --include "original/*" --local-dir Meta-Llama-3-70B-Instruct
192
+ ```
193
+
194
+ For Hugging Face support, we recommend using transformers or TGI, but a similar command works.
195
+
196
+ ## Hardware and Software
197
+
198
+ **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.
199
+
200
+ **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.
201
+
202
+
203
+ <table>
204
+ <tr>
205
+ <td>
206
+ </td>
207
+ <td><strong>Time (GPU hours)</strong>
208
+ </td>
209
+ <td><strong>Power Consumption (W)</strong>
210
+ </td>
211
+ <td><strong>Carbon Emitted(tCO2eq)</strong>
212
+ </td>
213
+ </tr>
214
+ <tr>
215
+ <td>Llama 3 8B
216
+ </td>
217
+ <td>1.3M
218
+ </td>
219
+ <td>700
220
+ </td>
221
+ <td>390
222
+ </td>
223
+ </tr>
224
+ <tr>
225
+ <td>Llama 3 70B
226
+ </td>
227
+ <td>6.4M
228
+ </td>
229
+ <td>700
230
+ </td>
231
+ <td>1900
232
+ </td>
233
+ </tr>
234
+ <tr>
235
+ <td>Total
236
+ </td>
237
+ <td>7.7M
238
+ </td>
239
+ <td>
240
+ </td>
241
+ <td>2290
242
+ </td>
243
+ </tr>
244
+ </table>
245
+
246
+
247
+
248
+ **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.
249
+
250
+
251
+ ## Training Data
252
+
253
+ **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.
254
 
255
+ **Data Freshness** The pretraining data has a cutoff of March 2023 for the 7B and December 2023 for the 70B models respectively.
256
 
 
257
 
258
+ ## Benchmarks
259
 
260
+ 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).
 
 
 
 
 
 
 
 
 
261
 
 
262
 
263
+ ### Base pretrained models
264
+
265
+
266
+ <table>
267
+ <tr>
268
+ <td><strong>Category</strong>
269
+ </td>
270
+ <td><strong>Benchmark</strong>
271
+ </td>
272
+ <td><strong>Llama 3 8B</strong>
273
+ </td>
274
+ <td><strong>Llama2 7B</strong>
275
+ </td>
276
+ <td><strong>Llama2 13B</strong>
277
+ </td>
278
+ <td><strong>Llama 3 70B</strong>
279
+ </td>
280
+ <td><strong>Llama2 70B</strong>
281
+ </td>
282
+ </tr>
283
+ <tr>
284
+ <td rowspan="6" >General
285
+ </td>
286
+ <td>MMLU (5-shot)
287
+ </td>
288
+ <td>66.6
289
+ </td>
290
+ <td>45.7
291
+ </td>
292
+ <td>53.8
293
+ </td>
294
+ <td>79.5
295
+ </td>
296
+ <td>69.7
297
+ </td>
298
+ </tr>
299
+ <tr>
300
+ <td>AGIEval English (3-5 shot)
301
+ </td>
302
+ <td>45.9
303
+ </td>
304
+ <td>28.8
305
+ </td>
306
+ <td>38.7
307
+ </td>
308
+ <td>63.0
309
+ </td>
310
+ <td>54.8
311
+ </td>
312
+ </tr>
313
+ <tr>
314
+ <td>CommonSenseQA (7-shot)
315
+ </td>
316
+ <td>72.6
317
+ </td>
318
+ <td>57.6
319
+ </td>
320
+ <td>67.6
321
+ </td>
322
+ <td>83.8
323
+ </td>
324
+ <td>78.7
325
+ </td>
326
+ </tr>
327
+ <tr>
328
+ <td>Winogrande (5-shot)
329
+ </td>
330
+ <td>76.1
331
+ </td>
332
+ <td>73.3
333
+ </td>
334
+ <td>75.4
335
+ </td>
336
+ <td>83.1
337
+ </td>
338
+ <td>81.8
339
+ </td>
340
+ </tr>
341
+ <tr>
342
+ <td>BIG-Bench Hard (3-shot, CoT)
343
+ </td>
344
+ <td>61.1
345
+ </td>
346
+ <td>38.1
347
+ </td>
348
+ <td>47.0
349
+ </td>
350
+ <td>81.3
351
+ </td>
352
+ <td>65.7
353
+ </td>
354
+ </tr>
355
+ <tr>
356
+ <td>ARC-Challenge (25-shot)
357
+ </td>
358
+ <td>78.6
359
+ </td>
360
+ <td>53.7
361
+ </td>
362
+ <td>67.6
363
+ </td>
364
+ <td>93.0
365
+ </td>
366
+ <td>85.3
367
+ </td>
368
+ </tr>
369
+ <tr>
370
+ <td>Knowledge reasoning
371
+ </td>
372
+ <td>TriviaQA-Wiki (5-shot)
373
+ </td>
374
+ <td>78.5
375
+ </td>
376
+ <td>72.1
377
+ </td>
378
+ <td>79.6
379
+ </td>
380
+ <td>89.7
381
+ </td>
382
+ <td>87.5
383
+ </td>
384
+ </tr>
385
+ <tr>
386
+ <td rowspan="4" >Reading comprehension
387
+ </td>
388
+ <td>SQuAD (1-shot)
389
+ </td>
390
+ <td>76.4
391
+ </td>
392
+ <td>72.2
393
+ </td>
394
+ <td>72.1
395
+ </td>
396
+ <td>85.6
397
+ </td>
398
+ <td>82.6
399
+ </td>
400
+ </tr>
401
+ <tr>
402
+ <td>QuAC (1-shot, F1)
403
+ </td>
404
+ <td>44.4
405
+ </td>
406
+ <td>39.6
407
+ </td>
408
+ <td>44.9
409
+ </td>
410
+ <td>51.1
411
+ </td>
412
+ <td>49.4
413
+ </td>
414
+ </tr>
415
+ <tr>
416
+ <td>BoolQ (0-shot)
417
+ </td>
418
+ <td>75.7
419
+ </td>
420
+ <td>65.5
421
+ </td>
422
+ <td>66.9
423
+ </td>
424
+ <td>79.0
425
+ </td>
426
+ <td>73.1
427
+ </td>
428
+ </tr>
429
+ <tr>
430
+ <td>DROP (3-shot, F1)
431
+ </td>
432
+ <td>58.4
433
+ </td>
434
+ <td>37.9
435
+ </td>
436
+ <td>49.8
437
+ </td>
438
+ <td>79.7
439
+ </td>
440
+ <td>70.2
441
+ </td>
442
+ </tr>
443
+ </table>
444
+
445
+
446
+
447
+ ### Instruction tuned models
448
+
449
+
450
+ <table>
451
+ <tr>
452
+ <td><strong>Benchmark</strong>
453
+ </td>
454
+ <td><strong>Llama 3 8B</strong>
455
+ </td>
456
+ <td><strong>Llama 2 7B</strong>
457
+ </td>
458
+ <td><strong>Llama 2 13B</strong>
459
+ </td>
460
+ <td><strong>Llama 3 70B</strong>
461
+ </td>
462
+ <td><strong>Llama 2 70B</strong>
463
+ </td>
464
+ </tr>
465
+ <tr>
466
+ <td>MMLU (5-shot)
467
+ </td>
468
+ <td>68.4
469
+ </td>
470
+ <td>34.1
471
+ </td>
472
+ <td>47.8
473
+ </td>
474
+ <td>82.0
475
+ </td>
476
+ <td>52.9
477
+ </td>
478
+ </tr>
479
+ <tr>
480
+ <td>GPQA (0-shot)
481
+ </td>
482
+ <td>34.2
483
+ </td>
484
+ <td>21.7
485
+ </td>
486
+ <td>22.3
487
+ </td>
488
+ <td>39.5
489
+ </td>
490
+ <td>21.0
491
+ </td>
492
+ </tr>
493
+ <tr>
494
+ <td>HumanEval (0-shot)
495
+ </td>
496
+ <td>62.2
497
+ </td>
498
+ <td>7.9
499
+ </td>
500
+ <td>14.0
501
+ </td>
502
+ <td>81.7
503
+ </td>
504
+ <td>25.6
505
+ </td>
506
+ </tr>
507
+ <tr>
508
+ <td>GSM-8K (8-shot, CoT)
509
+ </td>
510
+ <td>79.6
511
+ </td>
512
+ <td>25.7
513
+ </td>
514
+ <td>77.4
515
+ </td>
516
+ <td>93.0
517
+ </td>
518
+ <td>57.5
519
+ </td>
520
+ </tr>
521
+ <tr>
522
+ <td>MATH (4-shot, CoT)
523
+ </td>
524
+ <td>30.0
525
+ </td>
526
+ <td>3.8
527
+ </td>
528
+ <td>6.7
529
+ </td>
530
+ <td>50.4
531
+ </td>
532
+ <td>11.6
533
+ </td>
534
+ </tr>
535
+ </table>
536
+
537
+
538
+
539
+ ### Responsibility & Safety
540
+
541
+ 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.
542
+
543
+ 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.
544
+
545
+ 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.
546
+
547
+
548
+ 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.
549
+
550
+
551
+ #### Llama 3-Instruct
552
+
553
+ 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.
554
+
555
+ <span style="text-decoration:underline;">Safety</span>
556
+
557
+ 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.
558
+
559
+ <span style="text-decoration:underline;">Refusals</span>
560
+
561
+ 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.
562
+
563
+ We built internal benchmarks and developed mitigations to limit false refusals making Llama 3 our most helpful model to date.
564
+
565
+
566
+ #### Responsible release
567
+
568
+ 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.
569
+
570
+ Misuse
571
+
572
+ 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/).
573
+
574
+
575
+ #### Critical risks
576
+
577
+ <span style="text-decoration:underline;">CBRNE</span> (Chemical, Biological, Radiological, Nuclear, and high yield Explosives)
578
+
579
+ We have conducted a two fold assessment of the safety of the model in this area:
580
+
581
+
582
+
583
+ * Iterative testing during model training to assess the safety of responses related to CBRNE threats and other adversarial risks.
584
+ * 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).
585
+
586
+
587
+ ### <span style="text-decoration:underline;">Cyber Security </span>
588
+
589
+ 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).
590
+
591
+
592
+ ### <span style="text-decoration:underline;">Child Safety</span>
593
+
594
+ 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.
595
+
596
+
597
+ ### Community
598
+
599
+ 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).
600
+
601
+ 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.
602
+
603
+
604
+ ## Ethical Considerations and Limitations
605
+
606
+ 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.
607
+
608
+ 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.
609
+
610
+ Please see the Responsible Use Guide available at [http://llama.meta.com/responsible-use-guide](http://llama.meta.com/responsible-use-guide)
611
+
612
+
613
+ ## Citation instructions
614
+
615
+ @article{llama3modelcard,
616
+
617
+ title={Llama 3 Model Card},
618
+
619
+ author={AI@Meta},
620
+
621
+ year={2024},
622
+
623
+ url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
624
+
625
+ }
626
+
627
+ ## Contributors
628
+
629
+ 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
630
+
631
+ ---