What it does
Code Llama is a set of code-focused language models, produced by fine-tuning Llama 2 on more code. There are foundation models, Python specialisations and instruction-following (Instruct) models. All were trained on sequences of 16k tokens and show gains on inputs up to 100k tokens, and the 7B and 13B Code Llama and Instruct variants can fill in code from the surrounding context. The repository is a minimal example for loading the models and running inference. You request a download on Meta's website and accept the licence, receive a signed URL by email, and run the download.sh script. Inference runs with PyTorch and CUDA through torchrun, and the page lists model sizes of 7B, 13B, 34B and 70B, from about 12.55GB to 131GB. Example scripts cover completion, infilling and instructions, and Instruct models need a specific prompt format. The page says the model and weights are licensed for researchers and commercial entities, subject to an acceptable use policy. The repository was archived by its owner on July 1, 2025, so it is read-only.
Capabilities
- Foundation, Python and instruction-following variants
- Sizes of 7B, 13B, 34B and 70B parameters
- Trained on 16k-token sequences, with gains on inputs up to 100k tokens
- Code infilling in the 7B and 13B Code Llama and Instruct models
- Example scripts for completion, infilling and instructions
When to use it
- You want code-focused model weights to run on your own GPUs
- You need a model that can fill in code between existing lines
- You want reference inference code for the Code Llama family