LlamaFinetuneBase commited on
Commit
4769a5f
1 Parent(s): 5353076

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +1209 -0
README.md ADDED
@@ -0,0 +1,1209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - de
5
+ - fr
6
+ - it
7
+ - pt
8
+ - hi
9
+ - es
10
+ - th
11
+ pipeline_tag: text-generation
12
+ tags:
13
+ - facebook
14
+ - meta
15
+ - pytorch
16
+ - llama
17
+ - llama-3
18
+ license: llama3.1
19
+ extra_gated_prompt: >-
20
+ ### LLAMA 3.1 COMMUNITY LICENSE AGREEMENT
21
+
22
+ Llama 3.1 Version Release Date: July 23, 2024
23
+
24
+ "Agreement" means the terms and conditions for use, reproduction, distribution and modification of the
25
+ Llama Materials set forth herein.
26
+
27
+ "Documentation" means the specifications, manuals and documentation accompanying Llama 3.1
28
+ distributed by Meta at https://llama.meta.com/doc/overview.
29
+
30
+ "Licensee" or "you" means you, or your employer or any other person or entity (if you are entering into
31
+ this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or
32
+ regulations to provide legal consent and that has legal authority to bind your employer or such other
33
+ person or entity if you are entering in this Agreement on their behalf.
34
+
35
+ "Llama 3.1" means the foundational large language models and software and algorithms, including
36
+ machine-learning model code, trained model weights, inference-enabling code, training-enabling code,
37
+ fine-tuning enabling code and other elements of the foregoing distributed by Meta at
38
+ https://llama.meta.com/llama-downloads.
39
+
40
+ "Llama Materials" means, collectively, Meta’s proprietary Llama 3.1 and Documentation (and any
41
+ portion thereof) made available under this Agreement.
42
+
43
+ "Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your
44
+ principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located
45
+ outside of the EEA or Switzerland).
46
+
47
+ 1. License Rights and Redistribution.
48
+
49
+ a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free
50
+ limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Llama
51
+ Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the
52
+ Llama Materials.
53
+
54
+ b. Redistribution and Use.
55
+
56
+ i. If you distribute or make available the Llama Materials (or any derivative works
57
+ thereof), or a product or service (including another AI model) that contains any of them, you shall (A)
58
+ provide a copy of this Agreement with any such Llama Materials; and (B) prominently display “Built with
59
+ Llama” on a related website, user interface, blogpost, about page, or product documentation. If you use
60
+ the Llama Materials or any outputs or results of the Llama Materials to create, train, fine tune, or
61
+ otherwise improve an AI model, which is distributed or made available, you shall also include “Llama” at
62
+ the beginning of any such AI model name.
63
+
64
+ ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part
65
+ of an integrated end user product, then Section 2 of this Agreement will not apply to you.
66
+
67
+ iii. You must retain in all copies of the Llama Materials that you distribute the following
68
+ attribution notice within a “Notice” text file distributed as a part of such copies: “Llama 3.1 is
69
+ licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights
70
+ Reserved.”
71
+
72
+ iv. Your use of the Llama Materials must comply with applicable laws and regulations
73
+ (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Llama
74
+ Materials (available at https://llama.meta.com/llama3_1/use-policy), which is hereby incorporated by
75
+ reference into this Agreement.
76
+
77
+ 2. Additional Commercial Terms. If, on the Llama 3.1 version release date, the monthly active users
78
+ of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700
79
+ million monthly active users in the preceding calendar month, you must request a license from Meta,
80
+ which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the
81
+ rights under this Agreement unless or until Meta otherwise expressly grants you such rights.
82
+
83
+ 3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY
84
+ OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF
85
+ ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,
86
+ INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,
87
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR
88
+ DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND
89
+ ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND
90
+ RESULTS.
91
+
92
+ 4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF
93
+ LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING
94
+ OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL,
95
+ INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED
96
+ OF THE POSSIBILITY OF ANY OF THE FOREGOING.
97
+
98
+ 5. Intellectual Property.
99
+
100
+ a. No trademark licenses are granted under this Agreement, and in connection with the Llama
101
+ Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other
102
+ or any of its affiliates, except as required for reasonable and customary use in describing and
103
+ redistributing the Llama Materials or as set forth in this Section 5(a). Meta hereby grants you a license to
104
+ use “Llama” (the “Mark”) solely as required to comply with the last sentence of Section 1.b.i. You will
105
+ comply with Meta’s brand guidelines (currently accessible at
106
+ https://about.meta.com/brand/resources/meta/company-brand/ ). All goodwill arising out of your use
107
+ of the Mark will inure to the benefit of Meta.
108
+
109
+ b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for Meta, with
110
+ respect to any derivative works and modifications of the Llama Materials that are made by you, as
111
+ between you and Meta, you are and will be the owner of such derivative works and modifications.
112
+
113
+ c. If you institute litigation or other proceedings against Meta or any entity (including a
114
+ cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or Llama 3.1 outputs or
115
+ results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other
116
+ rights owned or licensable by you, then any licenses granted to you under this Agreement shall
117
+ terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold
118
+ harmless Meta from and against any claim by any third party arising out of or related to your use or
119
+ distribution of the Llama Materials.
120
+
121
+ 6. Term and Termination. The term of this Agreement will commence upon your acceptance of this
122
+ Agreement or access to the Llama Materials and will continue in full force and effect until terminated in
123
+ accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in
124
+ breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete
125
+ and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of this
126
+ Agreement.
127
+
128
+ 7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of
129
+ the State of California without regard to choice of law principles, and the UN Convention on Contracts
130
+ for the International Sale of Goods does not apply to this Agreement. The courts of California shall have
131
+ exclusive jurisdiction of any dispute arising out of this Agreement.
132
+
133
+ ### Llama 3.1 Acceptable Use Policy
134
+
135
+ Meta is committed to promoting safe and fair use of its tools and features, including Llama 3.1. If you
136
+ access or use Llama 3.1, you agree to this Acceptable Use Policy (“Policy”). The most recent copy of
137
+ this policy can be found at [https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)
138
+
139
+ #### Prohibited Uses
140
+
141
+ We want everyone to use Llama 3.1 safely and responsibly. You agree you will not use, or allow
142
+ others to use, Llama 3.1 to:
143
+ 1. Violate the law or others’ rights, including to:
144
+ 1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
145
+ 1. Violence or terrorism
146
+ 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
147
+ 3. Human trafficking, exploitation, and sexual violence
148
+ 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.
149
+ 5. Sexual solicitation
150
+ 6. Any other criminal activity
151
+ 3. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
152
+ 4. 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
153
+ 5. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
154
+ 6. 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
155
+ 7. 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 Materials
156
+ 8. 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
157
+ 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 3.1 related to the following:
158
+ 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
159
+ 2. Guns and illegal weapons (including weapon development)
160
+ 3. Illegal drugs and regulated/controlled substances
161
+ 4. Operation of critical infrastructure, transportation technologies, or heavy machinery
162
+ 5. Self-harm or harm to others, including suicide, cutting, and eating disorders
163
+ 6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
164
+ 3. Intentionally deceive or mislead others, including use of Llama 3.1 related to the following:
165
+ 1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
166
+ 2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
167
+ 3. Generating, promoting, or further distributing spam
168
+ 4. Impersonating another individual without consent, authorization, or legal right
169
+ 5. Representing that the use of Llama 3.1 or outputs are human-generated
170
+ 6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
171
+ 4. Fail to appropriately disclose to end users any known dangers of your AI system
172
+
173
+ Please report any violation of this Policy, software “bug,” or other problems that could lead to a violation
174
+ of this Policy through one of the following means:
175
+ * Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)
176
+ * Reporting risky content generated by the model:
177
+ developers.facebook.com/llama_output_feedback
178
+ * Reporting bugs and security concerns: facebook.com/whitehat/info
179
+ * Reporting violations of the Acceptable Use Policy or unlicensed uses of Meta Llama 3: [email protected]
180
+ extra_gated_fields:
181
+ First Name: text
182
+ Last Name: text
183
+ Date of birth: date_picker
184
+ Country: country
185
+ Affiliation: text
186
+ Job title:
187
+ type: select
188
+ options:
189
+ - Student
190
+ - Research Graduate
191
+ - AI researcher
192
+ - AI developer/engineer
193
+ - Reporter
194
+ - Other
195
+ geo: ip_location
196
+ By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy: checkbox
197
+ extra_gated_description: The information you provide will be collected, stored, processed and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/).
198
+ extra_gated_button_content: Submit
199
+ ---
200
+
201
+ ## Model Information
202
+
203
+ The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes (text in/text out). The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.
204
+
205
+ **Model developer**: Meta
206
+
207
+ **Model Architecture:** Llama 3.1 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.
208
+
209
+
210
+ <table>
211
+ <tr>
212
+ <td>
213
+ </td>
214
+ <td><strong>Training Data</strong>
215
+ </td>
216
+ <td><strong>Params</strong>
217
+ </td>
218
+ <td><strong>Input modalities</strong>
219
+ </td>
220
+ <td><strong>Output modalities</strong>
221
+ </td>
222
+ <td><strong>Context length</strong>
223
+ </td>
224
+ <td><strong>GQA</strong>
225
+ </td>
226
+ <td><strong>Token count</strong>
227
+ </td>
228
+ <td><strong>Knowledge cutoff</strong>
229
+ </td>
230
+ </tr>
231
+ <tr>
232
+ <td rowspan="3" >Llama 3.1 (text only)
233
+ </td>
234
+ <td rowspan="3" >A new mix of publicly available online data.
235
+ </td>
236
+ <td>8B
237
+ </td>
238
+ <td>Multilingual Text
239
+ </td>
240
+ <td>Multilingual Text and code
241
+ </td>
242
+ <td>128k
243
+ </td>
244
+ <td>Yes
245
+ </td>
246
+ <td rowspan="3" >15T+
247
+ </td>
248
+ <td rowspan="3" >December 2023
249
+ </td>
250
+ </tr>
251
+ <tr>
252
+ <td>70B
253
+ </td>
254
+ <td>Multilingual Text
255
+ </td>
256
+ <td>Multilingual Text and code
257
+ </td>
258
+ <td>128k
259
+ </td>
260
+ <td>Yes
261
+ </td>
262
+ </tr>
263
+ <tr>
264
+ <td>405B
265
+ </td>
266
+ <td>Multilingual Text
267
+ </td>
268
+ <td>Multilingual Text and code
269
+ </td>
270
+ <td>128k
271
+ </td>
272
+ <td>Yes
273
+ </td>
274
+ </tr>
275
+ </table>
276
+
277
+
278
+ **Supported languages:** English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai.
279
+
280
+ **Llama 3.1 family of models**. Token counts refer to pretraining data only. All model versions use Grouped-Query Attention (GQA) for improved inference scalability.
281
+
282
+ **Model Release Date:** July 23, 2024.
283
+
284
+ **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.
285
+
286
+ **License:** A custom commercial license, the Llama 3.1 Community License, is available at: [https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE)
287
+
288
+ 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.1 in applications, please go [here](https://github.com/meta-llama/llama-recipes).
289
+
290
+
291
+ ## Intended Use
292
+
293
+ **Intended Use Cases** Llama 3.1 is intended for commercial and research use in multiple languages. Instruction tuned text only models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. The Llama 3.1 model collection also supports the ability to leverage the outputs of its models to improve other models including synthetic data generation and distillation. The Llama 3.1 Community License allows for these use cases.
294
+
295
+ **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.1 Community License. Use in languages beyond those explicitly referenced as supported in this model card**.
296
+
297
+ **<span style="text-decoration:underline;">Note</span>: Llama 3.1 has been trained on a broader collection of languages than the 8 supported languages. Developers may fine-tune Llama 3.1 models for languages beyond the 8 supported languages provided they comply with the Llama 3.1 Community License and the Acceptable Use Policy and in such cases are responsible for ensuring that any uses of Llama 3.1 in additional languages is done in a safe and responsible manner.
298
+
299
+ ## How to use
300
+
301
+ This repository contains two versions of Meta-Llama-3.1-70B, for use with transformers and with the original `llama` codebase.
302
+
303
+ ### Use with transformers
304
+
305
+ Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function.
306
+
307
+ Make sure to update your transformers installation via `pip install --upgrade transformers`.
308
+
309
+
310
+ ```python
311
+ >>> import transformers
312
+ >>> import torch
313
+
314
+ >>> model_id = "meta-llama/Meta-Llama-3.1-70B"
315
+
316
+ >>> pipeline = transformers.pipeline(
317
+ "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
318
+ )
319
+ >>> pipeline("Hey how are you doing today?")
320
+ ```
321
+
322
+ ### Use with `llama3`
323
+
324
+ Please, follow the instructions in the [repository](https://github.com/meta-llama/llama).
325
+
326
+ To download Original checkpoints, see the example command below leveraging `huggingface-cli`:
327
+
328
+ ```
329
+ huggingface-cli download meta-llama/Meta-Llama-3.1-70B --include "original/*" --local-dir Meta-Llama-3.1-70B
330
+ ```
331
+
332
+ ## Hardware and Software
333
+
334
+ **Training Factors** We used custom training libraries, Meta's custom built GPU cluster, and production infrastructure for pretraining. Fine-tuning, annotation, and evaluation were also performed on production infrastructure.
335
+
336
+ **Training utilized a cumulative of** 39.3M GPU hours of computation on H100-80GB (TDP of 700W) type hardware, per the table below. Training time is the total GPU time required for training each model and power consumption is the peak power capacity per GPU device used, adjusted for power usage efficiency.
337
+
338
+
339
+ **Training Greenhouse Gas Emissions** Estimated total location-based greenhouse gas emissions were **11,390** tons CO2eq for training. Since 2020, Meta has maintained net zero greenhouse gas emissions in its global operations and matched 100% of its electricity use with renewable energy, therefore the total market-based greenhouse gas emissions for training were 0 tons CO2eq.
340
+
341
+
342
+ <table>
343
+ <tr>
344
+ <td>
345
+ </td>
346
+ <td><strong>Training Time (GPU hours)</strong>
347
+ </td>
348
+ <td><strong>Training Power Consumption (W)</strong>
349
+ </td>
350
+ <td><strong>Training Location-Based Greenhouse Gas Emissions</strong>
351
+ <p>
352
+ <strong>(tons CO2eq)</strong>
353
+ </td>
354
+ <td><strong>Training Market-Based Greenhouse Gas Emissions</strong>
355
+ <p>
356
+ <strong>(tons CO2eq)</strong>
357
+ </td>
358
+ </tr>
359
+ <tr>
360
+ <td>Llama 3.1 8B
361
+ </td>
362
+ <td>1.46M
363
+ </td>
364
+ <td>700
365
+ </td>
366
+ <td>420
367
+ </td>
368
+ <td>0
369
+ </td>
370
+ </tr>
371
+ <tr>
372
+ <td>Llama 3.1 70B
373
+ </td>
374
+ <td>7.0M
375
+ </td>
376
+ <td>700
377
+ </td>
378
+ <td>2,040
379
+ </td>
380
+ <td>0
381
+ </td>
382
+ </tr>
383
+ <tr>
384
+ <td>Llama 3.1 405B
385
+ </td>
386
+ <td>30.84M
387
+ </td>
388
+ <td>700
389
+ </td>
390
+ <td>8,930
391
+ </td>
392
+ <td>0
393
+ </td>
394
+ </tr>
395
+ <tr>
396
+ <td>Total
397
+ </td>
398
+ <td>39.3M
399
+ <td>
400
+ <ul>
401
+
402
+ </ul>
403
+ </td>
404
+ <td>11,390
405
+ </td>
406
+ <td>0
407
+ </td>
408
+ </tr>
409
+ </table>
410
+
411
+
412
+
413
+ The methodology used to determine training energy use and greenhouse gas emissions can be found [here](https://arxiv.org/pdf/2204.05149). Since Meta is openly releasing these models, the training energy use and greenhouse gas emissions will not be incurred by others.
414
+
415
+
416
+ ## Training Data
417
+
418
+ **Overview:** Llama 3.1 was pretrained on ~15 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over 25M synthetically generated examples.
419
+
420
+ **Data Freshness:** The pretraining data has a cutoff of December 2023.
421
+
422
+
423
+ ## Benchmark scores
424
+
425
+ In this section, we report the results for Llama 3.1 models on standard automatic benchmarks. For all the evaluations, we use our internal evaluations library.
426
+
427
+ ### Base pretrained models
428
+
429
+
430
+ <table>
431
+ <tr>
432
+ <td><strong>Category</strong>
433
+ </td>
434
+ <td><strong>Benchmark</strong>
435
+ </td>
436
+ <td><strong># Shots</strong>
437
+ </td>
438
+ <td><strong>Metric</strong>
439
+ </td>
440
+ <td><strong>Llama 3 8B</strong>
441
+ </td>
442
+ <td><strong>Llama 3.1 8B</strong>
443
+ </td>
444
+ <td><strong>Llama 3 70B</strong>
445
+ </td>
446
+ <td><strong>Llama 3.1 70B</strong>
447
+ </td>
448
+ <td><strong>Llama 3.1 405B</strong>
449
+ </td>
450
+ </tr>
451
+ <tr>
452
+ <td rowspan="7" >General
453
+ </td>
454
+ <td>MMLU
455
+ </td>
456
+ <td>5
457
+ </td>
458
+ <td>macro_avg/acc_char
459
+ </td>
460
+ <td>66.7
461
+ </td>
462
+ <td>66.7
463
+ </td>
464
+ <td>79.5
465
+ </td>
466
+ <td>79.3
467
+ </td>
468
+ <td>85.2
469
+ </td>
470
+ </tr>
471
+ <tr>
472
+ <td>MMLU-Pro (CoT)
473
+ </td>
474
+ <td>5
475
+ </td>
476
+ <td>macro_avg/acc_char
477
+ </td>
478
+ <td>36.2
479
+ </td>
480
+ <td>37.1
481
+ </td>
482
+ <td>55.0
483
+ </td>
484
+ <td>53.8
485
+ </td>
486
+ <td>61.6
487
+ </td>
488
+ </tr>
489
+ <tr>
490
+ <td>AGIEval English
491
+ </td>
492
+ <td>3-5
493
+ </td>
494
+ <td>average/acc_char
495
+ </td>
496
+ <td>47.1
497
+ </td>
498
+ <td>47.8
499
+ </td>
500
+ <td>63.0
501
+ </td>
502
+ <td>64.6
503
+ </td>
504
+ <td>71.6
505
+ </td>
506
+ </tr>
507
+ <tr>
508
+ <td>CommonSenseQA
509
+ </td>
510
+ <td>7
511
+ </td>
512
+ <td>acc_char
513
+ </td>
514
+ <td>72.6
515
+ </td>
516
+ <td>75.0
517
+ </td>
518
+ <td>83.8
519
+ </td>
520
+ <td>84.1
521
+ </td>
522
+ <td>85.8
523
+ </td>
524
+ </tr>
525
+ <tr>
526
+ <td>Winogrande
527
+ </td>
528
+ <td>5
529
+ </td>
530
+ <td>acc_char
531
+ </td>
532
+ <td>-
533
+ </td>
534
+ <td>60.5
535
+ </td>
536
+ <td>-
537
+ </td>
538
+ <td>83.3
539
+ </td>
540
+ <td>86.7
541
+ </td>
542
+ </tr>
543
+ <tr>
544
+ <td>BIG-Bench Hard (CoT)
545
+ </td>
546
+ <td>3
547
+ </td>
548
+ <td>average/em
549
+ </td>
550
+ <td>61.1
551
+ </td>
552
+ <td>64.2
553
+ </td>
554
+ <td>81.3
555
+ </td>
556
+ <td>81.6
557
+ </td>
558
+ <td>85.9
559
+ </td>
560
+ </tr>
561
+ <tr>
562
+ <td>ARC-Challenge
563
+ </td>
564
+ <td>25
565
+ </td>
566
+ <td>acc_char
567
+ </td>
568
+ <td>79.4
569
+ </td>
570
+ <td>79.7
571
+ </td>
572
+ <td>93.1
573
+ </td>
574
+ <td>92.9
575
+ </td>
576
+ <td>96.1
577
+ </td>
578
+ </tr>
579
+ <tr>
580
+ <td>Knowledge reasoning
581
+ </td>
582
+ <td>TriviaQA-Wiki
583
+ </td>
584
+ <td>5
585
+ </td>
586
+ <td>em
587
+ </td>
588
+ <td>78.5
589
+ </td>
590
+ <td>77.6
591
+ </td>
592
+ <td>89.7
593
+ </td>
594
+ <td>89.8
595
+ </td>
596
+ <td>91.8
597
+ </td>
598
+ </tr>
599
+ <tr>
600
+ <td rowspan="4" >Reading comprehension
601
+ </td>
602
+ <td>SQuAD
603
+ </td>
604
+ <td>1
605
+ </td>
606
+ <td>em
607
+ </td>
608
+ <td>76.4
609
+ </td>
610
+ <td>77.0
611
+ </td>
612
+ <td>85.6
613
+ </td>
614
+ <td>81.8
615
+ </td>
616
+ <td>89.3
617
+ </td>
618
+ </tr>
619
+ <tr>
620
+ <td>QuAC (F1)
621
+ </td>
622
+ <td>1
623
+ </td>
624
+ <td>f1
625
+ </td>
626
+ <td>44.4
627
+ </td>
628
+ <td>44.9
629
+ </td>
630
+ <td>51.1
631
+ </td>
632
+ <td>51.1
633
+ </td>
634
+ <td>53.6
635
+ </td>
636
+ </tr>
637
+ <tr>
638
+ <td>BoolQ
639
+ </td>
640
+ <td>0
641
+ </td>
642
+ <td>acc_char
643
+ </td>
644
+ <td>75.7
645
+ </td>
646
+ <td>75.0
647
+ </td>
648
+ <td>79.0
649
+ </td>
650
+ <td>79.4
651
+ </td>
652
+ <td>80.0
653
+ </td>
654
+ </tr>
655
+ <tr>
656
+ <td>DROP (F1)
657
+ </td>
658
+ <td>3
659
+ </td>
660
+ <td>f1
661
+ </td>
662
+ <td>58.4
663
+ </td>
664
+ <td>59.5
665
+ </td>
666
+ <td>79.7
667
+ </td>
668
+ <td>79.6
669
+ </td>
670
+ <td>84.8
671
+ </td>
672
+ </tr>
673
+ </table>
674
+
675
+
676
+
677
+ ### Instruction tuned models
678
+
679
+
680
+ <table>
681
+ <tr>
682
+ <td><strong>Category</strong>
683
+ </td>
684
+ <td><strong>Benchmark</strong>
685
+ </td>
686
+ <td><strong># Shots</strong>
687
+ </td>
688
+ <td><strong>Metric</strong>
689
+ </td>
690
+ <td><strong>Llama 3 8B Instruct</strong>
691
+ </td>
692
+ <td><strong>Llama 3.1 8B Instruct</strong>
693
+ </td>
694
+ <td><strong>Llama 3 70B Instruct</strong>
695
+ </td>
696
+ <td><strong>Llama 3.1 70B Instruct</strong>
697
+ </td>
698
+ <td><strong>Llama 3.1 405B Instruct</strong>
699
+ </td>
700
+ </tr>
701
+ <tr>
702
+ <td rowspan="4" >General
703
+ </td>
704
+ <td>MMLU
705
+ </td>
706
+ <td>5
707
+ </td>
708
+ <td>macro_avg/acc
709
+ </td>
710
+ <td>68.5
711
+ </td>
712
+ <td>69.4
713
+ </td>
714
+ <td>82.0
715
+ </td>
716
+ <td>83.6
717
+ </td>
718
+ <td>87.3
719
+ </td>
720
+ </tr>
721
+ <tr>
722
+ <td>MMLU (CoT)
723
+ </td>
724
+ <td>0
725
+ </td>
726
+ <td>macro_avg/acc
727
+ </td>
728
+ <td>65.3
729
+ </td>
730
+ <td>73.0
731
+ </td>
732
+ <td>80.9
733
+ </td>
734
+ <td>86.0
735
+ </td>
736
+ <td>88.6
737
+ </td>
738
+ </tr>
739
+ <tr>
740
+ <td>MMLU-Pro (CoT)
741
+ </td>
742
+ <td>5
743
+ </td>
744
+ <td>micro_avg/acc_char
745
+ </td>
746
+ <td>45.5
747
+ </td>
748
+ <td>48.3
749
+ </td>
750
+ <td>63.4
751
+ </td>
752
+ <td>66.4
753
+ </td>
754
+ <td>73.3
755
+ </td>
756
+ </tr>
757
+ <tr>
758
+ <td>IFEval
759
+ </td>
760
+ <td>
761
+ </td>
762
+ <td>
763
+ </td>
764
+ <td>76.8
765
+ </td>
766
+ <td>80.4
767
+ </td>
768
+ <td>82.9
769
+ </td>
770
+ <td>87.5
771
+ </td>
772
+ <td>88.6
773
+ </td>
774
+ </tr>
775
+ <tr>
776
+ <td rowspan="2" >Reasoning
777
+ </td>
778
+ <td>ARC-C
779
+ </td>
780
+ <td>0
781
+ </td>
782
+ <td>acc
783
+ </td>
784
+ <td>82.4
785
+ </td>
786
+ <td>83.4
787
+ </td>
788
+ <td>94.4
789
+ </td>
790
+ <td>94.8
791
+ </td>
792
+ <td>96.9
793
+ </td>
794
+ </tr>
795
+ <tr>
796
+ <td>GPQA
797
+ </td>
798
+ <td>0
799
+ </td>
800
+ <td>em
801
+ </td>
802
+ <td>34.6
803
+ </td>
804
+ <td>30.4
805
+ </td>
806
+ <td>39.5
807
+ </td>
808
+ <td>41.7
809
+ </td>
810
+ <td>50.7
811
+ </td>
812
+ </tr>
813
+ <tr>
814
+ <td rowspan="4" >Code
815
+ </td>
816
+ <td>HumanEval
817
+ </td>
818
+ <td>0
819
+ </td>
820
+ <td>pass@1
821
+ </td>
822
+ <td>60.4
823
+ </td>
824
+ <td>72.6
825
+ </td>
826
+ <td>81.7
827
+ </td>
828
+ <td>80.5
829
+ </td>
830
+ <td>89.0
831
+ </td>
832
+ </tr>
833
+ <tr>
834
+ <td>MBPP ++ base version
835
+ </td>
836
+ <td>0
837
+ </td>
838
+ <td>pass@1
839
+ </td>
840
+ <td>70.6
841
+ </td>
842
+ <td>72.8
843
+ </td>
844
+ <td>82.5
845
+ </td>
846
+ <td>86.0
847
+ </td>
848
+ <td>88.6
849
+ </td>
850
+ </tr>
851
+ <tr>
852
+ <td>Multipl-E HumanEval
853
+ </td>
854
+ <td>0
855
+ </td>
856
+ <td>pass@1
857
+ </td>
858
+ <td>-
859
+ </td>
860
+ <td>50.8
861
+ </td>
862
+ <td>-
863
+ </td>
864
+ <td>65.5
865
+ </td>
866
+ <td>75.2
867
+ </td>
868
+ </tr>
869
+ <tr>
870
+ <td>Multipl-E MBPP
871
+ </td>
872
+ <td>0
873
+ </td>
874
+ <td>pass@1
875
+ </td>
876
+ <td>-
877
+ </td>
878
+ <td>52.4
879
+ </td>
880
+ <td>-
881
+ </td>
882
+ <td>62.0
883
+ </td>
884
+ <td>65.7
885
+ </td>
886
+ </tr>
887
+ <tr>
888
+ <td rowspan="2" >Math
889
+ </td>
890
+ <td>GSM-8K (CoT)
891
+ </td>
892
+ <td>8
893
+ </td>
894
+ <td>em_maj1@1
895
+ </td>
896
+ <td>80.6
897
+ </td>
898
+ <td>84.5
899
+ </td>
900
+ <td>93.0
901
+ </td>
902
+ <td>95.1
903
+ </td>
904
+ <td>96.8
905
+ </td>
906
+ </tr>
907
+ <tr>
908
+ <td>MATH (CoT)
909
+ </td>
910
+ <td>0
911
+ </td>
912
+ <td>final_em
913
+ </td>
914
+ <td>29.1
915
+ </td>
916
+ <td>51.9
917
+ </td>
918
+ <td>51.0
919
+ </td>
920
+ <td>68.0
921
+ </td>
922
+ <td>73.8
923
+ </td>
924
+ </tr>
925
+ <tr>
926
+ <td rowspan="4" >Tool Use
927
+ </td>
928
+ <td>API-Bank
929
+ </td>
930
+ <td>0
931
+ </td>
932
+ <td>acc
933
+ </td>
934
+ <td>48.3
935
+ </td>
936
+ <td>82.6
937
+ </td>
938
+ <td>85.1
939
+ </td>
940
+ <td>90.0
941
+ </td>
942
+ <td>92.0
943
+ </td>
944
+ </tr>
945
+ <tr>
946
+ <td>BFCL
947
+ </td>
948
+ <td>0
949
+ </td>
950
+ <td>acc
951
+ </td>
952
+ <td>60.3
953
+ </td>
954
+ <td>76.1
955
+ </td>
956
+ <td>83.0
957
+ </td>
958
+ <td>84.8
959
+ </td>
960
+ <td>88.5
961
+ </td>
962
+ </tr>
963
+ <tr>
964
+ <td>Gorilla Benchmark API Bench
965
+ </td>
966
+ <td>0
967
+ </td>
968
+ <td>acc
969
+ </td>
970
+ <td>1.7
971
+ </td>
972
+ <td>8.2
973
+ </td>
974
+ <td>14.7
975
+ </td>
976
+ <td>29.7
977
+ </td>
978
+ <td>35.3
979
+ </td>
980
+ </tr>
981
+ <tr>
982
+ <td>Nexus (0-shot)
983
+ </td>
984
+ <td>0
985
+ </td>
986
+ <td>macro_avg/acc
987
+ </td>
988
+ <td>18.1
989
+ </td>
990
+ <td>38.5
991
+ </td>
992
+ <td>47.8
993
+ </td>
994
+ <td>56.7
995
+ </td>
996
+ <td>58.7
997
+ </td>
998
+ </tr>
999
+ <tr>
1000
+ <td>Multilingual
1001
+ </td>
1002
+ <td>Multilingual MGSM (CoT)
1003
+ </td>
1004
+ <td>0
1005
+ </td>
1006
+ <td>em
1007
+ </td>
1008
+ <td>-
1009
+ </td>
1010
+ <td>68.9
1011
+ </td>
1012
+ <td>-
1013
+ </td>
1014
+ <td>86.9
1015
+ </td>
1016
+ <td>91.6
1017
+ </td>
1018
+ </tr>
1019
+ </table>
1020
+
1021
+ #### Multilingual benchmarks
1022
+
1023
+ <table>
1024
+ <tr>
1025
+ <td><strong>Category</strong>
1026
+ </td>
1027
+ <td><strong>Benchmark</strong>
1028
+ </td>
1029
+ <td><strong>Language</strong>
1030
+ </td>
1031
+ <td><strong>Llama 3.1 8B</strong>
1032
+ </td>
1033
+ <td><strong>Llama 3.1 70B</strong>
1034
+ </td>
1035
+ <td><strong>Llama 3.1 405B</strong>
1036
+ </td>
1037
+ </tr>
1038
+ <tr>
1039
+ <td rowspan="9" ><strong>General</strong>
1040
+ </td>
1041
+ <td rowspan="9" ><strong>MMLU (5-shot, macro_avg/acc)</strong>
1042
+ </td>
1043
+ <td>Portuguese
1044
+ </td>
1045
+ <td>62.12
1046
+ </td>
1047
+ <td>80.13
1048
+ </td>
1049
+ <td>84.95
1050
+ </td>
1051
+ </tr>
1052
+ <tr>
1053
+ <td>Spanish
1054
+ </td>
1055
+ <td>62.45
1056
+ </td>
1057
+ <td>80.05
1058
+ </td>
1059
+ <td>85.08
1060
+ </td>
1061
+ </tr>
1062
+ <tr>
1063
+ <td>Italian
1064
+ </td>
1065
+ <td>61.63
1066
+ </td>
1067
+ <td>80.4
1068
+ </td>
1069
+ <td>85.04
1070
+ </td>
1071
+ </tr>
1072
+ <tr>
1073
+ <td>German
1074
+ </td>
1075
+ <td>60.59
1076
+ </td>
1077
+ <td>79.27
1078
+ </td>
1079
+ <td>84.36
1080
+ </td>
1081
+ </tr>
1082
+ <tr>
1083
+ <td>French
1084
+ </td>
1085
+ <td>62.34
1086
+ </td>
1087
+ <td>79.82
1088
+ </td>
1089
+ <td>84.66
1090
+ </td>
1091
+ </tr>
1092
+ <tr>
1093
+ <td>Hindi
1094
+ </td>
1095
+ <td>50.88
1096
+ </td>
1097
+ <td>74.52
1098
+ </td>
1099
+ <td>80.31
1100
+ </td>
1101
+ </tr>
1102
+ <tr>
1103
+ <td>Thai
1104
+ </td>
1105
+ <td>50.32
1106
+ </td>
1107
+ <td>72.95
1108
+ </td>
1109
+ <td>78.21
1110
+ </td>
1111
+ </tr>
1112
+ </table>
1113
+
1114
+
1115
+
1116
+ ## Responsibility & Safety
1117
+
1118
+ As part of our Responsible release approach, we followed a three-pronged strategy to managing trust & safety risks:
1119
+
1120
+
1121
+
1122
+ * Enable developers to deploy helpful, safe and flexible experiences for their target audience and for the use cases supported by Llama.
1123
+ * Protect developers against adversarial users aiming to exploit Llama capabilities to potentially cause harm.
1124
+ * Provide protections for the community to help prevent the misuse of our models.
1125
+
1126
+
1127
+ ### Responsible deployment
1128
+
1129
+ Llama is a foundational technology designed to be used in a variety of use cases, examples on how Meta’s Llama models have been responsibly deployed can be found in our [Community Stories webpage](https://llama.meta.com/community-stories/). Our approach is to build the most helpful models enabling the world to benefit from the technology power, by aligning our model safety for the generic use cases addressing a standard set of harms. Developers are then in the driver seat to tailor safety for their use case, defining their own policy and deploying the models with the necessary safeguards in their Llama systems. Llama 3.1 was developed following the best practices outlined in our Responsible Use Guide, you can refer to the [Responsible Use Guide](https://llama.meta.com/responsible-use-guide/) to learn more.
1130
+
1131
+
1132
+ #### Llama 3.1 instruct
1133
+
1134
+ Our main objectives for conducting safety fine-tuning are to provide the research community with a valuable resource for studying the robustness of safety fine-tuning, as well as to offer developers a readily available, safe, and powerful model for various applications to reduce the developer workload to deploy safe AI systems. For more details on the safety mitigations implemented please read the Llama 3 paper.
1135
+
1136
+ **Fine-tuning data**
1137
+
1138
+ We employ a multi-faceted approach to data collection, combining human-generated data from our vendors with synthetic data to mitigate potential safety risks. We’ve developed many large language model (LLM)-based classifiers that enable us to thoughtfully select high-quality prompts and responses, enhancing data quality control.
1139
+
1140
+ **Refusals and Tone**
1141
+
1142
+ Building on the work we started with Llama 3, we put a great emphasis on model refusals to benign prompts as well as refusal tone. We included both borderline and adversarial prompts in our safety data strategy, and modified our safety data responses to follow tone guidelines.
1143
+
1144
+
1145
+ #### Llama 3.1 systems
1146
+
1147
+ **Large language models, including Llama 3.1, are not designed to be deployed in isolation but instead should be deployed as part of an overall AI system with additional safety guardrails as required.** Developers are expected to deploy system safeguards when building agentic systems. Safeguards are key to achieve the right helpfulness-safety alignment as well as mitigating safety and security risks inherent to the system and any integration of the model or system with external tools.
1148
+
1149
+ As part of our responsible release approach, we provide the community with [safeguards](https://llama.meta.com/trust-and-safety/) that developers should deploy with Llama models or other LLMs, including Llama Guard 3, Prompt Guard and Code Shield. All our [reference implementations](https://github.com/meta-llama/llama-agentic-system) demos contain these safeguards by default so developers can benefit from system-level safety out-of-the-box.
1150
+
1151
+
1152
+ #### New capabilities
1153
+
1154
+ Note that this release introduces new capabilities, including a longer context window, multilingual inputs and outputs and possible integrations by developers with third party tools. Building with these new capabilities requires specific considerations in addition to the best practices that generally apply across all Generative AI use cases.
1155
+
1156
+ **Tool-use**: Just like in standard software development, developers are responsible for the integration of the LLM with the tools and services of their choice. They should define a clear policy for their use case and assess the integrity of the third party services they use to be aware of the safety and security limitations when using this capability. Refer to the Responsible Use Guide for best practices on the safe deployment of the third party safeguards.
1157
+
1158
+ **Multilinguality**: Llama 3.1 supports 7 languages in addition to English: French, German, Hindi, Italian, Portuguese, Spanish, and Thai. Llama may be able to output text in other languages than those that meet performance thresholds for safety and helpfulness. We strongly discourage developers from using this model to converse in non-supported languages without implementing finetuning and system controls in alignment with their policies and the best practices shared in the Responsible Use Guide.
1159
+
1160
+
1161
+ ### Evaluations
1162
+
1163
+ We evaluated Llama models for common use cases as well as specific capabilities. Common use cases evaluations measure safety risks of systems for most commonly built applications including chat bot, coding assistant, tool calls. We built dedicated, adversarial evaluation datasets and evaluated systems composed of Llama models and Llama Guard 3 to filter input prompt and output response. It is important to evaluate applications in context, and we recommend building dedicated evaluation dataset for your use case. Prompt Guard and Code Shield are also available if relevant to the application.
1164
+
1165
+ Capability evaluations measure vulnerabilities of Llama models inherent to specific capabilities, for which were crafted dedicated benchmarks including long context, multilingual, tools calls, coding or memorization.
1166
+
1167
+ **Red teaming**
1168
+
1169
+ For both scenarios, we conducted recurring red teaming exercises with the goal of discovering risks via adversarial prompting and we used the learnings to improve our benchmarks and safety tuning datasets.
1170
+
1171
+ We partnered early with subject-matter experts in critical risk areas to understand the nature of these real-world harms and how such models may lead to unintended harm for society. Based on these conversations, we derived a set of adversarial goals for the red team to attempt to achieve, such as extracting harmful information or reprogramming the model to act in a potentially harmful capacity. The red team consisted of experts in cybersecurity, adversarial machine learning, responsible AI, and integrity in addition to multilingual content specialists with background in integrity issues in specific geographic markets.
1172
+
1173
+
1174
+ ### Critical and other risks
1175
+
1176
+ We specifically focused our efforts on mitigating the following critical risk areas:
1177
+
1178
+ **1- CBRNE (Chemical, Biological, Radiological, Nuclear, and Explosive materials) helpfulness**
1179
+
1180
+ To assess risks related to proliferation of chemical and biological weapons, we performed uplift testing designed to assess whether use of Llama 3.1 models could meaningfully increase the capabilities of malicious actors to plan or carry out attacks using these types of weapons.
1181
+
1182
+
1183
+ **2. Child Safety**
1184
+
1185
+ 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 including the additional languages Llama 3 is trained on. We also partnered with content specialists to perform red teaming exercises assessing potentially violating content while taking account of market specific nuances or experiences.
1186
+
1187
+ **3. Cyber attack enablement**
1188
+
1189
+ Our cyber attack uplift study investigated whether LLMs can enhance human capabilities in hacking tasks, both in terms of skill level and speed.
1190
+
1191
+ Our attack automation study focused on evaluating the capabilities of LLMs when used as autonomous agents in cyber offensive operations, specifically in the context of ransomware attacks. This evaluation was distinct from previous studies that considered LLMs as interactive assistants. The primary objective was to assess whether these models could effectively function as independent agents in executing complex cyber-attacks without human intervention.
1192
+
1193
+ Our study of Llama-3.1-405B’s social engineering uplift for cyber attackers was conducted to assess the effectiveness of AI models in aiding cyber threat actors in spear phishing campaigns. Please read our Llama 3.1 Cyber security whitepaper to learn more.
1194
+
1195
+
1196
+ ### Community
1197
+
1198
+ 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 on 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).
1199
+
1200
+ We also set up the [Llama Impact Grants](https://llama.meta.com/llama-impact-grants/) program to identify and support the most compelling applications of Meta’s Llama model for societal benefit across three categories: education, climate and open innovation. The 20 finalists from the hundreds of applications can be found [here](https://llama.meta.com/llama-impact-grants/#finalists).
1201
+
1202
+ 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.
1203
+
1204
+
1205
+ ## Ethical Considerations and Limitations
1206
+
1207
+ The core values of Llama 3.1 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.1 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.
1208
+
1209
+ But Llama 3.1 is a new technology, and like any new technology, there are risks associated with its use. Testing conducted to date has not covered, nor could it cover, all scenarios. For these reasons, as with all LLMs, Llama 3.1’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.1 models, developers should perform safety testing and tuning tailored to their specific applications of the model. Please refer to available resources including our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide), [Trust and Safety](https://llama.meta.com/trust-and-safety/) solutions, and other [resources](https://llama.meta.com/docs/get-started/) to learn more about responsible development.