ibibek commited on
Commit
0371423
1 Parent(s): d6ad9ef

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +655 -120
README.md CHANGED
@@ -1,199 +1,734 @@
1
  ---
2
- library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
  ## Model Details
 
 
13
 
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
 
52
- ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
 
56
- [More Information Needed]
57
 
58
- ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
 
62
- [More Information Needed]
63
 
64
- ### Recommendations
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
 
70
- ## How to Get Started with the Model
71
 
72
- Use the code below to get started with the model.
73
 
74
- [More Information Needed]
75
 
76
- ## Training Details
77
 
78
- ### Training Data
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
 
82
- [More Information Needed]
83
 
84
- ### Training Procedure
85
 
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
 
 
87
 
88
- #### Preprocessing [optional]
89
 
90
- [More Information Needed]
 
 
 
 
91
 
 
92
 
93
- #### Training Hyperparameters
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
 
97
- #### Speeds, Sizes, Times [optional]
98
 
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
 
101
- [More Information Needed]
102
 
103
- ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
 
107
- ### Testing Data, Factors & Metrics
108
 
109
- #### Testing Data
110
 
111
- <!-- This should link to a Dataset Card if possible. -->
112
 
113
- [More Information Needed]
114
 
115
- #### Factors
116
 
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
 
119
- [More Information Needed]
120
 
121
- #### Metrics
122
 
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
 
125
- [More Information Needed]
126
 
127
- ### Results
128
 
129
- [More Information Needed]
130
 
131
- #### Summary
132
 
 
133
 
 
134
 
135
- ## Model Examination [optional]
136
 
137
- <!-- Relevant interpretability work for the model goes here -->
138
 
139
- [More Information Needed]
140
 
141
- ## Environmental Impact
142
 
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
 
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
 
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
 
153
- ## Technical Specifications [optional]
154
 
155
- ### Model Architecture and Objective
156
 
157
- [More Information Needed]
158
 
159
- ### Compute Infrastructure
160
 
161
- [More Information Needed]
162
 
163
- #### Hardware
164
 
165
- [More Information Needed]
166
 
167
- #### Software
168
 
169
- [More Information Needed]
170
 
171
- ## Citation [optional]
172
 
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
 
175
- **BibTeX:**
176
 
177
- [More Information Needed]
178
 
179
- **APA:**
180
 
181
- [More Information Needed]
182
 
183
- ## Glossary [optional]
184
 
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
 
187
- [More Information Needed]
188
 
189
- ## More Information [optional]
190
 
191
- [More Information Needed]
192
 
193
- ## Model Card Authors [optional]
194
 
195
- [More Information Needed]
196
 
197
- ## Model Card Contact
198
 
199
- [More Information Needed]
 
1
  ---
2
+ language:
3
+ - en
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - facebook
7
+ - meta
8
+ - pytorch
9
+ - llama
10
+ - llama-3
11
+ license: other
12
+ license_name: llama3
13
+ license_link: LICENSE
14
+ extra_gated_prompt: >-
15
+ ### META LLAMA 3 COMMUNITY LICENSE AGREEMENT
16
+
17
+ Meta Llama 3 Version Release Date: April 18, 2024
18
+
19
+ "Agreement" means the terms and conditions for use, reproduction, distribution and modification of the
20
+ Llama Materials set forth herein.
21
+
22
+ "Documentation" means the specifications, manuals and documentation accompanying Meta Llama 3
23
+ distributed by Meta at https://llama.meta.com/get-started/.
24
+
25
+ "Licensee" or "you" means you, or your employer or any other person or entity (if you are entering into
26
+ this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or
27
+ regulations to provide legal consent and that has legal authority to bind your employer or such other
28
+ person or entity if you are entering in this Agreement on their behalf.
29
+
30
+ "Meta Llama 3" means the foundational large language models and software and algorithms, including
31
+ machine-learning model code, trained model weights, inference-enabling code, training-enabling code,
32
+ fine-tuning enabling code and other elements of the foregoing distributed by Meta at
33
+ https://llama.meta.com/llama-downloads.
34
+
35
+ "Llama Materials" means, collectively, Meta’s proprietary Meta Llama 3 and Documentation (and any
36
+ portion thereof) made available under this Agreement.
37
+
38
+ "Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your
39
+ principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located
40
+ outside of the EEA or Switzerland).
41
+
42
+ 1. License Rights and Redistribution.
43
+
44
+ a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free
45
+ limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Llama
46
+ Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the
47
+ Llama Materials.
48
+
49
+ b. Redistribution and Use.
50
+
51
+ i. If you distribute or make available the Llama Materials (or any derivative works
52
+ thereof), or a product or service that uses any of them, including another AI model, you shall (A) provide
53
+ a copy of this Agreement with any such Llama Materials; and (B) prominently display “Built with Meta
54
+ Llama 3” on a related website, user interface, blogpost, about page, or product documentation. If you
55
+ use the Llama Materials to create, train, fine tune, or otherwise improve an AI model, which is
56
+ distributed or made available, you shall also include “Llama 3” at the beginning of any such AI model
57
+ name.
58
+
59
+ ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part
60
+ of an integrated end user product, then Section 2 of this Agreement will not apply to you.
61
+
62
+ iii. You must retain in all copies of the Llama Materials that you distribute the following
63
+ attribution notice within a “Notice” text file distributed as a part of such copies: “Meta Llama 3 is
64
+ licensed under the Meta Llama 3 Community License, Copyright © Meta Platforms, Inc. All Rights
65
+ Reserved.”
66
+
67
+ iv. Your use of the Llama Materials must comply with applicable laws and regulations
68
+ (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Llama
69
+ Materials (available at https://llama.meta.com/llama3/use-policy), which is hereby incorporated by
70
+ reference into this Agreement.
71
+
72
+ v. You will not use the Llama Materials or any output or results of the Llama Materials to
73
+ improve any other large language model (excluding Meta Llama 3 or derivative works thereof).
74
+
75
+ 2. Additional Commercial Terms. If, on the Meta Llama 3 version release date, the monthly active users
76
+ of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700
77
+ million monthly active users in the preceding calendar month, you must request a license from Meta,
78
+ which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the
79
+ rights under this Agreement unless or until Meta otherwise expressly grants you such rights.
80
+
81
+ 3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY
82
+ OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF
83
+ ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,
84
+ INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,
85
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR
86
+ DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND
87
+ ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND
88
+ RESULTS.
89
+
90
+ 4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF
91
+ LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING
92
+ OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL,
93
+ INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED
94
+ OF THE POSSIBILITY OF ANY OF THE FOREGOING.
95
+
96
+ 5. Intellectual Property.
97
+
98
+ a. No trademark licenses are granted under this Agreement, and in connection with the Llama
99
+ Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other
100
+ or any of its affiliates, except as required for reasonable and customary use in describing and
101
+ redistributing the Llama Materials or as set forth in this Section 5(a). Meta hereby grants you a license to
102
+ use “Llama 3” (the “Mark”) solely as required to comply with the last sentence of Section 1.b.i. You will
103
+ comply with Meta’s brand guidelines (currently accessible at
104
+ https://about.meta.com/brand/resources/meta/company-brand/ ). All goodwill arising out of your use
105
+ of the Mark will inure to the benefit of Meta.
106
+
107
+ b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for Meta, with
108
+ respect to any derivative works and modifications of the Llama Materials that are made by you, as
109
+ between you and Meta, you are and will be the owner of such derivative works and modifications.
110
+
111
+ c. If you institute litigation or other proceedings against Meta or any entity (including a
112
+ cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or Meta Llama 3 outputs or
113
+ results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other
114
+ rights owned or licensable by you, then any licenses granted to you under this Agreement shall
115
+ terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold
116
+ harmless Meta from and against any claim by any third party arising out of or related to your use or
117
+ distribution of the Llama Materials.
118
+
119
+ 6. Term and Termination. The term of this Agreement will commence upon your acceptance of this
120
+ Agreement or access to the Llama Materials and will continue in full force and effect until terminated in
121
+ accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in
122
+ breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete
123
+ and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of this
124
+ Agreement.
125
+
126
+ 7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of
127
+ the State of California without regard to choice of law principles, and the UN Convention on Contracts
128
+ for the International Sale of Goods does not apply to this Agreement. The courts of California shall have
129
+ exclusive jurisdiction of any dispute arising out of this Agreement.
130
+
131
+ ### Meta Llama 3 Acceptable Use Policy
132
+
133
+ Meta is committed to promoting safe and fair use of its tools and features, including Meta Llama 3. If you
134
+ access or use Meta Llama 3, you agree to this Acceptable Use Policy (“Policy”). The most recent copy of
135
+ this policy can be found at [https://llama.meta.com/llama3/use-policy](https://llama.meta.com/llama3/use-policy)
136
+
137
+ #### Prohibited Uses
138
+
139
+ We want everyone to use Meta Llama 3 safely and responsibly. You agree you will not use, or allow
140
+ others to use, Meta Llama 3 to:
141
+ 1. Violate the law or others’ rights, including to:
142
+ 1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
143
+ 1. Violence or terrorism
144
+ 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
145
+ 3. Human trafficking, exploitation, and sexual violence
146
+ 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.
147
+ 5. Sexual solicitation
148
+ 6. Any other criminal activity
149
+ 2. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
150
+ 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
151
+ 4. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
152
+ 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
153
+ 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
154
+ 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
155
+ 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:
156
+ 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
157
+ 2. Guns and illegal weapons (including weapon development)
158
+ 3. Illegal drugs and regulated/controlled substances
159
+ 4. Operation of critical infrastructure, transportation technologies, or heavy machinery
160
+ 5. Self-harm or harm to others, including suicide, cutting, and eating disorders
161
+ 6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
162
+ 3. Intentionally deceive or mislead others, including use of Meta Llama 3 related to the following:
163
+ 1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
164
+ 2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
165
+ 3. Generating, promoting, or further distributing spam
166
+ 4. Impersonating another individual without consent, authorization, or legal right
167
+ 5. Representing that the use of Meta Llama 3 or outputs are human-generated
168
+ 6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
169
+ 4. Fail to appropriately disclose to end users any known dangers of your AI system
170
+
171
+ Please report any violation of this Policy, software “bug,” or other problems that could lead to a violation
172
+ of this Policy through one of the following means:
173
+ * Reporting issues with the model: [https://github.com/meta-llama/llama3](https://github.com/meta-llama/llama3)
174
+ * Reporting risky content generated by the model:
175
+ developers.facebook.com/llama_output_feedback
176
+ * Reporting bugs and security concerns: facebook.com/whitehat/info
177
+ * Reporting violations of the Acceptable Use Policy or unlicensed uses of Meta Llama 3: LlamaUseReport@meta.com
178
+ extra_gated_fields:
179
+ First Name: text
180
+ Last Name: text
181
+ Date of birth: date_picker
182
+ Country: country
183
+ Affiliation: text
184
+ geo: ip_location
185
+ 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
186
+ 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/).
187
+ extra_gated_button_content: Submit
188
  ---
189
 
 
 
 
 
 
 
190
  ## Model Details
191
+ This is a 4bit implementation of the Meta-Llama-3-8B model.
192
+ The rest of the **read me** is same as the original repo.
193
 
194
+ Meta developed and released the Meta Llama 3 family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes. The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks. Further, in developing these models, we took great care to optimize helpfulness and safety.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
 
196
+ **Model developers** Meta
197
 
198
+ **Variations** Llama 3 comes in two sizes — 8B and 70B parameters in pre-trained and instruction tuned variants.
199
 
200
+ **Input** Models input text only.
201
 
202
+ **Output** Models generate text and code only.
203
 
204
+ **Model Architecture** Llama 3 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety.
205
 
 
206
 
207
+ <table>
208
+ <tr>
209
+ <td>
210
+ </td>
211
+ <td><strong>Training Data</strong>
212
+ </td>
213
+ <td><strong>Params</strong>
214
+ </td>
215
+ <td><strong>Context length</strong>
216
+ </td>
217
+ <td><strong>GQA</strong>
218
+ </td>
219
+ <td><strong>Token count</strong>
220
+ </td>
221
+ <td><strong>Knowledge cutoff</strong>
222
+ </td>
223
+ </tr>
224
+ <tr>
225
+ <td rowspan="2" >Llama 3
226
+ </td>
227
+ <td rowspan="2" >A new mix of publicly available online data.
228
+ </td>
229
+ <td>8B
230
+ </td>
231
+ <td>8k
232
+ </td>
233
+ <td>Yes
234
+ </td>
235
+ <td rowspan="2" >15T+
236
+ </td>
237
+ <td>March, 2023
238
+ </td>
239
+ </tr>
240
+ <tr>
241
+ <td>70B
242
+ </td>
243
+ <td>8k
244
+ </td>
245
+ <td>Yes
246
+ </td>
247
+ <td>December, 2023
248
+ </td>
249
+ </tr>
250
+ </table>
251
+
252
+
253
+ **Llama 3 family of models**. Token counts refer to pretraining data only. Both the 8 and 70B versions use Grouped-Query Attention (GQA) for improved inference scalability.
254
+
255
+ **Model Release Date** April 18, 2024.
256
+
257
+ **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.
258
+
259
+ **License** A custom commercial license is available at: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
260
 
261
+ Where to send questions or comments about the model Instructions on how to provide feedback or comments on the model can be found in the model [README](https://github.com/meta-llama/llama3). For more technical information about generation parameters and recipes for how to use Llama 3 in applications, please go [here](https://github.com/meta-llama/llama-recipes).
262
 
 
263
 
264
+ ## Intended Use
265
 
266
+ **Intended Use Cases** Llama 3 is intended for commercial and research use in English. Instruction tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.
267
 
268
+ **Out-of-scope** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in any other way that is prohibited by the Acceptable Use Policy and Llama 3 Community License. Use in languages other than English**.
269
 
270
+ **Note: Developers may fine-tune Llama 3 models for languages beyond English provided they comply with the Llama 3 Community License and the Acceptable Use Policy.
271
 
272
+ ## How to use
273
 
274
+ This repository contains two versions of Meta-Llama-3-8B, for use with transformers and with the original `llama3` codebase.
275
 
276
+ ### Use with transformers
277
 
278
+ See the snippet below for usage with Transformers:
279
 
280
+ ```python
281
+ >>> import transformers
282
+ >>> import torch
283
 
284
+ >>> model_id = "meta-llama/Meta-Llama-3-8B"
285
 
286
+ >>> pipeline = transformers.pipeline(
287
+ "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
288
+ )
289
+ >>> pipeline("Hey how are you doing today?")
290
+ ```
291
 
292
+ ### Use with `llama3`
293
 
294
+ Please, follow the instructions in the [repository](https://github.com/meta-llama/llama3).
295
+
296
+ To download Original checkpoints, see the example command below leveraging `huggingface-cli`:
297
+
298
+ ```
299
+ huggingface-cli download meta-llama/Meta-Llama-3-8B --include "original/*" --local-dir Meta-Llama-3-8B
300
+ ```
301
+
302
+ For Hugging Face support, we recommend using transformers or TGI, but a similar command works.
303
+
304
+ ## Hardware and Software
305
+
306
+ **Training Factors** We used custom training libraries, Meta's Research SuperCluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute.
307
+
308
+ **Carbon Footprint Pretraining utilized a cumulative** 7.7M GPU hours of computation on hardware of type H100-80GB (TDP of 700W). Estimated total emissions were 2290 tCO2eq, 100% of which were offset by Meta’s sustainability program.
309
+
310
+
311
+ <table>
312
+ <tr>
313
+ <td>
314
+ </td>
315
+ <td><strong>Time (GPU hours)</strong>
316
+ </td>
317
+ <td><strong>Power Consumption (W)</strong>
318
+ </td>
319
+ <td><strong>Carbon Emitted(tCO2eq)</strong>
320
+ </td>
321
+ </tr>
322
+ <tr>
323
+ <td>Llama 3 8B
324
+ </td>
325
+ <td>1.3M
326
+ </td>
327
+ <td>700
328
+ </td>
329
+ <td>390
330
+ </td>
331
+ </tr>
332
+ <tr>
333
+ <td>Llama 3 70B
334
+ </td>
335
+ <td>6.4M
336
+ </td>
337
+ <td>700
338
+ </td>
339
+ <td>1900
340
+ </td>
341
+ </tr>
342
+ <tr>
343
+ <td>Total
344
+ </td>
345
+ <td>7.7M
346
+ </td>
347
+ <td>
348
+ </td>
349
+ <td>2290
350
+ </td>
351
+ </tr>
352
+ </table>
353
+
354
+
355
+
356
+ **CO2 emissions during pre-training**. Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others.
357
+
358
+
359
+ ## Training Data
360
+
361
+ **Overview** Llama 3 was pretrained on over 15 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over 10M human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data.
362
+
363
+ **Data Freshness** The pretraining data has a cutoff of March 2023 for the 7B and December 2023 for the 70B models respectively.
364
+
365
+
366
+ ## Benchmarks
367
+
368
+ In this section, we report the results for Llama 3 models on standard automatic benchmarks. For all the evaluations, we use our internal evaluations library. For details on the methodology see [here](https://github.com/meta-llama/llama3/blob/main/eval_methodology.md).
369
+
370
+
371
+ ### Base pretrained models
372
+
373
+
374
+ <table>
375
+ <tr>
376
+ <td><strong>Category</strong>
377
+ </td>
378
+ <td><strong>Benchmark</strong>
379
+ </td>
380
+ <td><strong>Llama 3 8B</strong>
381
+ </td>
382
+ <td><strong>Llama2 7B</strong>
383
+ </td>
384
+ <td><strong>Llama2 13B</strong>
385
+ </td>
386
+ <td><strong>Llama 3 70B</strong>
387
+ </td>
388
+ <td><strong>Llama2 70B</strong>
389
+ </td>
390
+ </tr>
391
+ <tr>
392
+ <td rowspan="6" >General
393
+ </td>
394
+ <td>MMLU (5-shot)
395
+ </td>
396
+ <td>66.6
397
+ </td>
398
+ <td>45.7
399
+ </td>
400
+ <td>53.8
401
+ </td>
402
+ <td>79.5
403
+ </td>
404
+ <td>69.7
405
+ </td>
406
+ </tr>
407
+ <tr>
408
+ <td>AGIEval English (3-5 shot)
409
+ </td>
410
+ <td>45.9
411
+ </td>
412
+ <td>28.8
413
+ </td>
414
+ <td>38.7
415
+ </td>
416
+ <td>63.0
417
+ </td>
418
+ <td>54.8
419
+ </td>
420
+ </tr>
421
+ <tr>
422
+ <td>CommonSenseQA (7-shot)
423
+ </td>
424
+ <td>72.6
425
+ </td>
426
+ <td>57.6
427
+ </td>
428
+ <td>67.6
429
+ </td>
430
+ <td>83.8
431
+ </td>
432
+ <td>78.7
433
+ </td>
434
+ </tr>
435
+ <tr>
436
+ <td>Winogrande (5-shot)
437
+ </td>
438
+ <td>76.1
439
+ </td>
440
+ <td>73.3
441
+ </td>
442
+ <td>75.4
443
+ </td>
444
+ <td>83.1
445
+ </td>
446
+ <td>81.8
447
+ </td>
448
+ </tr>
449
+ <tr>
450
+ <td>BIG-Bench Hard (3-shot, CoT)
451
+ </td>
452
+ <td>61.1
453
+ </td>
454
+ <td>38.1
455
+ </td>
456
+ <td>47.0
457
+ </td>
458
+ <td>81.3
459
+ </td>
460
+ <td>65.7
461
+ </td>
462
+ </tr>
463
+ <tr>
464
+ <td>ARC-Challenge (25-shot)
465
+ </td>
466
+ <td>78.6
467
+ </td>
468
+ <td>53.7
469
+ </td>
470
+ <td>67.6
471
+ </td>
472
+ <td>93.0
473
+ </td>
474
+ <td>85.3
475
+ </td>
476
+ </tr>
477
+ <tr>
478
+ <td>Knowledge reasoning
479
+ </td>
480
+ <td>TriviaQA-Wiki (5-shot)
481
+ </td>
482
+ <td>78.5
483
+ </td>
484
+ <td>72.1
485
+ </td>
486
+ <td>79.6
487
+ </td>
488
+ <td>89.7
489
+ </td>
490
+ <td>87.5
491
+ </td>
492
+ </tr>
493
+ <tr>
494
+ <td rowspan="4" >Reading comprehension
495
+ </td>
496
+ <td>SQuAD (1-shot)
497
+ </td>
498
+ <td>76.4
499
+ </td>
500
+ <td>72.2
501
+ </td>
502
+ <td>72.1
503
+ </td>
504
+ <td>85.6
505
+ </td>
506
+ <td>82.6
507
+ </td>
508
+ </tr>
509
+ <tr>
510
+ <td>QuAC (1-shot, F1)
511
+ </td>
512
+ <td>44.4
513
+ </td>
514
+ <td>39.6
515
+ </td>
516
+ <td>44.9
517
+ </td>
518
+ <td>51.1
519
+ </td>
520
+ <td>49.4
521
+ </td>
522
+ </tr>
523
+ <tr>
524
+ <td>BoolQ (0-shot)
525
+ </td>
526
+ <td>75.7
527
+ </td>
528
+ <td>65.5
529
+ </td>
530
+ <td>66.9
531
+ </td>
532
+ <td>79.0
533
+ </td>
534
+ <td>73.1
535
+ </td>
536
+ </tr>
537
+ <tr>
538
+ <td>DROP (3-shot, F1)
539
+ </td>
540
+ <td>58.4
541
+ </td>
542
+ <td>37.9
543
+ </td>
544
+ <td>49.8
545
+ </td>
546
+ <td>79.7
547
+ </td>
548
+ <td>70.2
549
+ </td>
550
+ </tr>
551
+ </table>
552
+
553
+
554
+
555
+ ### Instruction tuned models
556
+
557
+
558
+ <table>
559
+ <tr>
560
+ <td><strong>Benchmark</strong>
561
+ </td>
562
+ <td><strong>Llama 3 8B</strong>
563
+ </td>
564
+ <td><strong>Llama 2 7B</strong>
565
+ </td>
566
+ <td><strong>Llama 2 13B</strong>
567
+ </td>
568
+ <td><strong>Llama 3 70B</strong>
569
+ </td>
570
+ <td><strong>Llama 2 70B</strong>
571
+ </td>
572
+ </tr>
573
+ <tr>
574
+ <td>MMLU (5-shot)
575
+ </td>
576
+ <td>68.4
577
+ </td>
578
+ <td>34.1
579
+ </td>
580
+ <td>47.8
581
+ </td>
582
+ <td>82.0
583
+ </td>
584
+ <td>52.9
585
+ </td>
586
+ </tr>
587
+ <tr>
588
+ <td>GPQA (0-shot)
589
+ </td>
590
+ <td>34.2
591
+ </td>
592
+ <td>21.7
593
+ </td>
594
+ <td>22.3
595
+ </td>
596
+ <td>39.5
597
+ </td>
598
+ <td>21.0
599
+ </td>
600
+ </tr>
601
+ <tr>
602
+ <td>HumanEval (0-shot)
603
+ </td>
604
+ <td>62.2
605
+ </td>
606
+ <td>7.9
607
+ </td>
608
+ <td>14.0
609
+ </td>
610
+ <td>81.7
611
+ </td>
612
+ <td>25.6
613
+ </td>
614
+ </tr>
615
+ <tr>
616
+ <td>GSM-8K (8-shot, CoT)
617
+ </td>
618
+ <td>79.6
619
+ </td>
620
+ <td>25.7
621
+ </td>
622
+ <td>77.4
623
+ </td>
624
+ <td>93.0
625
+ </td>
626
+ <td>57.5
627
+ </td>
628
+ </tr>
629
+ <tr>
630
+ <td>MATH (4-shot, CoT)
631
+ </td>
632
+ <td>30.0
633
+ </td>
634
+ <td>3.8
635
+ </td>
636
+ <td>6.7
637
+ </td>
638
+ <td>50.4
639
+ </td>
640
+ <td>11.6
641
+ </td>
642
+ </tr>
643
+ </table>
644
 
 
645
 
 
646
 
647
+ ### Responsibility & Safety
648
 
649
+ We believe that an open approach to AI leads to better, safer products, faster innovation, and a bigger overall market. We are committed to Responsible AI development and took a series of steps to limit misuse and harm and support the open source community.
650
 
651
+ Foundation models are widely capable technologies that are built to be used for a diverse range of applications. They are not designed to meet every developer preference on safety levels for all use cases, out-of-the-box, as those by their nature will differ across different applications.
652
 
653
+ Rather, responsible LLM-application deployment is achieved by implementing a series of safety best practices throughout the development of such applications, from the model pre-training, fine-tuning and the deployment of systems composed of safeguards to tailor the safety needs specifically to the use case and audience.
654
 
 
655
 
656
+ As part of the Llama 3 release, we updated our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide/) to outline the steps and best practices for developers to implement model and system level safety for their application. We also provide a set of resources including [Meta Llama Guard 2](https://llama.meta.com/purple-llama/) and [Code Shield](https://llama.meta.com/purple-llama/) safeguards. These tools have proven to drastically reduce residual risks of LLM Systems, while maintaining a high level of helpfulness. We encourage developers to tune and deploy these safeguards according to their needs and we provide a [reference implementation](https://github.com/meta-llama/llama-recipes/tree/main/recipes/responsible_ai) to get you started.
657
 
 
658
 
659
+ #### Llama 3-Instruct
660
 
661
+ As outlined in the Responsible Use Guide, some trade-off between model helpfulness and model alignment is likely unavoidable. Developers should exercise discretion about how to weigh the benefits of alignment and helpfulness for their specific use case and audience. Developers should be mindful of residual risks when using Llama models and leverage additional safety tools as needed to reach the right safety bar for their use case.
662
 
663
+ <span style="text-decoration:underline;">Safety</span>
664
 
665
+ For our instruction tuned model, we conducted extensive red teaming exercises, performed adversarial evaluations and implemented safety mitigations techniques to lower residual risks. As with any Large Language Model, residual risks will likely remain and we recommend that developers assess these risks in the context of their use case. In parallel, we are working with the community to make AI safety benchmark standards transparent, rigorous and interpretable.
666
 
667
+ <span style="text-decoration:underline;">Refusals</span>
668
 
669
+ In addition to residual risks, we put a great emphasis on model refusals to benign prompts. Over-refusing not only can impact the user experience but could even be harmful in certain contexts as well. We’ve heard the feedback from the developer community and improved our fine tuning to ensure that Llama 3 is significantly less likely to falsely refuse to answer prompts than Llama 2.
670
 
671
+ We built internal benchmarks and developed mitigations to limit false refusals making Llama 3 our most helpful model to date.
672
 
 
673
 
674
+ #### Responsible release
675
 
676
+ In addition to responsible use considerations outlined above, we followed a rigorous process that requires us to take extra measures against misuse and critical risks before we make our release decision.
677
 
678
+ Misuse
679
 
680
+ If you access or use Llama 3, you agree to the Acceptable Use Policy. The most recent copy of this policy can be found at [https://llama.meta.com/llama3/use-policy/](https://llama.meta.com/llama3/use-policy/).
681
 
 
682
 
683
+ #### Critical risks
684
 
685
+ <span style="text-decoration:underline;">CBRNE</span> (Chemical, Biological, Radiological, Nuclear, and high yield Explosives)
686
 
687
+ We have conducted a two fold assessment of the safety of the model in this area:
688
 
 
689
 
 
690
 
691
+ * Iterative testing during model training to assess the safety of responses related to CBRNE threats and other adversarial risks.
692
+ * Involving external CBRNE experts to conduct an uplift test assessing the ability of the model to accurately provide expert knowledge and reduce barriers to potential CBRNE misuse, by reference to what can be achieved using web search (without the model).
 
 
 
693
 
 
694
 
695
+ ### <span style="text-decoration:underline;">Cyber Security </span>
696
 
697
+ We have evaluated Llama 3 with CyberSecEval, Meta’s cybersecurity safety eval suite, measuring Llama 3’s propensity to suggest insecure code when used as a coding assistant, and Llama 3’s propensity to comply with requests to help carry out cyber attacks, where attacks are defined by the industry standard MITRE ATT&CK cyber attack ontology. On our insecure coding and cyber attacker helpfulness tests, Llama 3 behaved in the same range or safer than models of [equivalent coding capability](https://huggingface.co/spaces/facebook/CyberSecEval).
698
 
 
699
 
700
+ ### <span style="text-decoration:underline;">Child Safety</span>
701
 
702
+ Child Safety risk assessments were conducted using a team of experts, to assess the model’s capability to produce outputs that could result in Child Safety risks and inform on any necessary and appropriate risk mitigations via fine tuning. We leveraged those expert red teaming sessions to expand the coverage of our evaluation benchmarks through Llama 3 model development. For Llama 3, we conducted new in-depth sessions using objective based methodologies to assess the model risks along multiple attack vectors. We also partnered with content specialists to perform red teaming exercises assessing potentially violating content while taking account of market specific nuances or experiences.
703
 
 
704
 
705
+ ### Community
706
 
707
+ Generative AI safety requires expertise and tooling, and we believe in the strength of the open community to accelerate its progress. We are active members of open consortiums, including the AI Alliance, Partnership in AI and MLCommons, actively contributing to safety standardization and transparency. We encourage the community to adopt taxonomies like the MLCommons Proof of Concept evaluation to facilitate collaboration and transparency on safety and content evaluations. Our Purple Llama tools are open sourced for the community to use and widely distributed across ecosystem partners including cloud service providers. We encourage community contributions to our [Github repository](https://github.com/meta-llama/PurpleLlama).
708
 
709
+ 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.
710
 
 
711
 
712
+ ## Ethical Considerations and Limitations
713
 
714
+ The core values of Llama 3 are openness, inclusivity and helpfulness. It is meant to serve everyone, and to work for a wide range of use cases. It is thus designed to be accessible to people across many different backgrounds, experiences and perspectives. Llama 3 addresses users and their needs as they are, without insertion unnecessary judgment or normativity, while reflecting the understanding that even content that may appear problematic in some cases can serve valuable purposes in others. It respects the dignity and autonomy of all users, especially in terms of the values of free thought and expression that power innovation and progress.
715
 
716
+ But Llama 3 is a new technology, and like any new technology, there are risks associated with its use. Testing conducted to date has been in English, and has not covered, nor could it cover, all scenarios. For these reasons, as with all LLMs, Llama 3’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 3 models, developers should perform safety testing and tuning tailored to their specific applications of the model. As outlined in the Responsible Use Guide, we recommend incorporating [Purple Llama](https://github.com/facebookresearch/PurpleLlama) solutions into your workflows and specifically [Llama Guard](https://ai.meta.com/research/publications/llama-guard-llm-based-input-output-safeguard-for-human-ai-conversations/) which provides a base model to filter input and output prompts to layer system-level safety on top of model-level safety.
717
 
718
+ Please see the Responsible Use Guide available at [http://llama.meta.com/responsible-use-guide](http://llama.meta.com/responsible-use-guide)
719
 
 
720
 
721
+ ## Citation instructions
722
 
723
+ @article{llama3modelcard,
724
 
725
+ title={Llama 3 Model Card},
726
 
727
+ author={AI@Meta},
728
 
729
+ year={2024},
730
 
731
+ url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
732
 
733
+ }
734