seungahdev commited on
Commit
2b85b4f
1 Parent(s): 32bc157

Create README.md

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