Llama Meta Released 2023-08 codecompletionfill-in-middle

Code Llama

Meta's code-specialized Llama. Foundation for many code tools. Now superseded by Qwen 2.5-Coder and Qwen 3-Coder for new work.

Best for code generation on Llama base
Sizes 7B · 13B · 34B · 70B
Context 16K
License Llama Community License
Min VRAM (default size, Q4) 5 GB
Rec VRAM 12 GB

What Code Llama is for

Code Llama is trained for code. Meta released it in 2023-08 with 4 sizes (7B, 13B, 34B, 70B), 16K of context and a Llama Community License licence. Context length matters more here than for chat, because a coding assistant that cannot see the whole file is guessing. The catalogue records its strength as code generation on Llama base, and it is the class of model an editor plugin such as Continue or Tabby points at.

Sizes and memory

The 7B needs about 5 GB of weights at Q4_K_M and the 70B about 42 GB, a spread of 37 GB across the family. The catalogue's default pick is 13B. Recommended VRAM adds roughly half again on top of the weights for the KV cache and the runtime.

Size Weights at Q4_K_M Recommended VRAM Smallest card in our guide that holds it
7B 5 GB 8 GB NVIDIA Jetson Orin Nano 8GB
13B 9 GB 14 GB NVIDIA RTX 3060 12GB
34B 20 GB 30 GB NVIDIA RTX 3090
70B 42 GB 63 GB Apple M3 Ultra

Hardware that runs Code Llama

Every one of the 19 cards with dedicated memory in our hardware guide holds at least one size of Code Llama at Q4_K_M. The cheapest that does is the NVIDIA Jetson Orin Nano 8GB at about $199, running the 7B.

The largest size any of them holds is the 70B at 42 GB, on the Apple M3 Ultra (192 GB at 800 GB/s). Bandwidth, not capacity, sets the speed once a size fits, so a card further down the list with faster memory will generate more tokens per second on the same weights than a larger, slower one.

What people use it for

The catalogue lists 2 recorded uses for Code Llama: code generation, legacy Llama workflows. It is tagged code, completion, fill-in-middle.

Where Code Llama sits in the Llama family

Our catalogue holds 7 Llama entries. Ordered by release date, Code Llama (2023-08) is the 1st of them, and Llama 4 (2025-04) is newer.

The Llama Community License is a vendor community licence rather than a standard open-source one: usable, redistributable with attribution, and carrying conditions that are worth reading before you build a product on it.

Context window: 16K

16K tokens comes to roughly 12,000 words at the usual three-quarters-of-a-word-per-token ratio: a long chat, a single source file, one chapter. It is the band where a retrieval step stops being optional, because the interesting documents do not fit. The recommended VRAM figure above assumes a working context rather than the maximum, and filling this one will push past it.

How to run Code Llama locally

Our catalogue does not record registry tags, so look the current tag up in the Ollama library or on Hugging Face before pasting these. The commands below are the shape of the workflow, not a copy-and-paste recipe.

Option 1: Ollama (simplest)

# find the tag for Code Llama at ollama.com/library
ollama run <tag>

Option 2: Mullama (production)

mullama pull <tag>
mullama run <tag>

Option 3: llama.cpp (CLI)

# download a GGUF from Hugging Face, searching for "Code Llama GGUF"
./llama-cli -m model.Q4_K_M.gguf -p "Hello, AI!"

Option 4: Python with Mullama or llama-cpp-python

from mullama import Model, Context
model = Model.load("model.Q4_K_M.gguf", n_gpu_layers=99)
ctx = Context(model, n_ctx=4096)
print(ctx.generate("Hello, AI!", 256))

Sources

Model record from src/data/models.json (2026-06-29); card capacities from src/data/gpus.json (2026-06-29). Upstream: Curated from ollama.com/library + community benchmarks + paperswithcode + huggingface.