whatmodel.sh / Code Llama 7B Instruct

Code Llama 7B Instruct is an open-weights language model from Meta, released August 2023. Its published size is 6.74B parameters and a 16k-token context window. Licence: llama2.

Catalogue identity notes

Maker repo codellama/CodeLlama-7b-Instruct-hf @22cb240: licence tag llama2. 6,738,546,688 parameters from the Hugging Face safetensors metadata (dense, so active = total). Released 2023-08: month the maker's Hugging Face repo was created (createdAt 2023-08-24). Ollama tags codellama:7b-instruct-q4_K_M, codellama:7b-instruct-q8_0 (sizes as listed on the tags page, observed 2026-09-29).

37.7±0.7#610 of 743 LLMsfrom 14 benchmark results across 5 sources

Score within the LMArena (text) comparison set only.

$ how it compares

The LLMs ranked either side of Code Llama 7B Instruct, out of 897 with a score, then more from Meta.

#modelscorewhereRAMreleased
720Tulu 2 7B Allen Institute for AI38±2local~5.8GB2023-11
721Mistral 7B Instruct v0.2 Mistral38±1local~5.7GB2023-12
722Code Llama 7B Instruct Meta38±1local~5.5GB2023-08
723MPT-30B-Chat MosaicML38±2comparison only2023-06
724LFM2 700M Liquid AI38±1local~1GB2025-07
more from Meta
10Muse Wonder Full Meta81±1Muse Code only2026-10
20Muse Wonder Meta78±1api $8.00/M2026-10
31Muse Ember Meta76±1api $0.20/M2026-11

see all LLMs · find the ones that fit your machine

$ what it's good at

coding▁▁▁▃▆▇█▆▆▃▃▁ #410 of 474 · 64% of its score · 6 tests

Beats DeepSeek R1 Distill Qwen 7B, Qwen3.5 2B, DeepSeek R1 Distill Llama 8B here, though they rank higher overall.

testresultvs the others in its rundifficultycountswhy
HumanEval +143.3% ✎▁█▄▅▇█·▄▇▅▄▄ beats 15/42easy · avg 75%▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 36%sharp · at its level · several runs
HumanEvalSynthesize (HumanEvalPack, 6-language average)37.9% ✎▁·▂▁▂▆▅█▄▄▁▂ beats 16/35medium · avg 62%▇▇▇ 8.5%at its level
MBPP lab44.4% ✎▃▃▃█··▃▅··▅▃ beats 1/11easy · avg 71%▇▇▇ 6.5%at its level
HumanEvalExplain (HumanEvalPack, 6-language average)25.1% ✎▄▇█▃▄▇▄▁▇▃·▁ beats 20/35medium · avg 46%▇▇ 4.6%typical
HumanEvalFix (HumanEvalPack, 6-language average)12.8% ✎▁·▁▁▄██▄█▁▅▅ beats 10/35medium · avg 52%▇▇ 4.0%sharp
Tulu 2: CodexEval pass@1064.1% ✎▃▃▃·▆▃▃█▃▂▂▅ beats 12/25easy · avg 84%▇ 3.7%sharp · at its level
math▁▁▃▅█▆▅█▄▁▁▁ #363 of 440 * · 3.7% of its score · 1 test

Beats GPT-3.5 Turbo (0125), DBRX Instruct, Phi-3 Medium 128K Instruct here, though they rank higher overall. Trails OPT-2.7B, Gemma 2B (base), Stable Code 3B here, though they rank lower overall.

testresultvs the others in its rundifficultycountswhy
GSM8K17.0% ✎▆▃▅█▅▅▃▆···▂ beats 4/25easy · avg 72%▇ 3.7%sharp · at its level
other tests6 not in a task · 32% of its score
testresultvs the others in its rundifficultycountswhy
EvoEval (overall)27.9% ✎▂▂▃▄▄█▁▄▅▃▁▃ beats 12/42medium · avg 52%▇▇▇▇▇ 12%at its level
BIG-Bench Hard38.4% ✎▁·····▃█▂▅·▁ beats 1/25easy · avg 74%▇▇▇ 6.7%sharp · at its level
BigCodeBench (Complete)25.4% ✎▂▃▁▄▂▅▇█▆▂▂▂ beats 4/58medium · avg 49%▇▇ 5.2%at its level
BigCodeBench (Instruct)21.8% ✎▃▂·▆▆██▆▅▃▃▃ beats 0/33medium · avg 39%▇▇ 4.8%typical
MMLU41.5% ✎▁▁▃▃▄█▄▁█··▁ beats 2/25medium · avg 73%▇ 3.0%at its level
Tulu 2: TyDiQA gold passage, 1-shot F141.6% ✎▂··▁▃▃▂▂█▅▁▂ beats 7/25medium · avg 59%▇ 0.8%blunt · at its level

$ where to run it

Memory is what a version takes in GPU memory (or a Mac's unified memory) with an 8k-token conversation. With less, it runs partly from system RAM, more slowly. Enter your machine to see what runs at full speed.

llama.cpp · recommended

version

  1. Install llama.cpp · Homebrew and winget installs name the commands llama-cli and llama-server instead.
    macOS / Linux
    curl -LsSf https://llama.app/install.sh | sh
    Windows
    irm https://llama.app/install.ps1 | iex

    other ways to install ↗

  2. Run Code Llama 7B Instruct · needs 5.8 GB memory, 4.08 GB download · from huggingface.co/mradermacher
    chat in the terminal
    llama cli -hf mradermacher/CodeLlama-7b-Instruct-hf-GGUF:Q4_K_M
  3. Or start a local server and open the address it prints (http://localhost:9931)
    llama serve -hf mradermacher/CodeLlama-7b-Instruct-hf-GGUF:Q4_K_M

LM Studio

version

  1. Install LM Studio · Open the app once before using the lms command.

    download it (macOS / Windows / Linux) ↗

  2. Run Code Llama 7B Instruct · needs 5.8 GB memory, 4.08 GB download · from huggingface.co/mradermacher

    open in LM Studio ↗

  3. Or download it in the terminal
    lms get https://huggingface.co/mradermacher/CodeLlama-7b-Instruct-hf-GGUF@Q4_K_M -y
  4. Then run lms ls to see its name, and lms chat followed by that name

Ollama

version

  1. Install Ollama

    download it (macOS / Windows) ↗

    Linux
    curl -fsSL https://ollama.com/install.sh | sh
  2. Run Code Llama 7B Instruct · needs 5.8 GB memory, 4.08 GB download · from ollama.com
    chat in the terminal
    ollama run codellama:7b-instruct-q4_K_M

MLX (Mac)

version

  1. Install MLX (Mac) · Apple silicon Macs only, text only.
    with uv
    uv tool install mlx-lm
    or
    pip install mlx-lm
  2. Run Code Llama 7B Instruct · needs 5.5 GB memory, 3.79 GB download, Mac only · from huggingface.co/javiergtzr
    chat in the terminal
    mlx_lm.chat --model javiergtzr/CodeLlama-7b-Instruct-hf-4bit
  3. Or start an OpenAI-compatible server at http://localhost:8080/v1
    mlx_lm.server --model javiergtzr/CodeLlama-7b-Instruct-hf-4bit

Model repository and documentation: huggingface.co/codellama ↗

$ how the score was worked out · Top Leaderboard Ranking = Top… 35%, Code Llama: Open Foundation M… 19%, Tulu 2 — base and instruction… 18% and 2 more

Each result implies a score on its own, after adjusting for how hard its test is and who ran it. The score is their weighted average, with a small pull toward the middle for thinly tested models. Each test's weight is its counts column above; here it's added up by who ran the tests. How it works

$ improve this page

Use a short GitHub form or edit the data through a pull request. Every number needs a source; here's which ones we can use.

data updated · sources and licences · json