Add ZipNN support
Browse files
README.md
CHANGED
@@ -17,153 +17,194 @@ tags:
|
|
17 |
- pytorch
|
18 |
- llama
|
19 |
- llama-3
|
20 |
-
extra_gated_prompt:
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
extra_gated_fields:
|
168 |
First Name: text
|
169 |
Last Name: text
|
@@ -180,15 +221,66 @@ extra_gated_fields:
|
|
180 |
- Reporter
|
181 |
- Other
|
182 |
geo: ip_location
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/).
|
189 |
extra_gated_button_content: Submit
|
|
|
190 |
---
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
## Model Information
|
193 |
|
194 |
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.
|
@@ -300,8 +392,11 @@ Make sure to update your transformers installation via `pip install --upgrade tr
|
|
300 |
```python
|
301 |
import transformers
|
302 |
import torch
|
|
|
|
|
|
|
303 |
|
304 |
-
model_id = "
|
305 |
|
306 |
pipeline = transformers.pipeline(
|
307 |
"text-generation",
|
@@ -377,7 +472,7 @@ Please, follow the instructions in the [repository](https://github.com/meta-llam
|
|
377 |
To download Original checkpoints, see the example command below leveraging `huggingface-cli`:
|
378 |
|
379 |
```
|
380 |
-
huggingface-cli download
|
381 |
```
|
382 |
|
383 |
## Hardware and Software
|
@@ -1257,4 +1352,4 @@ Finally, we put in place a set of resources including an [output reporting mecha
|
|
1257 |
|
1258 |
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.
|
1259 |
|
1260 |
-
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.
|
|
|
17 |
- pytorch
|
18 |
- llama
|
19 |
- llama-3
|
20 |
+
extra_gated_prompt: >-
|
21 |
+
### LLAMA 3.1 COMMUNITY LICENSE AGREEMENT
|
22 |
+
|
23 |
+
Llama 3.1 Version Release Date: July 23, 2024
|
24 |
+
|
25 |
+
"Agreement" means the terms and conditions for use, reproduction, distribution
|
26 |
+
and modification of the Llama Materials set forth herein.
|
27 |
+
|
28 |
+
"Documentation" means the specifications, manuals and documentation
|
29 |
+
accompanying Llama 3.1 distributed by Meta at
|
30 |
+
https://llama.meta.com/doc/overview.
|
31 |
+
|
32 |
+
"Licensee" or "you" means you, or your employer or any other person or entity
|
33 |
+
(if you are entering into this Agreement on such person or entity’s behalf),
|
34 |
+
of the age required under applicable laws, rules or regulations to provide
|
35 |
+
legal consent and that has legal authority to bind your employer or such other
|
36 |
+
person or entity if you are entering in this Agreement on their behalf.
|
37 |
+
|
38 |
+
"Llama 3.1" means the foundational large language models and software and
|
39 |
+
algorithms, including machine-learning model code, trained model weights,
|
40 |
+
inference-enabling code, training-enabling code, fine-tuning enabling code and
|
41 |
+
other elements of the foregoing distributed by Meta at
|
42 |
+
https://llama.meta.com/llama-downloads.
|
43 |
+
|
44 |
+
"Llama Materials" means, collectively, Meta’s proprietary Llama 3.1 and
|
45 |
+
Documentation (and any portion thereof) made available under this Agreement.
|
46 |
+
|
47 |
+
"Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or,
|
48 |
+
if you are an entity, your principal place of business is in the EEA or
|
49 |
+
Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA
|
50 |
+
or Switzerland).
|
51 |
+
|
52 |
+
1. License Rights and Redistribution.
|
53 |
+
|
54 |
+
a. Grant of Rights. You are granted a non-exclusive, worldwide,
|
55 |
+
non-transferable and royalty-free limited license under Meta’s intellectual
|
56 |
+
property or other rights owned by Meta embodied in the Llama Materials to use,
|
57 |
+
reproduce, distribute, copy, create derivative works of, and make
|
58 |
+
modifications to the Llama Materials.
|
59 |
+
|
60 |
+
b. Redistribution and Use.
|
61 |
+
|
62 |
+
i. If you distribute or make available the Llama Materials (or any derivative
|
63 |
+
works thereof), or a product or service (including another AI model) that
|
64 |
+
contains any of them, you shall (A) provide a copy of this Agreement with any
|
65 |
+
such Llama Materials; and (B) prominently display “Built with Llama” on a
|
66 |
+
related website, user interface, blogpost, about page, or product
|
67 |
+
documentation. If you use the Llama Materials or any outputs or results of the
|
68 |
+
Llama Materials to create, train, fine tune, or otherwise improve an AI model,
|
69 |
+
which is distributed or made available, you shall also include “Llama” at the
|
70 |
+
beginning of any such AI model name.
|
71 |
+
|
72 |
+
ii. If you receive Llama Materials, or any derivative works thereof, from a
|
73 |
+
Licensee as part of an integrated end user product, then Section 2 of this
|
74 |
+
Agreement will not apply to you.
|
75 |
+
|
76 |
+
iii. You must retain in all copies of the Llama Materials that you distribute
|
77 |
+
the following attribution notice within a “Notice” text file distributed as a
|
78 |
+
part of such copies: “Llama 3.1 is licensed under the Llama 3.1 Community
|
79 |
+
License, Copyright © Meta Platforms, Inc. All Rights Reserved.”
|
80 |
+
|
81 |
+
iv. Your use of the Llama Materials must comply with applicable laws and
|
82 |
+
regulations (including trade compliance laws and regulations) and adhere to
|
83 |
+
the Acceptable Use Policy for the Llama Materials (available at
|
84 |
+
https://llama.meta.com/llama3_1/use-policy), which is hereby incorporated by
|
85 |
+
reference into this Agreement.
|
86 |
+
|
87 |
+
2. Additional Commercial Terms. If, on the Llama 3.1 version release date, the
|
88 |
+
monthly active users of the products or services made available by or for
|
89 |
+
Licensee, or Licensee’s affiliates, is greater than 700 million monthly active
|
90 |
+
users in the preceding calendar month, you must request a license from Meta,
|
91 |
+
which Meta may grant to you in its sole discretion, and you are not authorized
|
92 |
+
to exercise any of the rights under this Agreement unless or until Meta
|
93 |
+
otherwise expressly grants you such rights.
|
94 |
+
|
95 |
+
3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA
|
96 |
+
MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS”
|
97 |
+
BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF
|
98 |
+
ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY
|
99 |
+
WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A
|
100 |
+
PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE
|
101 |
+
APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME ANY
|
102 |
+
RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND
|
103 |
+
RESULTS.
|
104 |
+
|
105 |
+
4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE
|
106 |
+
UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS
|
107 |
+
LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS
|
108 |
+
OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE
|
109 |
+
DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY
|
110 |
+
OF ANY OF THE FOREGOING.
|
111 |
+
|
112 |
+
5. Intellectual Property.
|
113 |
+
|
114 |
+
a. No trademark licenses are granted under this Agreement, and in connection
|
115 |
+
with the Llama Materials, neither Meta nor Licensee may use any name or mark
|
116 |
+
owned by or associated with the other or any of its affiliates, except as
|
117 |
+
required for reasonable and customary use in describing and redistributing the
|
118 |
+
Llama Materials or as set forth in this Section 5(a). Meta hereby grants you a
|
119 |
+
license to use “Llama” (the “Mark”) solely as required to comply with the last
|
120 |
+
sentence of Section 1.b.i. You will comply with Meta’s brand guidelines
|
121 |
+
(currently accessible at
|
122 |
+
https://about.meta.com/brand/resources/meta/company-brand/ ). All goodwill
|
123 |
+
arising out of your use of the Mark will inure to the benefit of Meta.
|
124 |
+
|
125 |
+
b. Subject to Meta’s ownership of Llama Materials and derivatives made by or
|
126 |
+
for Meta, with respect to any derivative works and modifications of the Llama
|
127 |
+
Materials that are made by you, as between you and Meta, you are and will be
|
128 |
+
the owner of such derivative works and modifications.
|
129 |
+
|
130 |
+
c. If you institute litigation or other proceedings against Meta or any entity
|
131 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that the Llama
|
132 |
+
Materials or Llama 3.1 outputs or results, or any portion of any of the
|
133 |
+
foregoing, constitutes infringement of intellectual property or other rights
|
134 |
+
owned or licensable by you, then any licenses granted to you under this
|
135 |
+
Agreement shall terminate as of the date such litigation or claim is filed or
|
136 |
+
instituted. You will indemnify and hold harmless Meta from and against any
|
137 |
+
claim by any third party arising out of or related to your use or distribution
|
138 |
+
of the Llama Materials.
|
139 |
+
|
140 |
+
6. Term and Termination. The term of this Agreement will commence upon your
|
141 |
+
acceptance of this Agreement or access to the Llama Materials and will
|
142 |
+
continue in full force and effect until terminated in accordance with the
|
143 |
+
terms and conditions herein. Meta may terminate this Agreement if you are in
|
144 |
+
breach of any term or condition of this Agreement. Upon termination of this
|
145 |
+
Agreement, you shall delete and cease use of the Llama Materials. Sections 3,
|
146 |
+
4 and 7 shall survive the termination of this Agreement.
|
147 |
+
|
148 |
+
7. Governing Law and Jurisdiction. This Agreement will be governed and
|
149 |
+
construed under the laws of the State of California without regard to choice
|
150 |
+
of law principles, and the UN Convention on Contracts for the International
|
151 |
+
Sale of Goods does not apply to this Agreement. The courts of California shall
|
152 |
+
have exclusive jurisdiction of any dispute arising out of this Agreement.
|
153 |
+
|
154 |
+
### Llama 3.1 Acceptable Use Policy
|
155 |
+
|
156 |
+
Meta is committed to promoting safe and fair use of its tools and features,
|
157 |
+
including Llama 3.1. If you access or use Llama 3.1, you agree to this
|
158 |
+
Acceptable Use Policy (“Policy”). The most recent copy of this policy can be
|
159 |
+
found at
|
160 |
+
[https://llama.meta.com/llama3_1/use-policy](https://llama.meta.com/llama3_1/use-policy)
|
161 |
+
|
162 |
+
#### Prohibited Uses
|
163 |
+
|
164 |
+
We want everyone to use Llama 3.1 safely and responsibly. You agree you will
|
165 |
+
not use, or allow others to use, Llama 3.1 to:
|
166 |
+
1. Violate the law or others’ rights, including to:
|
167 |
+
1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
|
168 |
+
1. Violence or terrorism
|
169 |
+
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
|
170 |
+
3. Human trafficking, exploitation, and sexual violence
|
171 |
+
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.
|
172 |
+
5. Sexual solicitation
|
173 |
+
6. Any other criminal activity
|
174 |
+
3. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
|
175 |
+
4. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services
|
176 |
+
5. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
|
177 |
+
6. Collect, process, disclose, generate, or infer health, demographic, or other sensitive personal or private information about individuals without rights and consents required by applicable laws
|
178 |
+
7. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama Materials
|
179 |
+
8. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system
|
180 |
+
2. Engage in, promote, incite, facilitate, or assist in the planning or
|
181 |
+
development of activities that present a risk of death or bodily harm to
|
182 |
+
individuals, including use of Llama 3.1 related to the following:
|
183 |
+
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
|
184 |
+
2. Guns and illegal weapons (including weapon development)
|
185 |
+
3. Illegal drugs and regulated/controlled substances
|
186 |
+
4. Operation of critical infrastructure, transportation technologies, or heavy machinery
|
187 |
+
5. Self-harm or harm to others, including suicide, cutting, and eating disorders
|
188 |
+
6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
|
189 |
+
3. Intentionally deceive or mislead others, including use of Llama 3.1 related
|
190 |
+
to the following:
|
191 |
+
1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
|
192 |
+
2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
|
193 |
+
3. Generating, promoting, or further distributing spam
|
194 |
+
4. Impersonating another individual without consent, authorization, or legal right
|
195 |
+
5. Representing that the use of Llama 3.1 or outputs are human-generated
|
196 |
+
6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
|
197 |
+
4. Fail to appropriately disclose to end users any known dangers of your AI
|
198 |
+
system
|
199 |
+
|
200 |
+
Please report any violation of this Policy, software “bug,” or other problems
|
201 |
+
that could lead to a violation of this Policy through one of the following
|
202 |
+
means:
|
203 |
+
* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://github.com/meta-llama/llama-models/issues)
|
204 |
+
* Reporting risky content generated by the model:
|
205 |
+
developers.facebook.com/llama_output_feedback
|
206 |
+
* Reporting bugs and security concerns: facebook.com/whitehat/info
|
207 |
+
* Reporting violations of the Acceptable Use Policy or unlicensed uses of Meta Llama 3: LlamaUseReport@meta.com
|
208 |
extra_gated_fields:
|
209 |
First Name: text
|
210 |
Last Name: text
|
|
|
221 |
- Reporter
|
222 |
- Other
|
223 |
geo: ip_location
|
224 |
+
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
|
225 |
+
extra_gated_description: >-
|
226 |
+
The information you provide will be collected, stored, processed and shared in
|
227 |
+
accordance with the [Meta Privacy
|
228 |
+
Policy](https://www.facebook.com/privacy/policy/).
|
|
|
229 |
extra_gated_button_content: Submit
|
230 |
+
library_name: transformers
|
231 |
---
|
232 |
|
233 |
+
# Disclaimer and Requirements
|
234 |
+
|
235 |
+
This model is a clone of [**meta-llama/Meta-Llama-3.1-8B-Instruct**](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) compressed using ZipNN. Compressed losslessly to 67% its original size, ZipNN saved ~6GB in storage and potentially ~21PB in data transfer **monthly**.
|
236 |
+
|
237 |
+
### Requirement
|
238 |
+
|
239 |
+
In order to use the model, ZipNN is necessary:
|
240 |
+
```bash
|
241 |
+
pip install zipnn
|
242 |
+
```
|
243 |
+
|
244 |
+
### Use This Model
|
245 |
+
```python
|
246 |
+
# Use a pipeline as a high-level helper
|
247 |
+
from transformers import pipeline
|
248 |
+
from zipnn import zipnn_hf
|
249 |
+
|
250 |
+
zipnn_hf()
|
251 |
+
|
252 |
+
messages = [
|
253 |
+
{"role": "user", "content": "Who are you?"},
|
254 |
+
]
|
255 |
+
pipe = pipeline("text-generation", model="royleibov/Llama-3.1-8B-ZipNN-Compressed")
|
256 |
+
pipe(messages)
|
257 |
+
```
|
258 |
+
```python
|
259 |
+
# Load model directly
|
260 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
261 |
+
from zipnn import zipnn_hf
|
262 |
+
|
263 |
+
zipnn_hf()
|
264 |
+
|
265 |
+
tokenizer = AutoTokenizer.from_pretrained("royleibov/Llama-3.1-8B-ZipNN-Compressed")
|
266 |
+
model = AutoModelForCausalLM.from_pretrained("royleibov/Llama-3.1-8B-ZipNN-Compressed")
|
267 |
+
```
|
268 |
+
### ZipNN
|
269 |
+
ZipNN also allows you to seemlessly save local disk space in your cache after the model is downloaded.
|
270 |
+
|
271 |
+
To compress the cached model, simply run:
|
272 |
+
```bash
|
273 |
+
python zipnn_compress_path.py safetensors --model royleibov/Llama-3.1-8B-ZipNN-Compressed --hf_cache
|
274 |
+
```
|
275 |
+
|
276 |
+
The model will be decompressed automatically and safely as long as `zipnn_hf()` is added at the top of the file like in the [example above](#use-this-model).
|
277 |
+
|
278 |
+
To decompress manualy, simply run:
|
279 |
+
```bash
|
280 |
+
python zipnn_decompress_path.py --model royleibov/Llama-3.1-8B-ZipNN-Compressed --hf_cache
|
281 |
+
```
|
282 |
+
|
283 |
+
|
284 |
## Model Information
|
285 |
|
286 |
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.
|
|
|
392 |
```python
|
393 |
import transformers
|
394 |
import torch
|
395 |
+
from zipnn import zipnn_hf
|
396 |
+
|
397 |
+
zipnn_hf()
|
398 |
|
399 |
+
model_id = "royleibov/Llama-3.1-8B-ZipNN-Compressed"
|
400 |
|
401 |
pipeline = transformers.pipeline(
|
402 |
"text-generation",
|
|
|
472 |
To download Original checkpoints, see the example command below leveraging `huggingface-cli`:
|
473 |
|
474 |
```
|
475 |
+
huggingface-cli download royleibov/Llama-3.1-8B-ZipNN-Compressed --include "original/*" --local-dir Meta-Llama-3.1-8B-Instruct
|
476 |
```
|
477 |
|
478 |
## Hardware and Software
|
|
|
1352 |
|
1353 |
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.
|
1354 |
|
1355 |
+
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.
|