LLM Reference

Code Llama Models by AI at Meta

AI at MetaLlama 2 CommunityOpen weightsCodingHighlight
16 models2023–2024Up to 100k ctxFrom $0.05/1M input

Details

ResearcherAI at Meta
Commercial useCommercial use with conditions
Models16
Released2023–2024
Max context100k

Capabilities

Structured Outputs10 of 16 models

About

Code Llama is a family of large language models developed by Meta AI, designed for code generation and understanding tasks. Building upon the Llama 2 architecture, Code Llama offers variations to accommodate diverse needs, featuring model sizes with 7B, 13B, 34B, and 70B parameters that adjust complexity and capability. The family comprises the foundational model for general code tasks, Code Llama - Python for tasks specific to the Python language, and Code Llama - Instruct, which is fine-tuned for interpreting natural language instructions. Trained on extensive code and related data, these models excel in code completion, debugging, and generating code from natural language prompts. Larger models tend to provide enhanced performance, albeit at the cost of increased computational demands 12.

Current Variants

Use-when guidance is derived from seed capabilities, context, release, and replacement fields.

15 in view1 retired

Use when the workload needs 16k context, 70B parameters, and structured outputs.

2024-0116k context70B parametersstructured outputs

Use when the workload needs 16k context and 70B parameters.

2024-0116k context70B parameters

Use when the workload needs 100k context, 34B parameters, and structured outputs.

2023-08100k context34B parametersstructured outputs

Use when the workload needs 100k context, 13B parameters, and structured outputs.

2023-08100k context13B parametersstructured outputs

Use when the workload needs 100k context, 7B parameters, and structured outputs.

2023-08100k context7B parametersstructured outputs

Use when the workload needs 100k context, 34B parameters, and structured outputs.

2023-08100k context34B parametersstructured outputs

Use when the workload needs 100k context, 13B parameters, and structured outputs.

2023-08100k context13B parametersstructured outputs

Use when the workload needs 100k context, 7B parameters, and structured outputs.

2023-08100k context7B parametersstructured outputs

Use when the workload needs 16k context and 34B parameters.

2023-0816k context34B parameters

Use when the workload needs 16k context and 13B parameters.

2023-0816k context13B parameters

Use when the workload needs 16k context and 7B parameters.

2023-0816k context7B parameters

Use when the workload needs 100k context, 34B parameters, and structured outputs.

2023-07100k context34B parametersstructured outputs

Use when the workload needs 100k context and 70B parameters.

2023-07100k context70B parameters

Use when the workload needs 100k context, 70B parameters, and structured outputs.

2023-07100k context70B parametersstructured outputs

Use when the workload needs 16k context and 34B parameters.

2023-0716k context34B parameters

Release Timeline

3 release groups
2024-01
2 current · 1 retired
CodeLlama 70B
16k context70B parametersstructured outputs
Archived
CodeLlama 70B Instruct
16k context70B parameters
Current
CodeLlama 70B Python
16k context70B parametersstructured outputs
Current
2023-08
9 current
CodeLlama 13B
100k context13B parametersstructured outputs
Current
CodeLlama 13B Instruct
16k context13B parameters
Current
CodeLlama 13B Python
100k context13B parametersstructured outputs
Current
CodeLlama 34B
100k context34B parametersstructured outputs
Current
CodeLlama 34B Instruct
16k context34B parameters
Current
CodeLlama 34B Python
100k context34B parametersstructured outputs
Current
CodeLlama 7B
100k context7B parametersstructured outputs
Current
CodeLlama 7B Instruct
16k context7B parameters
Current
CodeLlama 7B Python
100k context7B parametersstructured outputs
Current
2023-07
4 current
DeepInfra CodeLlama 70B Instruct
100k context70B parametersstructured outputs
Current
Fireworks CodeLlama-34b-Instruct
16k context34B parameters
Current
OctoML CodeLlama-70b-Instruct
100k context70B parameters
Current
Together AI CodeLlama-34B-Instruct
100k context34B parametersstructured outputs
Current

Specifications(16 models)

Code Llama model specifications comparison
ModelReleasedContextParametersStructured Outputs
CodeLlama 70B Python2024-0116k70BYes
CodeLlama 70B Instruct2024-0116k70BNo
CodeLlama 34B2023-08100k34BYes
CodeLlama 13B2023-08100k13BYes
CodeLlama 7B2023-08100k7BYes
CodeLlama 34B Python2023-08100k34BYes
CodeLlama 13B Python2023-08100k13BYes
CodeLlama 7B Python2023-08100k7BYes
CodeLlama 34B Instruct2023-0816k34BNo
CodeLlama 13B Instruct2023-0816k13BNo
CodeLlama 7B Instruct2023-0816k7BNo
Together AI CodeLlama-34B-Instruct2023-07100k34BYes
OctoML CodeLlama-70b-Instruct2023-07100k70BNo
DeepInfra CodeLlama 70B Instruct2023-07100k70BYes
Fireworks CodeLlama-34b-Instruct2023-0716k34BNo

Pricing

Code Llama model pricing by provider
ModelProviderInput / 1MOutput / 1MType
CodeLlama 7BReplicate API$0.05$0.25Serverless
CodeLlama 7B PythonReplicate API$0.05$0.25Serverless
CodeLlama 13BReplicate API$0.1$0.5Serverless
CodeLlama 13B PythonReplicate API$0.1$0.5Serverless
CodeLlama 7BTogether AI$0.2$0.2Serverless
CodeLlama 34BDeepInfra$0.2$0.45Serverless
CodeLlama 7B PythonTogether AI$0.2$0.2Serverless
CodeLlama 13BFireworks AI$0.2$0.2Provisioned
CodeLlama 13B PythonFireworks AI$0.2$0.2Provisioned
CodeLlama 7BFireworks AI$0.2$0.2Provisioned
CodeLlama 7B PythonFireworks AI$0.2$0.2Provisioned
CodeLlama 13B InstructFireworks AI$0.2$0.2Serverless
CodeLlama 7B InstructFireworks AI$0.2$0.2Serverless
CodeLlama 34BReplicate API$0.2$1Serverless
CodeLlama 34B PythonReplicate API$0.2$1Serverless
CodeLlama 13BTogether AI$0.3$0.3Serverless
CodeLlama 13B PythonTogether AI$0.3$0.3Serverless
Together AI CodeLlama-34B-InstructTogether AI$0.3$0.3Serverless
Fireworks CodeLlama-34b-InstructFireworks AI$0.3$0.3Serverless
OctoML CodeLlama-70b-InstructOctoML (Deprecated)$0.4$0.6Serverless
DeepInfra CodeLlama 70B InstructDeepInfra$0.45$0.65Serverless
CodeLlama 7BMicrosoft Foundry$0.52$0.67Provisioned
CodeLlama 7B PythonMicrosoft Foundry$0.52$0.67Provisioned
CodeLlama 70B PythonReplicate API$0.65$2.75Serverless
CodeLlama 34BTogether AI$0.8$0.8Serverless
CodeLlama 34B PythonTogether AI$0.8$0.8Serverless
CodeLlama 13BMicrosoft Foundry$0.81$0.94Provisioned
CodeLlama 13B PythonMicrosoft Foundry$0.81$0.94Provisioned
CodeLlama 70B PythonTogether AI$0.9$0.9Serverless
CodeLlama 34BFireworks AI$0.9$0.9Provisioned
CodeLlama 34B PythonFireworks AI$0.9$0.9Provisioned
CodeLlama 70B PythonFireworks AI$0.9$0.9Provisioned
CodeLlama 34B InstructFireworks AI$0.9$0.9Serverless
CodeLlama 70B InstructFireworks AI$0.9$0.9Serverless
CodeLlama 34BMicrosoft Foundry$1.54$1.77Provisioned
CodeLlama 34B PythonMicrosoft Foundry$1.54$1.77Provisioned
CodeLlama 34BIBM watsonx$1.8$1.8Serverless
CodeLlama 70B PythonMicrosoft Foundry$3.78$11.34Provisioned

Frequently Asked Questions

What is Code Llama used for?
Code Llama is used for coding and structured outputs. The family description and listed model capabilities point to those workloads as the best fit.
How does Code Llama compare to Claude Fable?
Code Llama by AI at Meta is strongest where you need coding, while Claude Fable by Anthropic is the closest related family to check for vision and multimodal work. Code Llama has 16 listed variants and reaches up to 100k context, while Claude Fable reaches up to 1m context, so compare the specs and pricing tables before choosing a production model.
Which Code Llama model should I use?
For the lowest listed input price, start with CodeLlama 7B through Replicate API at $0.05/1M input tokens. For the most capable/latest local choice, evaluate CodeLlama 34B with 100k context and structured outputs.

Models(16)