whatmodel.sh / Code Llama 7B Instruct
Code Llama 7B Instruct
↗ share
+ contribute
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).
$ how it compares
The LLMs ranked either side of Code Llama 7B Instruct, out of 828 with a score, then more from Meta.
| # | model | score | where | ||
|---|---|---|---|---|---|
| 681 | 36±2 | local | |||
| 682 | 36±1 | comparison only | |||
| 683 | 36±1 | local | |||
| 684 | 36±2 | local | |||
| 685 | 36±1 | local | |||
| more from Meta | |||||
| 24 | 77±1 | api $2.00/M | |||
| 40 | 75±1 | api $2.00/M | |||
| 43 | 75±1 | api $2.00/M | |||
$ what it's good at
coding▁▁▁▃▆██▇▆▄▃▁ #397 of 458 · 65% 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. Trails Qwen2.5 1.5B Instruct, WizardLM 13B V1.2 here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| HumanEval +1 | 43.3% ✎ | ▁█▄▅▇█·▄▇▅▄▄ beats 15/42 | 37% |
| HumanEvalSynthesize (HumanEvalPack, 6-language average) | 37.9% ✎ | ▁·▂▁▂▆▅█▄▄▁▂ beats 16/35 | 8.5% |
| MBPP lab | 44.4% ✎ | ▃▃▃█··▃▅··▅▃ beats 1/11 | 6.3% |
| HumanEvalExplain (HumanEvalPack, 6-language average) | 25.1% ✎ | ▄▇█▃▄▇▄▁▇▃·▁ beats 20/35 | 4.8% |
| Tulu 2: CodexEval pass@10 | 64.1% ✎ | ▃▃▃·▆▃▃█▃▂▂▅ beats 12/25 | 4.1% |
| HumanEvalFix (HumanEvalPack, 6-language average) | 12.8% ✎ | ▁·▁▁▄██▄█▁▅▅ beats 10/35 | 4.1% |
math▁▃▃▅▆▅▄█▄▁▁▁ #378 of 398 * · 2.5% of its score · 1 test
Beats Command R (03-2024), Molmo 7B-D (0924), Mistral 7B Instruct v0.3 here, though they rank higher overall. Trails Gemma 2B (base), Llama 3.2 1B Instruct, SmolLM2 1.7B Instruct here, though they rank lower overall.
other tests6 not in a task · 32% of its score
| test | result | vs the others in its run | counts |
|---|---|---|---|
| EvoEval (overall) | 27.9% ✎ | ▂▂▃▄▄█▁▄▅▃▁▃ beats 12/42 | 12% |
| BIG-Bench Hard | 38.4% ✎ | ▁·····▃█▂▅·▁ beats 1/25 | 7.0% |
| BigCodeBench (Complete) | 25.4% ✎ | ▂▃▁▄▂▅▇█▆▂▂▂ beats 4/58 | 5.0% |
| BigCodeBench (Instruct) | 21.8% ✎ | ▃▂·▆▆██▆▅▃▃▃ beats 0/33 | 4.6% |
| MMLU | 41.5% ✎ | ▁▁▃▃▄█▄▁█··▁ beats 2/25 | 2.6% |
| Tulu 2: TyDiQA gold passage, 1-shot F1 | 41.6% ✎ | ▂··▁▃▃▂▂█▅▁▂ beats 7/25 | 0.9% |
$ where to run it
llama.cpp · recommended
version
- 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 | shWindowsirm https://llama.app/install.ps1 | iex - Run Code Llama 7B Instruct · needs ~4.1 GB · from huggingface.co/mradermacherchat in the terminal
llama cli -hf mradermacher/CodeLlama-7b-Instruct-hf-GGUF:Q4_K_M - 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
- Install LM Studio · Open the app once before using the lms command.
- Run Code Llama 7B Instruct · needs ~4.1 GB · from huggingface.co/mradermacher
- Or download it in the terminal
lms get https://huggingface.co/mradermacher/CodeLlama-7b-Instruct-hf-GGUF@Q4_K_M -y - Then run lms ls to see its name, and lms chat followed by that name
Ollama
version
- Install Ollama
download it (macOS / Windows) ↗
Linuxcurl -fsSL https://ollama.com/install.sh | sh - Run Code Llama 7B Instruct · needs ~4.1 GB · from ollama.comchat in the terminal
ollama run codellama:7b-instruct-q4_K_M
MLX (Mac)
version
- Install MLX (Mac) · Apple silicon Macs only, text only.with uv
uv tool install mlx-lmorpip install mlx-lm - Run Code Llama 7B Instruct · needs ~3.8 GB, Mac only · from huggingface.co/javiergtzrchat in the terminal
mlx_lm.chat --model javiergtzr/CodeLlama-7b-Instruct-hf-4bit - Or start an OpenAI-compatible server at http://localhost:8080/v1
mlx_lm.server --model javiergtzr/CodeLlama-7b-Instruct-hf-4bit
Weights and documentation: huggingface.co/codellama ↗
$ how the score was worked out · Top Leaderboard Ranking = Top… 36%, Code Llama: Open Foundation M… 19%, Granite Code Models: A Family… 17% 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
| source | results | share of the score |
|---|---|---|
| 2 | 36% | |
| 2 | 19% | |
| 3 | 17% | |
| 5 | 17% | |
| 2 | 10% | |
| prior · pull toward the middle | 0% | |
| weighted average | = 36.1 |
$ 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