munish0838 commited on
Commit
112ca7c
1 Parent(s): c47c6dd

Upload README.md with huggingface_hub

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