# Code Llama 70B

> Meta's largest open-weight code model — built on Llama 2, trained on 1T tokens of code.

- Maker: Meta
- Line: Code Llama
- Canonical page: https://ai-tldr.dev/models/code-llama-70b/
- Updated: 2026-06-18

## In short

Code Llama 70B is the largest model in Meta's Code Llama family, released on January 29, 2024. It is fine-tuned from Llama 2 and specialized for generating, explaining and completing code. It has a 100K-token context window. You can use it through Hugging Face (Code Llama - Instruct 70B), Hugging Face (Code Llama 70B base) and Ollama.

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 100K (max output Not specified by Meta) | [1] |
| Input price | Free (open weights — self-hosted) | [2] |
| Output price | Free (open weights — self-hosted) | [2] |
| Licence | Llama 2 Community License · open weights | [1] |
| Released | 29 January 2024 | [3] |
| Parameters | 70B | [1] |
| Knowledge cutoff | Not disclosed by Meta | [1] |

## Sources

1. [Code Llama - Instruct 70B — model card (Hugging Face)](https://huggingface.co/codellama/CodeLlama-70b-Instruct-hf)
2. [Code Llama 70B pricing](https://www.llama.com/llama-downloads/)
3. [Meta — Introducing Code Llama (with Jan 2024 70B update)](https://ai.meta.com/blog/code-llama-large-language-model-coding/)

## Overview

Code Llama 70B is the largest model in Meta's Code Llama family, released on January 29, 2024. It is fine-tuned from Llama 2 and specialized for generating, explaining and completing code. The 70B tier was added after the original 7B, 13B and 34B models and was trained on roughly 1 trillion tokens of code and code-related data — about double the 500B tokens used for the smaller sizes.

Meta shipped three 70B variants: Code Llama 70B (the foundation model), Code Llama - Python 70B (further tuned on Python), and Code Llama - Instruct 70B (tuned to follow natural-language instructions and to be safer and more helpful in chat). All three support large inputs — the models are trained on 16k-token sequences and show improvements on contexts up to 100k tokens — and they handle popular languages including Python, C++, Java, PHP, TypeScript, C# and Bash.

Code Llama 70B is released under the Llama 2 Community License, which permits both research and commercial use. The weights are openly available, so the model is most commonly self-hosted or run through community tooling such as Ollama (codellama:70b) and Hugging Face rather than a first-party paid API. It has since been superseded by Meta's general-purpose Llama 3 family for many coding tasks, but it remains a notable open-weight code model.

## Benchmarks

- HumanEval (pass@1) — Code Llama - Instruct 70B: 67.8% ([source](https://arxiv.org/abs/2308.12950))
- MBPP (pass@1) — Code Llama - Instruct 70B: 62.2% ([source](https://arxiv.org/abs/2308.12950))
- HumanEval (pass@1) — Code Llama - Python 70B: 57.3% ([source](https://arxiv.org/abs/2308.12950))
- MBPP (pass@1) — Code Llama - Python 70B: 65.6% ([source](https://arxiv.org/abs/2308.12950))
- HumanEval (pass@1) — Code Llama 70B (base): 53% ([source](https://arxiv.org/abs/2308.12950))
- MBPP (pass@1) — Code Llama 70B (base): 62.4% ([source](https://arxiv.org/abs/2308.12950))

## Pricing

- Input: Free (open weights — self-hosted) / 1M tokens
- Output: Free (open weights — self-hosted) / 1M tokens

Meta does not sell Code Llama 70B through a first-party API. The weights are released for free under the Llama 2 Community License and can be self-hosted (e.g. via Ollama or Hugging Face); third-party hosted inference prices vary by provider.

Source: https://www.llama.com/llama-downloads/

## Strengths

- Largest open-weight model in the Code Llama line, with strong HumanEval/MBPP results among open models at release
- Three variants let you pick the right fit: foundation, Python-specialized, or instruction-tuned for chat-style coding
- Permissive Llama 2 Community License allows commercial use
- Handles large inputs — trained on 16k-token sequences with improvements up to 100k tokens
- Open weights mean it can be fully self-hosted (Ollama, Hugging Face, llama.cpp) with no per-token API cost

## Best for

- Local or on-prem code generation and autocompletion where data can't leave your infrastructure
- Code explanation, review and debugging assistance via the Instruct variant
- Python-heavy workloads using the Code Llama - Python 70B variant
- Fine-tuning a code model on a private codebase from an openly licensed base
- Research and benchmarking of open code models

## How to access

- [Hugging Face (Code Llama - Instruct 70B)](https://huggingface.co/codellama/CodeLlama-70b-Instruct-hf) — model id `codellama/CodeLlama-70b-Instruct-hf`
- [Hugging Face (Code Llama 70B base)](https://huggingface.co/codellama/CodeLlama-70b-hf) — model id `codellama/CodeLlama-70b-hf`
- [Ollama](https://ollama.com/library/codellama:70b) — model id `codellama:70b`

## Code Llama versions

- Code Llama 70B (29 January 2024) — this page
- [Code Llama](https://ai-tldr.dev/models/code-llama/) (24 August 2023)

## FAQ

### When was Code Llama 70B released?

Meta released Code Llama 70B on January 29, 2024, as the largest model in the Code Llama family, which previously offered 7B, 13B and 34B sizes.

### What are the three Code Llama 70B variants?

There are three: Code Llama 70B (the foundation code model), Code Llama - Python 70B (specialized for Python), and Code Llama - Instruct 70B (tuned to follow natural-language instructions). On HumanEval, the Instruct variant scores 67.8%.

### Is Code Llama 70B free and open source?

The weights are released for free under the Llama 2 Community License, which allows both research and commercial use. You can download and self-host it, for example via Hugging Face or Ollama. Meta does not offer it through a paid first-party API.

### What context length does Code Llama 70B support?

The 70B models are trained on sequences of 16,000 tokens and show improvements on inputs of up to 100,000 tokens, according to Meta's research paper.

## Links

- [Meta — Introducing Code Llama (with Jan 2024 70B update)](https://ai.meta.com/blog/code-llama-large-language-model-coding/)
- [Meta Llama — official site & downloads](https://www.llama.com/)
- [Code Llama: Open Foundation Models for Code (paper)](https://arxiv.org/abs/2308.12950)
- [Code Llama - Instruct 70B — model card (Hugging Face)](https://huggingface.co/codellama/CodeLlama-70b-Instruct-hf)
- [Code Llama 70B on Ollama](https://ollama.com/library/codellama:70b)
- [Meta releases Code Llama 70B — VentureBeat](https://venturebeat.com/ai/meta-releases-code-llama-70b-an-open-source-behemoth-to-rival-private-ai-development)
- [Code Llama 70B pricing](https://www.llama.com/llama-downloads/)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/code-llama-70b/
