Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,351 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: https://huggingface.co/codellama/CodeLlama-13b-hf
|
3 |
+
inference: false
|
4 |
+
language:
|
5 |
+
- code
|
6 |
+
license: llama2
|
7 |
+
model_creator: Meta
|
8 |
+
model_name: CodeLlama 13B
|
9 |
+
model_type: llama
|
10 |
+
pipeline_tag: text-generation
|
11 |
+
prompt_template: '{prompt}
|
12 |
+
|
13 |
+
'
|
14 |
+
quantized_by: TheBloke
|
15 |
+
tags:
|
16 |
+
- llama-2
|
17 |
+
---
|
18 |
+
|
19 |
+
<!-- header start -->
|
20 |
+
<!-- 200823 -->
|
21 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
22 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
23 |
+
</div>
|
24 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
25 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
26 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
27 |
+
</div>
|
28 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
29 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
<div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
|
33 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
34 |
+
<!-- header end -->
|
35 |
+
|
36 |
+
# CodeLlama 13B - AWQ
|
37 |
+
- Model creator: [Meta](https://huggingface.co/meta-llama)
|
38 |
+
- Original model: [CodeLlama 13B](https://huggingface.co/codellama/CodeLlama-13b-hf)
|
39 |
+
|
40 |
+
<!-- description start -->
|
41 |
+
## Description
|
42 |
+
|
43 |
+
This repo contains AWQ model files for [Meta's CodeLlama 13B](https://huggingface.co/codellama/CodeLlama-13b-hf).
|
44 |
+
|
45 |
+
|
46 |
+
### About AWQ
|
47 |
+
|
48 |
+
AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference.
|
49 |
+
|
50 |
+
It is also now supported by continuous batching server [vLLM](https://github.com/vllm-project/vllm), allowing use of AWQ models for high-throughput concurrent inference in multi-user server scenarios. Note that, at the time of writing, overall throughput is still lower than running vLLM with unquantised models, however using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB.
|
51 |
+
<!-- description end -->
|
52 |
+
<!-- repositories-available start -->
|
53 |
+
## Repositories available
|
54 |
+
|
55 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/CodeLlama-13B-AWQ)
|
56 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-13B-GPTQ)
|
57 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-13B-GGUF)
|
58 |
+
* [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/codellama/CodeLlama-13b-hf)
|
59 |
+
<!-- repositories-available end -->
|
60 |
+
|
61 |
+
<!-- prompt-template start -->
|
62 |
+
## Prompt template: None
|
63 |
+
|
64 |
+
```
|
65 |
+
{prompt}
|
66 |
+
|
67 |
+
```
|
68 |
+
|
69 |
+
<!-- prompt-template end -->
|
70 |
+
|
71 |
+
|
72 |
+
<!-- README_AWQ.md-provided-files start -->
|
73 |
+
## Provided files and AWQ parameters
|
74 |
+
|
75 |
+
For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM.
|
76 |
+
|
77 |
+
Models are released as sharded safetensors files.
|
78 |
+
|
79 |
+
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|
80 |
+
| ------ | ---- | -- | ----------- | ------- | ---- |
|
81 |
+
| [main](https://huggingface.co/TheBloke/CodeLlama-13B-AWQ/tree/main) | 4 | 128 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.25 GB
|
82 |
+
|
83 |
+
<!-- README_AWQ.md-provided-files end -->
|
84 |
+
|
85 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
86 |
+
## Serving this model from vLLM
|
87 |
+
|
88 |
+
Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
|
89 |
+
|
90 |
+
- When using vLLM as a server, pass the `--quantization awq` parameter, for example:
|
91 |
+
|
92 |
+
```shell
|
93 |
+
python3 python -m vllm.entrypoints.api_server --model TheBloke/CodeLlama-13B-GPTQ --quantization awq
|
94 |
+
```
|
95 |
+
|
96 |
+
When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
|
97 |
+
|
98 |
+
```python
|
99 |
+
from vllm import LLM, SamplingParams
|
100 |
+
|
101 |
+
prompts = [
|
102 |
+
"Hello, my name is",
|
103 |
+
"The president of the United States is",
|
104 |
+
"The capital of France is",
|
105 |
+
"The future of AI is",
|
106 |
+
]
|
107 |
+
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
|
108 |
+
|
109 |
+
llm = LLM(model="TheBloke/CodeLlama-13B-AWQ", quantization="awq")
|
110 |
+
|
111 |
+
outputs = llm.generate(prompts, sampling_params)
|
112 |
+
|
113 |
+
# Print the outputs.
|
114 |
+
for output in outputs:
|
115 |
+
prompt = output.prompt
|
116 |
+
generated_text = output.outputs[0].text
|
117 |
+
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
|
118 |
+
```
|
119 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
120 |
+
|
121 |
+
<!-- README_AWQ.md-use-from-python start -->
|
122 |
+
## How to use this AWQ model from Python code
|
123 |
+
|
124 |
+
### Install the necessary packages
|
125 |
+
|
126 |
+
Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later
|
127 |
+
|
128 |
+
```shell
|
129 |
+
pip3 install autoawq
|
130 |
+
```
|
131 |
+
|
132 |
+
If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
|
133 |
+
|
134 |
+
```shell
|
135 |
+
pip3 uninstall -y autoawq
|
136 |
+
git clone https://github.com/casper-hansen/AutoAWQ
|
137 |
+
cd AutoAWQ
|
138 |
+
pip3 install .
|
139 |
+
```
|
140 |
+
|
141 |
+
### You can then try the following example code
|
142 |
+
|
143 |
+
```python
|
144 |
+
from awq import AutoAWQForCausalLM
|
145 |
+
from transformers import AutoTokenizer
|
146 |
+
|
147 |
+
model_name_or_path = "TheBloke/CodeLlama-13B-AWQ"
|
148 |
+
|
149 |
+
# Load model
|
150 |
+
model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
|
151 |
+
trust_remote_code=True, safetensors=True)
|
152 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True)
|
153 |
+
|
154 |
+
prompt = "Tell me about AI"
|
155 |
+
prompt_template=f'''{prompt}
|
156 |
+
|
157 |
+
'''
|
158 |
+
|
159 |
+
print("\n\n*** Generate:")
|
160 |
+
|
161 |
+
tokens = tokenizer(
|
162 |
+
prompt_template,
|
163 |
+
return_tensors='pt'
|
164 |
+
).input_ids.cuda()
|
165 |
+
|
166 |
+
# Generate output
|
167 |
+
generation_output = model.generate(
|
168 |
+
tokens,
|
169 |
+
do_sample=True,
|
170 |
+
temperature=0.7,
|
171 |
+
top_p=0.95,
|
172 |
+
top_k=40,
|
173 |
+
max_new_tokens=512
|
174 |
+
)
|
175 |
+
|
176 |
+
print("Output: ", tokenizer.decode(generation_output[0]))
|
177 |
+
|
178 |
+
# Inference can also be done using transformers' pipeline
|
179 |
+
from transformers import pipeline
|
180 |
+
|
181 |
+
print("*** Pipeline:")
|
182 |
+
pipe = pipeline(
|
183 |
+
"text-generation",
|
184 |
+
model=model,
|
185 |
+
tokenizer=tokenizer,
|
186 |
+
max_new_tokens=512,
|
187 |
+
do_sample=True,
|
188 |
+
temperature=0.7,
|
189 |
+
top_p=0.95,
|
190 |
+
top_k=40,
|
191 |
+
repetition_penalty=1.1
|
192 |
+
)
|
193 |
+
|
194 |
+
print(pipe(prompt_template)[0]['generated_text'])
|
195 |
+
```
|
196 |
+
<!-- README_AWQ.md-use-from-python end -->
|
197 |
+
|
198 |
+
<!-- README_AWQ.md-compatibility start -->
|
199 |
+
## Compatibility
|
200 |
+
|
201 |
+
The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm).
|
202 |
+
|
203 |
+
[Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is not yet compatible with AWQ, but a PR is open which should bring support soon: [TGI PR #781](https://github.com/huggingface/text-generation-inference/issues/781).
|
204 |
+
<!-- README_AWQ.md-compatibility end -->
|
205 |
+
|
206 |
+
<!-- footer start -->
|
207 |
+
<!-- 200823 -->
|
208 |
+
## Discord
|
209 |
+
|
210 |
+
For further support, and discussions on these models and AI in general, join us at:
|
211 |
+
|
212 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
213 |
+
|
214 |
+
## Thanks, and how to contribute
|
215 |
+
|
216 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
217 |
+
|
218 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
219 |
+
|
220 |
+
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
|
221 |
+
|
222 |
+
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
|
223 |
+
|
224 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
225 |
+
|
226 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
227 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
228 |
+
|
229 |
+
**Special thanks to**: Aemon Algiz.
|
230 |
+
|
231 |
+
**Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov
|
232 |
+
|
233 |
+
|
234 |
+
Thank you to all my generous patrons and donaters!
|
235 |
+
|
236 |
+
And thank you again to a16z for their generous grant.
|
237 |
+
|
238 |
+
<!-- footer end -->
|
239 |
+
|
240 |
+
# Original model card: Meta's CodeLlama 13B
|
241 |
+
|
242 |
+
# **Code Llama**
|
243 |
+
|
244 |
+
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 13B 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.
|
245 |
+
|
246 |
+
| | Base Model | Python | Instruct |
|
247 |
+
| --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
248 |
+
| 7B | [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) |
|
249 |
+
| 13B | [codellama/CodeLlama-13b-hf](https://huggingface.co/codellama/CodeLlama-13b-hf) | [codellama/CodeLlama-13b-Python-hf](https://huggingface.co/codellama/CodeLlama-13b-Python-hf) | [codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf) |
|
250 |
+
| 34B | [codellama/CodeLlama-34b-hf](https://huggingface.co/codellama/CodeLlama-34b-hf) | [codellama/CodeLlama-34b-Python-hf](https://huggingface.co/codellama/CodeLlama-34b-Python-hf) | [codellama/CodeLlama-34b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-34b-Instruct-hf) |
|
251 |
+
|
252 |
+
|
253 |
+
## Model Use
|
254 |
+
|
255 |
+
To use this model, please make sure to install transformers from `main` until the next version is released:
|
256 |
+
|
257 |
+
```bash
|
258 |
+
pip install git+https://github.com/huggingface/transformers.git@main accelerate
|
259 |
+
```
|
260 |
+
|
261 |
+
Model capabilities:
|
262 |
+
|
263 |
+
- [x] Code completion.
|
264 |
+
- [x] Infilling.
|
265 |
+
- [ ] Instructions / chat.
|
266 |
+
- [ ] Python specialist.
|
267 |
+
|
268 |
+
|
269 |
+
```python
|
270 |
+
from transformers import AutoTokenizer
|
271 |
+
import transformers
|
272 |
+
import torch
|
273 |
+
|
274 |
+
model = "codellama/CodeLlama-13b-hf"
|
275 |
+
|
276 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
277 |
+
pipeline = transformers.pipeline(
|
278 |
+
"text-generation",
|
279 |
+
model=model,
|
280 |
+
torch_dtype=torch.float16,
|
281 |
+
device_map="auto",
|
282 |
+
)
|
283 |
+
|
284 |
+
sequences = pipeline(
|
285 |
+
'import socket\n\ndef ping_exponential_backoff(host: str):',
|
286 |
+
do_sample=True,
|
287 |
+
top_k=10,
|
288 |
+
temperature=0.1,
|
289 |
+
top_p=0.95,
|
290 |
+
num_return_sequences=1,
|
291 |
+
eos_token_id=tokenizer.eos_token_id,
|
292 |
+
max_length=200,
|
293 |
+
)
|
294 |
+
for seq in sequences:
|
295 |
+
print(f"Result: {seq['generated_text']}")
|
296 |
+
```
|
297 |
+
|
298 |
+
|
299 |
+
## Model Details
|
300 |
+
*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).
|
301 |
+
|
302 |
+
**Model Developers** Meta
|
303 |
+
|
304 |
+
**Variations** Code Llama comes in three model sizes, and three variants:
|
305 |
+
|
306 |
+
* Code Llama: base models designed for general code synthesis and understanding
|
307 |
+
* Code Llama - Python: designed specifically for Python
|
308 |
+
* Code Llama - Instruct: for instruction following and safer deployment
|
309 |
+
|
310 |
+
All variants are available in sizes of 7B, 13B and 34B parameters.
|
311 |
+
|
312 |
+
**This repository contains the base version of the 13B parameters model.**
|
313 |
+
|
314 |
+
**Input** Models input text only.
|
315 |
+
|
316 |
+
**Output** Models generate text only.
|
317 |
+
|
318 |
+
**Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture.
|
319 |
+
|
320 |
+
**Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
|
321 |
+
|
322 |
+
**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.
|
323 |
+
|
324 |
+
**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/)
|
325 |
+
|
326 |
+
**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).
|
327 |
+
|
328 |
+
## Intended Use
|
329 |
+
**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.
|
330 |
+
|
331 |
+
**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.
|
332 |
+
|
333 |
+
## Hardware and Software
|
334 |
+
**Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
|
335 |
+
|
336 |
+
**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.
|
337 |
+
|
338 |
+
## Training Data
|
339 |
+
|
340 |
+
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).
|
341 |
+
|
342 |
+
## Evaluation Results
|
343 |
+
|
344 |
+
See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
|
345 |
+
|
346 |
+
|
347 |
+
## Ethical Considerations and Limitations
|
348 |
+
|
349 |
+
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.
|
350 |
+
|
351 |
+
Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-user-guide](https://ai.meta.com/llama/responsible-user-guide).
|