TheBloke commited on
Commit
9314855
1 Parent(s): 5364ec9

Initial GPTQ model commit

Browse files
Files changed (1) hide show
  1. README.md +58 -103
README.md CHANGED
@@ -1,14 +1,16 @@
1
  ---
2
  inference: false
 
 
3
  license: llama2
4
  model_creator: Meta
5
- model_link: https://ai.meta.com/resources/models-and-libraries/llama-downloads
6
  model_name: CodeLlama 13B Instruct
7
  model_type: llama
 
8
  quantized_by: TheBloke
9
  tags:
10
  - llama-2
11
- - codellama
12
  ---
13
 
14
  <!-- header start -->
@@ -30,11 +32,11 @@ tags:
30
 
31
  # CodeLlama 13B Instruct - GPTQ
32
  - Model creator: [Meta](https://huggingface.co/meta-llama)
33
- - Original model: [CodeLlama 13B Instruct](https://ai.meta.com/resources/models-and-libraries/llama-downloads)
34
 
35
  ## Description
36
 
37
- This repo contains GPTQ model files for [Meta's CodeLlama 13B Instruct](https://ai.meta.com/resources/models-and-libraries/llama-downloads).
38
 
39
  Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
40
 
@@ -43,14 +45,12 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
43
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ)
44
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GGUF)
45
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GGML)
46
- * [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-fp16)
47
 
48
- ## Prompt template: CodeLlama
49
 
50
  ```
51
- [INST] Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```:
52
- {prompt}
53
- [/INST]
54
  ```
55
 
56
  ## Provided files and GPTQ parameters
@@ -76,12 +76,12 @@ All GPTQ files are made with AutoGPTQ.
76
 
77
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
78
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
79
- | [main](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
80
- | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
81
- | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
82
- | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
83
- | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
84
- | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
85
 
86
  ## How to download from branches
87
 
@@ -141,7 +141,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
141
 
142
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
143
  use_safetensors=True,
144
- trust_remote_code=False,
145
  device="cuda:0",
146
  use_triton=use_triton,
147
  quantize_config=None)
@@ -153,15 +153,13 @@ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
153
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
154
  revision="gptq-4bit-32g-actorder_True",
155
  use_safetensors=True,
156
- trust_remote_code=False,
157
  device="cuda:0",
158
  quantize_config=None)
159
  """
160
 
161
  prompt = "Tell me about AI"
162
- prompt_template=f'''[INST] Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```:
163
- {prompt}
164
- [/INST]
165
  '''
166
 
167
  print("\n\n*** Generate:")
@@ -229,123 +227,80 @@ And thank you again to a16z for their generous grant.
229
 
230
  # Original model card: Meta's CodeLlama 13B Instruct
231
 
 
 
232
 
233
- <!-- header start -->
234
- <!-- 200823 -->
235
- <div style="width: auto; margin-left: auto; margin-right: auto">
236
- <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
237
- </div>
238
- <div style="display: flex; justify-content: space-between; width: 100%;">
239
- <div style="display: flex; flex-direction: column; align-items: flex-start;">
240
- <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
241
- </div>
242
- <div style="display: flex; flex-direction: column; align-items: flex-end;">
243
- <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>
244
- </div>
245
- </div>
246
- <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>
247
- <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
248
- <!-- header end -->
249
-
250
- # CodeLlama 13B-Instruct fp16
251
- - Model creator: [Meta](https://ai.meta.com/llama/)
252
-
253
- ## Description
254
 
255
- This is Transformers/HF format fp16 weights for CodeLlama 13B-Instruct. It is the result of downloading CodeLlama 13B-Instruct from [Meta](https://ai.meta.com/blog/code-llama-large-language-model-coding/) and converting to HF using `convert_llama_weights_to_hf.py`.
256
 
257
- Quantisations will be coming shortly.
258
-
259
- Please note that due to a change in the RoPE Theta value, for correct results you must load these FP16 models with `trust_remote_code=True`
260
-
261
- Credit to @emozilla for creating the necessary modelling code to achieve this!
262
-
263
- ## Prompt template: TBC
264
-
265
-
266
- <!-- footer start -->
267
- <!-- 200823 -->
268
- ## Discord
269
-
270
- For further support, and discussions on these models and AI in general, join us at:
271
 
272
- [TheBloke AI's Discord server](https://discord.gg/theblokeai)
273
-
274
- ## Thanks, and how to contribute.
275
-
276
- Thanks to the [chirper.ai](https://chirper.ai) team!
277
-
278
- 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.
279
-
280
- 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.
281
-
282
- Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
283
-
284
- * Patreon: https://patreon.com/TheBlokeAI
285
- * Ko-Fi: https://ko-fi.com/TheBlokeAI
286
-
287
- **Special thanks to**: Aemon Algiz.
288
-
289
- **Patreon special mentions**: Sam, theTransient, Jonathan Leane, Steven Wood, webtim, Johann-Peter Hartmann, Geoffrey Montalvo, Gabriel Tamborski, Willem Michiel, John Villwock, Derek Yates, Mesiah Bishop, Eugene Pentland, Pieter, Chadd, Stephen Murray, Daniel P. Andersen, terasurfer, Brandon Frisco, Thomas Belote, Sid, Nathan LeClaire, Magnesian, Alps Aficionado, Stanislav Ovsiannikov, Alex, Joseph William Delisle, Nikolai Manek, Michael Davis, Junyu Yang, K, J, Spencer Kim, Stefan Sabev, Olusegun Samson, transmissions 11, Michael Levine, Cory Kujawski, Rainer Wilmers, zynix, Kalila, Luke @flexchar, Ajan Kanaga, Mandus, vamX, Ai Maven, Mano Prime, Matthew Berman, subjectnull, Vitor Caleffi, Clay Pascal, biorpg, alfie_i, 阿明, Jeffrey Morgan, ya boyyy, Raymond Fosdick, knownsqashed, Olakabola, Leonard Tan, ReadyPlayerEmma, Enrico Ros, Dave, Talal Aujan, Illia Dulskyi, Sean Connelly, senxiiz, Artur Olbinski, Elle, Raven Klaugh, Fen Risland, Deep Realms, Imad Khwaja, Fred von Graf, Will Dee, usrbinkat, SuperWojo, Alexandros Triantafyllidis, Swaroop Kallakuri, Dan Guido, John Detwiler, Pedro Madruga, Iucharbius, Viktor Bowallius, Asp the Wyvern, Edmond Seymore, Trenton Dambrowitz, Space Cruiser, Spiking Neurons AB, Pyrater, LangChain4j, Tony Hughes, Kacper Wikieł, Rishabh Srivastava, David Ziegler, Luke Pendergrass, Andrey, Gabriel Puliatti, Lone Striker, Sebastain Graf, Pierre Kircher, Randy H, NimbleBox.ai, Vadim, danny, Deo Leter
290
-
291
-
292
- Thank you to all my generous patrons and donaters!
293
 
294
- And thank you again to a16z for their generous grant.
295
 
296
- <!-- footer end -->
 
 
 
297
 
298
- # Original model card
 
299
 
300
- # Code Llama
301
 
302
- ## **Model Details**
303
 
304
- **Model Developers** Meta AI
 
 
305
 
306
- **Variations** Code Llama comes in three model sizes, and three variants:
307
- 1) Code Llama: our base models designed for general code synthesis and understanding
308
- 2) Code Llama - Python: designed specifically for Python
309
- 3) Code Llama - Instruct: for instruction following and safer deployment
310
-
311
  All variants are available in sizes of 7B, 13B and 34B parameters.
312
 
 
 
313
  **Input** Models input text only.
314
 
315
- **Output** Models output text only.
316
 
317
- **Model Architecture** Code Llama and its variants are autoregressive language models using optimized transformer architectures. Code Llama 7B and 13B additionally support infilling text generation. All models were fine-tuned with up to 16K tokens, and support up to 100K tokens at inference time.
318
 
319
  **Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
320
 
321
- **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.
322
 
323
- **Licence** 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/).
324
 
325
  **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/)".
326
 
327
- **Where to send comments** Instructions on how to provide feedback or comments on the model can be found in the model [README](README.md), or by opening an issue in the GitHub repository ([https://github.com/facebookresearch/codellama/](https://github.com/facebookresearch/codellama/)).
328
-
329
- ## **Intended Use**
330
  **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.
331
 
332
  **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.
333
 
334
- ## **Hardware and Software**
335
- **Training Factors**
336
- We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
337
 
338
  **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.
339
 
340
- **Training data**
 
341
  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).
342
- Code Llama - Instruct uses additional instruction fine-tuning data.
343
 
344
- **Evaluation Results**
 
345
  See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
346
 
347
- ## **Ethical Considerations and Limitations**
 
 
348
  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.
349
 
350
  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).
351
-
 
1
  ---
2
  inference: false
3
+ language:
4
+ - code
5
  license: llama2
6
  model_creator: Meta
7
+ model_link: https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf
8
  model_name: CodeLlama 13B Instruct
9
  model_type: llama
10
+ pipeline_tag: text-generation
11
  quantized_by: TheBloke
12
  tags:
13
  - llama-2
 
14
  ---
15
 
16
  <!-- header start -->
 
32
 
33
  # CodeLlama 13B Instruct - GPTQ
34
  - Model creator: [Meta](https://huggingface.co/meta-llama)
35
+ - Original model: [CodeLlama 13B Instruct](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf)
36
 
37
  ## Description
38
 
39
+ This repo contains GPTQ model files for [Meta's CodeLlama 13B Instruct](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf).
40
 
41
  Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
42
 
 
45
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ)
46
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GGUF)
47
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GGML)
48
+ * [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf)
49
 
50
+ ## Prompt template: TBC
51
 
52
  ```
53
+ Info on prompt template will be added shortly.
 
 
54
  ```
55
 
56
  ## Provided files and GPTQ parameters
 
76
 
77
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
78
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
79
+ | [main](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
80
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
81
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
82
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
83
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
84
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
85
 
86
  ## How to download from branches
87
 
 
141
 
142
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
143
  use_safetensors=True,
144
+ trust_remote_code=True,
145
  device="cuda:0",
146
  use_triton=use_triton,
147
  quantize_config=None)
 
153
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
154
  revision="gptq-4bit-32g-actorder_True",
155
  use_safetensors=True,
156
+ trust_remote_code=True,
157
  device="cuda:0",
158
  quantize_config=None)
159
  """
160
 
161
  prompt = "Tell me about AI"
162
+ prompt_template=f'''Info on prompt template will be added shortly.
 
 
163
  '''
164
 
165
  print("\n\n*** Generate:")
 
227
 
228
  # Original model card: Meta's CodeLlama 13B Instruct
229
 
230
+ # **Code Llama**
231
+ 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 13 instruct-tuned 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.
232
 
233
+ | | Base Model | Python | Instruct |
234
+ | --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
235
+ | 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) |
236
+ | 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) |
237
+ | 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) |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
 
239
+ ## Model Use
240
 
241
+ To use this model, please make sure to install transformers from `main` until the next version is released:
 
 
 
 
 
 
 
 
 
 
 
 
 
242
 
243
+ ```bash
244
+ pip install git+https://github.com/huggingface/transformers.git@main accelerate
245
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
 
247
+ Model capabilities:
248
 
249
+ - [x] Code completion.
250
+ - [x] Infilling.
251
+ - [x] Instructions / chat.
252
+ - [ ] Python specialist.
253
 
254
+ ## Model Details
255
+ *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).
256
 
257
+ **Model Developers** Meta
258
 
259
+ **Variations** Code Llama comes in three model sizes, and three variants:
260
 
261
+ * Code Llama: base models designed for general code synthesis and understanding
262
+ * Code Llama - Python: designed specifically for Python
263
+ * Code Llama - Instruct: for instruction following and safer deployment
264
 
 
 
 
 
 
265
  All variants are available in sizes of 7B, 13B and 34B parameters.
266
 
267
+ **This repository contains the Instruct version of the 13B parameters model.**
268
+
269
  **Input** Models input text only.
270
 
271
+ **Output** Models generate text only.
272
 
273
+ **Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture.
274
 
275
  **Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
276
 
277
+ **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.
278
 
279
+ **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/)
280
 
281
  **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/)".
282
 
283
+ ## Intended Use
 
 
284
  **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.
285
 
286
  **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.
287
 
288
+ ## Hardware and Software
289
+ **Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
 
290
 
291
  **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.
292
 
293
+ ## Training Data
294
+
295
  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).
 
296
 
297
+ ## Evaluation Results
298
+
299
  See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
300
 
301
+
302
+ ## Ethical Considerations and Limitations
303
+
304
  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.
305
 
306
  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).