RichardErkhov
commited on
Commit
•
6fc3f2a
1
Parent(s):
6654769
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Quantization made by Richard Erkhov.
|
2 |
+
|
3 |
+
[Github](https://github.com/RichardErkhov)
|
4 |
+
|
5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
6 |
+
|
7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
8 |
+
|
9 |
+
|
10 |
+
CodeLlama-34b-hf - GGUF
|
11 |
+
- Model creator: https://huggingface.co/meta-llama/
|
12 |
+
- Original model: https://huggingface.co/meta-llama/CodeLlama-34b-hf/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [CodeLlama-34b-hf.Q2_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q2_K.gguf) | Q2_K | 11.65GB |
|
18 |
+
| [CodeLlama-34b-hf.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.IQ3_XS.gguf) | IQ3_XS | 12.93GB |
|
19 |
+
| [CodeLlama-34b-hf.IQ3_S.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.IQ3_S.gguf) | IQ3_S | 13.65GB |
|
20 |
+
| [CodeLlama-34b-hf.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q3_K_S.gguf) | Q3_K_S | 13.6GB |
|
21 |
+
| [CodeLlama-34b-hf.IQ3_M.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.IQ3_M.gguf) | IQ3_M | 14.18GB |
|
22 |
+
| [CodeLlama-34b-hf.Q3_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q3_K.gguf) | Q3_K | 15.19GB |
|
23 |
+
| [CodeLlama-34b-hf.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q3_K_M.gguf) | Q3_K_M | 15.19GB |
|
24 |
+
| [CodeLlama-34b-hf.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q3_K_L.gguf) | Q3_K_L | 16.55GB |
|
25 |
+
| [CodeLlama-34b-hf.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.IQ4_XS.gguf) | IQ4_XS | 16.99GB |
|
26 |
+
| [CodeLlama-34b-hf.Q4_0.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q4_0.gguf) | Q4_0 | 17.74GB |
|
27 |
+
| [CodeLlama-34b-hf.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.IQ4_NL.gguf) | IQ4_NL | 17.92GB |
|
28 |
+
| [CodeLlama-34b-hf.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q4_K_S.gguf) | Q4_K_S | 17.87GB |
|
29 |
+
| [CodeLlama-34b-hf.Q4_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q4_K.gguf) | Q4_K | 18.83GB |
|
30 |
+
| [CodeLlama-34b-hf.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q4_K_M.gguf) | Q4_K_M | 18.83GB |
|
31 |
+
| [CodeLlama-34b-hf.Q4_1.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q4_1.gguf) | Q4_1 | 19.69GB |
|
32 |
+
| [CodeLlama-34b-hf.Q5_0.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q5_0.gguf) | Q5_0 | 21.64GB |
|
33 |
+
| [CodeLlama-34b-hf.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q5_K_S.gguf) | Q5_K_S | 21.64GB |
|
34 |
+
| [CodeLlama-34b-hf.Q5_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q5_K.gguf) | Q5_K | 22.2GB |
|
35 |
+
| [CodeLlama-34b-hf.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q5_K_M.gguf) | Q5_K_M | 22.2GB |
|
36 |
+
| [CodeLlama-34b-hf.Q5_1.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q5_1.gguf) | Q5_1 | 23.59GB |
|
37 |
+
| [CodeLlama-34b-hf.Q6_K.gguf](https://huggingface.co/RichardErkhov/meta-llama_-_CodeLlama-34b-hf-gguf/blob/main/CodeLlama-34b-hf.Q6_K.gguf) | Q6_K | 25.78GB |
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
Original model description:
|
43 |
+
---
|
44 |
+
extra_gated_heading: You need to share contact information with Meta to access this model
|
45 |
+
extra_gated_prompt: >-
|
46 |
+
### LLAMA 2 COMMUNITY LICENSE AGREEMENT
|
47 |
+
|
48 |
+
"Agreement" means the terms and conditions for use, reproduction, distribution
|
49 |
+
and modification of the Llama Materials set forth herein.
|
50 |
+
"Documentation" means the specifications, manuals and documentation
|
51 |
+
accompanying Llama 2 distributed by Meta at
|
52 |
+
https://ai.meta.com/resources/models-and-libraries/llama-downloads/.
|
53 |
+
"Licensee" or "you" means you, or your employer or any other person or entity
|
54 |
+
(if you are entering into this Agreement on such person or entity's behalf),
|
55 |
+
of the age required under applicable laws, rules or regulations to provide
|
56 |
+
legal consent and that has legal authority to bind your employer or such other
|
57 |
+
person or entity if you are entering in this Agreement on their behalf.
|
58 |
+
"Llama 2" means the foundational large language models and software and
|
59 |
+
algorithms, including machine-learning model code, trained model weights,
|
60 |
+
inference-enabling code, training-enabling code, fine-tuning enabling code and
|
61 |
+
other elements of the foregoing distributed by Meta at
|
62 |
+
ai.meta.com/resources/models-and-libraries/llama-downloads/.
|
63 |
+
"Llama Materials" means, collectively, Meta's proprietary Llama 2 and
|
64 |
+
documentation (and any portion thereof) made available under this Agreement.
|
65 |
+
"Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or,
|
66 |
+
if you are an entity, your principal place of business is in the EEA or
|
67 |
+
Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA
|
68 |
+
or Switzerland).
|
69 |
+
By clicking "I Accept" below or by using or distributing any portion or
|
70 |
+
element of the Llama Materials, you agree to be bound by this Agreement.
|
71 |
+
1. License Rights and Redistribution.
|
72 |
+
a. Grant of Rights. You are granted a non-exclusive, worldwide, non-
|
73 |
+
transferable and royalty-free limited license under Meta's intellectual
|
74 |
+
property or other rights owned by Meta embodied in the Llama Materials to
|
75 |
+
use, reproduce, distribute, copy, create derivative works of, and make
|
76 |
+
modifications to the Llama Materials.
|
77 |
+
|
78 |
+
b. Redistribution and Use.
|
79 |
+
i. If you distribute or make the Llama Materials, or any derivative works
|
80 |
+
thereof, available to a third party, you shall provide a copy of this
|
81 |
+
Agreement to such third party.
|
82 |
+
ii. If you receive Llama Materials, or any derivative works thereof, from a
|
83 |
+
Licensee as part of an integrated end user product, then Section 2 of this
|
84 |
+
Agreement will not apply to you.
|
85 |
+
iii. You must retain in all copies of the Llama Materials that you distribute
|
86 |
+
the following attribution notice within a "Notice" text file distributed as a
|
87 |
+
part of such copies: "Llama 2 is licensed under the LLAMA 2 Community
|
88 |
+
License, Copyright (c) Meta Platforms, Inc. All Rights Reserved."
|
89 |
+
iv. Your use of the Llama Materials must comply with applicable laws and
|
90 |
+
regulations (including trade compliance laws and regulations) and adhere to
|
91 |
+
the Acceptable Use Policy for the Llama Materials (available at
|
92 |
+
https://ai.meta.com/llama/use-policy), which is hereby incorporated by
|
93 |
+
reference into this Agreement.
|
94 |
+
v. You will not use the Llama Materials or any output or results of the Llama
|
95 |
+
Materials to improve any other large language model (excluding Llama 2 or
|
96 |
+
derivative works thereof).
|
97 |
+
2. Additional Commercial Terms. If, on the Llama 2 version release date, the
|
98 |
+
monthly active users of the products or services made available by or for
|
99 |
+
Licensee, or Licensee's affiliates, is greater than 700 million monthly
|
100 |
+
active users in the preceding calendar month, you must request a license from
|
101 |
+
Meta, which Meta may grant to you in its sole discretion, and you are not
|
102 |
+
authorized to exercise any of the rights under this Agreement unless or until
|
103 |
+
Meta otherwise expressly grants you such rights.
|
104 |
+
3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA
|
105 |
+
MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN "AS IS"
|
106 |
+
BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
|
107 |
+
WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,
|
108 |
+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY
|
109 |
+
RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING
|
110 |
+
THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE
|
111 |
+
LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.
|
112 |
+
4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE
|
113 |
+
UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE,
|
114 |
+
PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST
|
115 |
+
PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR
|
116 |
+
PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE
|
117 |
+
POSSIBILITY OF ANY OF THE FOREGOING.
|
118 |
+
5. Intellectual Property.
|
119 |
+
a. No trademark licenses are granted under this Agreement, and in connection
|
120 |
+
with the Llama Materials, neither Meta nor Licensee may use any name or mark
|
121 |
+
owned by or associated with the other or any of its affiliates, except as
|
122 |
+
required for reasonable and customary use in describing and redistributing
|
123 |
+
the Llama Materials.
|
124 |
+
b. Subject to Meta's ownership of Llama Materials and derivatives made by or
|
125 |
+
for Meta, with respect to any derivative works and modifications of the Llama
|
126 |
+
Materials that are made by you, as between you and Meta, you are and will be
|
127 |
+
the owner of such derivative works and modifications.
|
128 |
+
c. If you institute litigation or other proceedings against Meta or any
|
129 |
+
entity (including a cross-claim or counterclaim in a lawsuit) alleging that
|
130 |
+
the Llama Materials or Llama 2 outputs or results, or any portion of any of
|
131 |
+
the foregoing, constitutes infringement of intellectual property or other
|
132 |
+
rights owned or licensable by you, then any licenses granted to you under
|
133 |
+
this Agreement shall terminate as of the date such litigation or claim is
|
134 |
+
filed or instituted. You will indemnify and hold harmless Meta from and
|
135 |
+
against any claim by any third party arising out of or related to your use or
|
136 |
+
distribution of the Llama Materials.
|
137 |
+
6. Term and Termination. The term of this Agreement will commence upon your
|
138 |
+
acceptance of this Agreement or access to the Llama Materials and will
|
139 |
+
continue in full force and effect until terminated in accordance with the
|
140 |
+
terms and conditions herein. Meta may terminate this Agreement if you are in
|
141 |
+
breach of any term or condition of this Agreement. Upon termination of this
|
142 |
+
Agreement, you shall delete and cease use of the Llama Materials. Sections 3,
|
143 |
+
4 and 7 shall survive the termination of this Agreement.
|
144 |
+
7. Governing Law and Jurisdiction. This Agreement will be governed and
|
145 |
+
construed under the laws of the State of California without regard to choice
|
146 |
+
of law principles, and the UN Convention on Contracts for the International
|
147 |
+
Sale of Goods does not apply to this Agreement. The courts of California
|
148 |
+
shall have exclusive jurisdiction of any dispute arising out of this
|
149 |
+
Agreement.
|
150 |
+
USE POLICY
|
151 |
+
### Llama 2 Acceptable Use Policy
|
152 |
+
Meta is committed to promoting safe and fair use of its tools and features,
|
153 |
+
including Llama 2. If you access or use Llama 2, you agree to this Acceptable
|
154 |
+
Use Policy (“Policy”). The most recent copy of this policy can be found at
|
155 |
+
[ai.meta.com/llama/use-policy](http://ai.meta.com/llama/use-policy).
|
156 |
+
#### Prohibited Uses
|
157 |
+
We want everyone to use Llama 2 safely and responsibly. You agree you will not
|
158 |
+
use, or allow others to use, Llama 2 to:
|
159 |
+
1. Violate the law or others’ rights, including to:
|
160 |
+
1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
|
161 |
+
1. Violence or terrorism
|
162 |
+
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
|
163 |
+
3. Human trafficking, exploitation, and sexual violence
|
164 |
+
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.
|
165 |
+
5. Sexual solicitation
|
166 |
+
6. Any other criminal activity
|
167 |
+
2. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
|
168 |
+
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
|
169 |
+
4. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
|
170 |
+
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
|
171 |
+
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 2 Materials
|
172 |
+
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
|
173 |
+
2. Engage in, promote, incite, facilitate, or assist in the planning or
|
174 |
+
development of activities that present a risk of death or bodily harm to
|
175 |
+
individuals, including use of Llama 2 related to the following:
|
176 |
+
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
|
177 |
+
2. Guns and illegal weapons (including weapon development)
|
178 |
+
3. Illegal drugs and regulated/controlled substances
|
179 |
+
4. Operation of critical infrastructure, transportation technologies, or heavy machinery
|
180 |
+
5. Self-harm or harm to others, including suicide, cutting, and eating disorders
|
181 |
+
6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
|
182 |
+
3. Intentionally deceive or mislead others, including use of Llama 2 related
|
183 |
+
to the following:
|
184 |
+
1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
|
185 |
+
2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
|
186 |
+
3. Generating, promoting, or further distributing spam
|
187 |
+
4. Impersonating another individual without consent, authorization, or legal right
|
188 |
+
5. Representing that the use of Llama 2 or outputs are human-generated
|
189 |
+
6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
|
190 |
+
4. Fail to appropriately disclose to end users any known dangers of your AI system
|
191 |
+
Please report any violation of this Policy, software “bug,” or other problems
|
192 |
+
that could lead to a violation of this Policy through one of the following
|
193 |
+
means:
|
194 |
+
* Reporting issues with the model:
|
195 |
+
[github.com/facebookresearch/llama](http://github.com/facebookresearch/llama)
|
196 |
+
* Reporting risky content generated by the model:
|
197 |
+
[developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)
|
198 |
+
* Reporting bugs and security concerns:
|
199 |
+
[facebook.com/whitehat/info](http://facebook.com/whitehat/info)
|
200 |
+
* Reporting violations of the Acceptable Use Policy or unlicensed uses of
|
201 |
+
Llama: [LlamaUseReport@meta.com](mailto:LlamaUseReport@meta.com)
|
202 |
+
extra_gated_fields:
|
203 |
+
First Name: text
|
204 |
+
Last Name: text
|
205 |
+
Date of birth: date_picker
|
206 |
+
Country: country
|
207 |
+
Affiliation: text
|
208 |
+
geo: ip_location
|
209 |
+
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
|
210 |
+
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/).
|
211 |
+
extra_gated_button_content: Submit
|
212 |
+
language:
|
213 |
+
- code
|
214 |
+
pipeline_tag: text-generation
|
215 |
+
tags:
|
216 |
+
- facebook
|
217 |
+
- meta
|
218 |
+
- pytorch
|
219 |
+
- llama
|
220 |
+
- llama-2
|
221 |
+
license: llama2
|
222 |
+
---
|
223 |
+
|
224 |
+
# **Code Llama**
|
225 |
+
Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 34 billion parameters. This is the repository for the base 34B version in the Hugging Face Transformers format. This model is designed for general code synthesis and understanding. Links to other models can be found in the index at the bottom.
|
226 |
+
|
227 |
+
| | Base Model | Python | Instruct |
|
228 |
+
| --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
229 |
+
| 7B | [meta-llama/CodeLlama-7b-hf](https://huggingface.co/meta-llama/CodeLlama-7b-hf) | [meta-llama/CodeLlama-7b-Python-hf](https://huggingface.co/meta-llama/CodeLlama-7b-Python-hf) | [meta-llama/CodeLlama-7b-Instruct-hf](https://huggingface.co/meta-llama/CodeLlama-7b-Instruct-hf) |
|
230 |
+
| 13B | [meta-llama/CodeLlama-13b-hf](https://huggingface.co/meta-llama/CodeLlama-13b-hf) | [meta-llama/CodeLlama-13b-Python-hf](https://huggingface.co/meta-llama/CodeLlama-13b-Python-hf) | [meta-llama/CodeLlama-13b-Instruct-hf](https://huggingface.co/meta-llama/CodeLlama-13b-Instruct-hf) |
|
231 |
+
| 34B | [meta-llama/CodeLlama-34b-hf](https://huggingface.co/meta-llama/CodeLlama-34b-hf) | [meta-llama/CodeLlama-34b-Python-hf](https://huggingface.co/meta-llama/CodeLlama-34b-Python-hf) | [meta-llama/CodeLlama-34b-Instruct-hf](https://huggingface.co/meta-llama/CodeLlama-34b-Instruct-hf) |
|
232 |
+
| 70B | [meta-llama/CodeLlama-70b-hf](https://huggingface.co/meta-llama/CodeLlama-70b-hf) | [meta-llama/CodeLlama-70b-Python-hf](https://huggingface.co/meta-llama/CodeLlama-70b-Python-hf) | [meta-llama/CodeLlama-70b-Instruct-hf](https://huggingface.co/meta-llama/CodeLlama-70b-Instruct-hf) |
|
233 |
+
|
234 |
+
## Model Use
|
235 |
+
|
236 |
+
To use this model, please make sure to install transformers:
|
237 |
+
|
238 |
+
```bash
|
239 |
+
pip install transformers.git accelerate
|
240 |
+
```
|
241 |
+
|
242 |
+
Model capabilities:
|
243 |
+
|
244 |
+
- [x] Code completion.
|
245 |
+
- [ ] Infilling.
|
246 |
+
- [ ] Instructions / chat.
|
247 |
+
- [ ] Python specialist.
|
248 |
+
|
249 |
+
|
250 |
+
```python
|
251 |
+
from transformers import AutoTokenizer
|
252 |
+
import transformers
|
253 |
+
import torch
|
254 |
+
|
255 |
+
model = "meta-llama/CodeLlama-34b-hf"
|
256 |
+
|
257 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
258 |
+
pipeline = transformers.pipeline(
|
259 |
+
"text-generation",
|
260 |
+
model=model,
|
261 |
+
torch_dtype=torch.float16,
|
262 |
+
device_map="auto",
|
263 |
+
)
|
264 |
+
|
265 |
+
sequences = pipeline(
|
266 |
+
'import socket\n\ndef ping_exponential_backoff(host: str):',
|
267 |
+
do_sample=True,
|
268 |
+
top_k=10,
|
269 |
+
temperature=0.1,
|
270 |
+
top_p=0.95,
|
271 |
+
num_return_sequences=1,
|
272 |
+
eos_token_id=tokenizer.eos_token_id,
|
273 |
+
max_length=200,
|
274 |
+
)
|
275 |
+
for seq in sequences:
|
276 |
+
print(f"Result: {seq['generated_text']}")
|
277 |
+
```
|
278 |
+
|
279 |
+
|
280 |
+
## Model Details
|
281 |
+
*Note: Use of this model is governed by the Meta license. Meta developed and publicly released the Code Llama family of large language models (LLMs).
|
282 |
+
|
283 |
+
**Model Developers** Meta
|
284 |
+
|
285 |
+
**Variations** Code Llama comes in three model sizes, and three variants:
|
286 |
+
|
287 |
+
* Code Llama: base models designed for general code synthesis and understanding
|
288 |
+
* Code Llama - Python: designed specifically for Python
|
289 |
+
* Code Llama - Instruct: for instruction following and safer deployment
|
290 |
+
|
291 |
+
All variants are available in sizes of 7B, 13B and 34B parameters.
|
292 |
+
|
293 |
+
**This repository contains the base version of the 34B parameters model.**
|
294 |
+
|
295 |
+
**Input** Models input text only.
|
296 |
+
|
297 |
+
**Output** Models generate text only.
|
298 |
+
|
299 |
+
**Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture.
|
300 |
+
|
301 |
+
**Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
|
302 |
+
|
303 |
+
**Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released as we improve model safety with community feedback.
|
304 |
+
|
305 |
+
**License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/)
|
306 |
+
|
307 |
+
**Research Paper** More information can be found in the paper "[Code Llama: Open Foundation Models for Code](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/)" or its [arXiv page](https://arxiv.org/abs/2308.12950).
|
308 |
+
|
309 |
+
## Intended Use
|
310 |
+
**Intended Use Cases** Code Llama and its variants is intended for commercial and research use in English and relevant programming languages. The base model Code Llama can be adapted for a variety of code synthesis and understanding tasks, Code Llama - Python is designed specifically to handle the Python programming language, and Code Llama - Instruct is intended to be safer to use for code assistant and generation applications.
|
311 |
+
|
312 |
+
**Out-of-Scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Code Llama and its variants.
|
313 |
+
|
314 |
+
## Hardware and Software
|
315 |
+
**Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
|
316 |
+
|
317 |
+
**Carbon Footprint** In aggregate, training all 9 Code Llama models required 400K GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 65.3 tCO2eq, 100% of which were offset by Meta’s sustainability program.
|
318 |
+
|
319 |
+
## Training Data
|
320 |
+
|
321 |
+
All experiments reported here and the released models have been trained and fine-tuned using the same data as Llama 2 with different weights (see Section 2 and Table 1 in the [research paper](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/) for details).
|
322 |
+
|
323 |
+
## Evaluation Results
|
324 |
+
|
325 |
+
See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
|
326 |
+
|
327 |
+
|
328 |
+
## Ethical Considerations and Limitations
|
329 |
+
|
330 |
+
Code Llama and its variants are a new technology that carries risks with 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, Code Llama’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of Code Llama, developers should perform safety testing and tuning tailored to their specific applications of the model.
|
331 |
+
|
332 |
+
Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-use-guide](https://ai.meta.com/llama/responsible-use-guide).
|
333 |
+
|