Instructions to use TheBloke/CodeLlama-13B-Python-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-13B-Python-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-13B-Python-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheBloke/CodeLlama-13B-Python-GGUF", dtype="auto") - llama-cpp-python
How to use TheBloke/CodeLlama-13B-Python-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="TheBloke/CodeLlama-13B-Python-GGUF", filename="codellama-13b-python.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use TheBloke/CodeLlama-13B-Python-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use TheBloke/CodeLlama-13B-Python-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/CodeLlama-13B-Python-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/CodeLlama-13B-Python-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
- SGLang
How to use TheBloke/CodeLlama-13B-Python-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "TheBloke/CodeLlama-13B-Python-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/CodeLlama-13B-Python-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "TheBloke/CodeLlama-13B-Python-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/CodeLlama-13B-Python-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use TheBloke/CodeLlama-13B-Python-GGUF with Ollama:
ollama run hf.co/TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
- Unsloth Studio new
How to use TheBloke/CodeLlama-13B-Python-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for TheBloke/CodeLlama-13B-Python-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for TheBloke/CodeLlama-13B-Python-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for TheBloke/CodeLlama-13B-Python-GGUF to start chatting
- Docker Model Runner
How to use TheBloke/CodeLlama-13B-Python-GGUF with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
- Lemonade
How to use TheBloke/CodeLlama-13B-Python-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.CodeLlama-13B-Python-GGUF-Q4_K_M
List all available models
lemonade list
Initial GGUF model commit
Browse files
README.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
| 1 |
---
|
| 2 |
inference: false
|
|
|
|
|
|
|
| 3 |
license: llama2
|
| 4 |
model_creator: Meta
|
| 5 |
-
model_link: https://
|
| 6 |
model_name: CodeLlama 13B Python
|
| 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 Python - GGUF
|
| 32 |
- Model creator: [Meta](https://huggingface.co/meta-llama)
|
| 33 |
-
- Original model: [CodeLlama 13B Python](https://
|
| 34 |
|
| 35 |
## Description
|
| 36 |
|
| 37 |
-
This repo contains GGUF format model files for [Meta's CodeLlama 13B Python](https://
|
| 38 |
|
| 39 |
<!-- README_GGUF.md-about-gguf start -->
|
| 40 |
### About GGUF
|
|
@@ -62,16 +64,14 @@ The clients and libraries below are expecting to add GGUF support shortly:
|
|
| 62 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-13B-Python-GPTQ)
|
| 63 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-13B-Python-GGUF)
|
| 64 |
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/CodeLlama-13B-Python-GGML)
|
| 65 |
-
* [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/
|
| 66 |
<!-- repositories-available end -->
|
| 67 |
|
| 68 |
<!-- prompt-template start -->
|
| 69 |
-
## Prompt template:
|
| 70 |
|
| 71 |
```
|
| 72 |
-
|
| 73 |
-
{prompt}
|
| 74 |
-
[/INST]
|
| 75 |
```
|
| 76 |
|
| 77 |
<!-- prompt-template end -->
|
|
@@ -178,125 +178,82 @@ And thank you again to a16z for their generous grant.
|
|
| 178 |
<!-- original-model-card start -->
|
| 179 |
# Original model card: Meta's CodeLlama 13B Python
|
| 180 |
|
|
|
|
|
|
|
| 181 |
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
<div style="display: flex; justify-content: space-between; width: 100%;">
|
| 188 |
-
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
| 189 |
-
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
| 190 |
-
</div>
|
| 191 |
-
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
| 192 |
-
<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>
|
| 193 |
-
</div>
|
| 194 |
-
</div>
|
| 195 |
-
<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>
|
| 196 |
-
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
| 197 |
-
<!-- header end -->
|
| 198 |
-
|
| 199 |
-
# CodeLlama 13B-Python fp16
|
| 200 |
-
- Model creator: [Meta](https://ai.meta.com/llama/)
|
| 201 |
-
|
| 202 |
-
## Description
|
| 203 |
|
| 204 |
-
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
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`
|
| 209 |
-
|
| 210 |
-
Credit to @emozilla for creating the necessary modelling code to achieve this!
|
| 211 |
-
|
| 212 |
-
## Prompt template: TBC
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
<!-- footer start -->
|
| 216 |
-
<!-- 200823 -->
|
| 217 |
-
## Discord
|
| 218 |
-
|
| 219 |
-
For further support, and discussions on these models and AI in general, join us at:
|
| 220 |
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
Thanks to the [chirper.ai](https://chirper.ai) team!
|
| 226 |
-
|
| 227 |
-
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.
|
| 228 |
-
|
| 229 |
-
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.
|
| 230 |
-
|
| 231 |
-
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
| 232 |
-
|
| 233 |
-
* Patreon: https://patreon.com/TheBlokeAI
|
| 234 |
-
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
| 235 |
-
|
| 236 |
-
**Special thanks to**: Aemon Algiz.
|
| 237 |
-
|
| 238 |
-
**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
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
Thank you to all my generous patrons and donaters!
|
| 242 |
|
| 243 |
-
|
| 244 |
|
| 245 |
-
|
|
|
|
|
|
|
|
|
|
| 246 |
|
| 247 |
-
#
|
|
|
|
| 248 |
|
| 249 |
-
|
| 250 |
|
| 251 |
-
|
| 252 |
|
| 253 |
-
*
|
|
|
|
|
|
|
| 254 |
|
| 255 |
-
**Variations** Code Llama comes in three model sizes, and three variants:
|
| 256 |
-
1) Code Llama: our base models designed for general code synthesis and understanding
|
| 257 |
-
2) Code Llama - Python: designed specifically for Python
|
| 258 |
-
3) Code Llama - Instruct: for instruction following and safer deployment
|
| 259 |
-
|
| 260 |
All variants are available in sizes of 7B, 13B and 34B parameters.
|
| 261 |
|
|
|
|
|
|
|
| 262 |
**Input** Models input text only.
|
| 263 |
|
| 264 |
-
**Output** Models
|
| 265 |
|
| 266 |
-
**Model Architecture** Code Llama
|
| 267 |
|
| 268 |
**Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
|
| 269 |
|
| 270 |
-
**Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released
|
| 271 |
|
| 272 |
-
**
|
| 273 |
|
| 274 |
**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/)".
|
| 275 |
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
## **Intended Use**
|
| 279 |
**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.
|
| 280 |
|
| 281 |
**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.
|
| 282 |
|
| 283 |
-
##
|
| 284 |
-
**Training Factors**
|
| 285 |
-
We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
|
| 286 |
|
| 287 |
**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.
|
| 288 |
|
| 289 |
-
|
|
|
|
| 290 |
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).
|
| 291 |
-
Code Llama - Instruct uses additional instruction fine-tuning data.
|
| 292 |
|
| 293 |
-
|
|
|
|
| 294 |
See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
|
| 295 |
|
| 296 |
-
|
|
|
|
|
|
|
| 297 |
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.
|
| 298 |
|
| 299 |
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).
|
| 300 |
|
| 301 |
-
|
| 302 |
<!-- original-model-card end -->
|
|
|
|
| 1 |
---
|
| 2 |
inference: false
|
| 3 |
+
language:
|
| 4 |
+
- code
|
| 5 |
license: llama2
|
| 6 |
model_creator: Meta
|
| 7 |
+
model_link: https://huggingface.co/codellama/CodeLlama-13b-python-hf
|
| 8 |
model_name: CodeLlama 13B Python
|
| 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 Python - GGUF
|
| 34 |
- Model creator: [Meta](https://huggingface.co/meta-llama)
|
| 35 |
+
- Original model: [CodeLlama 13B Python](https://huggingface.co/codellama/CodeLlama-13b-python-hf)
|
| 36 |
|
| 37 |
## Description
|
| 38 |
|
| 39 |
+
This repo contains GGUF format model files for [Meta's CodeLlama 13B Python](https://huggingface.co/codellama/CodeLlama-13b-python-hf).
|
| 40 |
|
| 41 |
<!-- README_GGUF.md-about-gguf start -->
|
| 42 |
### About GGUF
|
|
|
|
| 64 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-13B-Python-GPTQ)
|
| 65 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-13B-Python-GGUF)
|
| 66 |
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/CodeLlama-13B-Python-GGML)
|
| 67 |
+
* [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/codellama/CodeLlama-13b-python-hf)
|
| 68 |
<!-- repositories-available end -->
|
| 69 |
|
| 70 |
<!-- prompt-template start -->
|
| 71 |
+
## Prompt template: TBC
|
| 72 |
|
| 73 |
```
|
| 74 |
+
Info on prompt template will be added shortly.
|
|
|
|
|
|
|
| 75 |
```
|
| 76 |
|
| 77 |
<!-- prompt-template end -->
|
|
|
|
| 178 |
<!-- original-model-card start -->
|
| 179 |
# Original model card: Meta's CodeLlama 13B Python
|
| 180 |
|
| 181 |
+
# **Code Llama**
|
| 182 |
+
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 13B Python specialist 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.
|
| 183 |
|
| 184 |
+
| | Base Model | Python | Instruct |
|
| 185 |
+
| --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
| 186 |
+
| 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) |
|
| 187 |
+
| 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) |
|
| 188 |
+
| 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) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
|
| 190 |
+
## Model Use
|
| 191 |
|
| 192 |
+
To use this model, please make sure to install transformers from `main` until the next version is released:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
|
| 194 |
+
```bash
|
| 195 |
+
pip install git+https://github.com/huggingface/transformers.git@main accelerate
|
| 196 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
|
| 198 |
+
Model capabilities:
|
| 199 |
|
| 200 |
+
- [x] Code completion.
|
| 201 |
+
- [ ] Infilling.
|
| 202 |
+
- [ ] Instructions / chat.
|
| 203 |
+
- [x] Python specialist.
|
| 204 |
|
| 205 |
+
## Model Details
|
| 206 |
+
*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).
|
| 207 |
|
| 208 |
+
**Model Developers** Meta
|
| 209 |
|
| 210 |
+
**Variations** Code Llama comes in three model sizes, and three variants:
|
| 211 |
|
| 212 |
+
* Code Llama: base models designed for general code synthesis and understanding
|
| 213 |
+
* Code Llama - Python: designed specifically for Python
|
| 214 |
+
* Code Llama - Instruct: for instruction following and safer deployment
|
| 215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
All variants are available in sizes of 7B, 13B and 34B parameters.
|
| 217 |
|
| 218 |
+
**This repository contains the Python version of the 13B parameters model.**
|
| 219 |
+
|
| 220 |
**Input** Models input text only.
|
| 221 |
|
| 222 |
+
**Output** Models generate text only.
|
| 223 |
|
| 224 |
+
**Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture.
|
| 225 |
|
| 226 |
**Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023.
|
| 227 |
|
| 228 |
+
**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.
|
| 229 |
|
| 230 |
+
**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/)
|
| 231 |
|
| 232 |
**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/)".
|
| 233 |
|
| 234 |
+
## Intended Use
|
|
|
|
|
|
|
| 235 |
**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.
|
| 236 |
|
| 237 |
**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.
|
| 238 |
|
| 239 |
+
## Hardware and Software
|
| 240 |
+
**Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster.
|
|
|
|
| 241 |
|
| 242 |
**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.
|
| 243 |
|
| 244 |
+
## Training Data
|
| 245 |
+
|
| 246 |
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).
|
|
|
|
| 247 |
|
| 248 |
+
## Evaluation Results
|
| 249 |
+
|
| 250 |
See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper.
|
| 251 |
|
| 252 |
+
|
| 253 |
+
## Ethical Considerations and Limitations
|
| 254 |
+
|
| 255 |
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.
|
| 256 |
|
| 257 |
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).
|
| 258 |
|
|
|
|
| 259 |
<!-- original-model-card end -->
|