[whatmodel.sh](../../README.md) / Code Llama 7B Python # Code Llama 7B Python Meta · released 2023-08 · 6.74B params · llama2 **score 38.6** ±0.9 · #585 of 732 · from 6 benchmark results across 3 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks Code Llama 7B Python among every model on that task or test, worst to best.
task    vs the others         rank  counts  tests
coding  ▁▁▁▃●▇█▇▅▄▃▁   #407 of 469     79%      4
coding · #407 of 469 · 79% of its score Beats [DeepSeek R1 Distill Qwen 7B](deepseek-r1-distill-qwen-7b.md), [Qwen3.5 2B](qwen3-5-2b.md), [DeepSeek R1 Distill Llama 8B](deepseek-r1-distill-llama-8b.md) here, though they rank higher overall. Trails [EXAONE 3.5 2.4B Instruct](exaone-3-5-2-4b.md), [Code Llama 7B Instruct](codellama-7b-instruct.md), [Qwen2.5 1.5B Instruct](qwen2-5-1-5b.md) here, though they rank lower overall.
test                result  vs the others in its run  difficulty        counts  why
HumanEval            39.6%  ▁█▄●▇█·▄▇▅▄▄ beats 10/42  easy · avg 75%       62%  sharp · at its level · several runs
MBPP (maker)         47.6%  ▃▃▃●··▃▅··▅▃ beats 3/11   easy · avg 71%       11%  at its level
CRUXEval-I (maker)   37.3%  ▁··▁▅▂●▇▁··▁ beats 8/22   medium · avg 52%    3.1%  at its level
CRUXEval-O (maker)   35.9%  ▁·▂▃●█▁▂···▁ beats 7/22   medium · avg 51%    3.0%  blunt · at its level
other tests (1)
test               result  vs the others in its run  difficulty        counts  why
EvoEval (overall)   25.6%  ▂▂▃●▄█▁▄▅▃▁▃ beats 11/42  medium · avg 52%     21%  at its level
## How the score was worked out Each result implies a score on its own, after adjusting for how hard that test is and who ran it. The model's 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 is added up by who ran the tests. [Method](../method.md)
source                                    results  share of the score
Top Leaderboard Ranking = Top Coding Pr…        2   61% ▇▇▇▇▇▇▇
Code Llama: Open Foundation Models for …        2   33% ▇▇▇▇
CRUXEval published evaluation results (…        2    6% ▇
prior: pull toward the middle                        0% ▇
weighted average                                   = 38.6
Licences: Top Leaderboard Ranking = Top Coding Proficiency ([CC BY 4.0](../../licenses/paper-2403.19114v1-CC-BY-4.0.txt)) · Code Llama: Open Foundation Models for Code ([CC BY 4.0](../../licenses/paper-2308.12950v3-CC-BY-4.0.txt)) · CRUXEval published evaluation results ([MIT](../../licenses/cruxeval-published-results-MIT.txt)) ## How to run it ### llama.cpp (recommended) 1. Install llama.cpp. Homebrew and winget installs name the commands llama-cli and llama-server instead. [Other ways to install](https://github.com/ggml-org/llama.cpp/blob/master/docs/install.md) ```sh # macOS / Linux curl -LsSf https://llama.app/install.sh | sh # Windows irm https://llama.app/install.ps1 | iex ``` 2. Run Code Llama 7B Python (Q4_K_M, needs ~4.1 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/CodeLlama-7b-Python-hf-GGUF/tree/5f03feef6641e6189aba26cb5e3d2320d4925f49)) ```sh llama cli -hf mradermacher/CodeLlama-7b-Python-hf-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf mradermacher/CodeLlama-7b-Python-hf-GGUF:Q4_K_M ``` Other versions: Q8_0 (~7.2 GB) `llama cli -hf mradermacher/CodeLlama-7b-Python-hf-GGUF:Q8_0` ### LM Studio 1. Install LM Studio. Open the app once before using the lms command. [Download it (macOS / Windows / Linux)](https://lmstudio.ai/download) 2. Run Code Llama 7B Python (Q4_K_M, needs ~4.1 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/CodeLlama-7b-Python-hf-GGUF/tree/5f03feef6641e6189aba26cb5e3d2320d4925f49)) ```sh lms get https://huggingface.co/mradermacher/CodeLlama-7b-Python-hf-GGUF@Q4_K_M -y ``` 3. Then run lms ls to see its name, and lms chat followed by that name Other versions: Q8_0 (~7.2 GB) `lms get https://huggingface.co/mradermacher/CodeLlama-7b-Python-hf-GGUF@Q8_0 -y` ### Ollama 1. Install Ollama. [Download it (macOS / Windows)](https://ollama.com/download) ```sh # Linux curl -fsSL https://ollama.com/install.sh | sh ``` 2. Run Code Llama 7B Python (Q4_K_M, needs ~4.1 GB, from [ollama.com](https://ollama.com/library/codellama/tags)) ```sh ollama run codellama:7b-python-q4_K_M ``` Other versions: Q8_0 (~7.2 GB) `ollama run codellama:7b-python-q8_0` Model repository and documentation: [huggingface.co/codellama](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) [interactive version](https://whatmodel.sh/model/codellama-7b-python) · [JSON](https://whatmodel.sh/api?format=json&all=1)