[whatmodel.sh](../../README.md) / Code Llama 70B Instruct # Code Llama 70B Instruct Meta · released 2024-01 · 69B params · llama2 **score 47.5** ±0.6 · #416 of 732 · from 13 benchmark results across 7 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 70B Instruct among every model on that task or test, worst to best.
task            vs the others          rank  counts  tests
coding          ▁▁▁▃▅●█▇▅▄▃▁    #314 of 469     77%      6
chat & writing  ▁▁▁●▆▄▆█▆▇▇▃   #377 of 402*    6.3%      2
coding · #314 of 469 · 77% of its score Beats [Solar Open 100B (102B-A12B)](solar-open-100b.md), [Qwen3-VL 30B-A3B Instruct](qwen3-vl-30b-a3b-instruct.md), [Qwen3 4B Instruct 2507](qwen3-4b-instruct-2507.md) here, though they rank higher overall. Trails [DeepSeek LLM 67B Chat](deepseek-llm-67b-chat.md), [WizardLM 70B V1.0](wizardlm-70b-v1-0.md), [Yi 1.5 9B Chat](yi-1-5-9b-chat.md) here, though they rank lower overall.
test                                result  vs the others in its run  difficulty        counts  why
HumanEval                            72.0%  ▁·▁▁▃▄▆▅●▃▁▁ beats 63/99  easy · avg 76%       42%  sharp · at its level · several runs
HumanEval+                           65.9%  ▁·▁▁▁▃▄▄▄●▃▁ beats 62/99  easy · avg 70%       18%  sharp · at its level
HumanEvalSynthesize (HumanEvalPac…   58.9%  ▁·▂▁▂▆▅█▄▄●▂ beats 33/35  medium · avg 62%    5.4%  at its level
HumanEvalExplain (HumanEvalPack, …   41.1%  ▄▇█▃▄▇▄▁●▃·▁ beats 32/35  medium · avg 46%    4.0%  at its level
HumanEvalFix (HumanEvalPack, 6-la…   53.0%  ▁·▁▁▄██▄█▁▅● beats 34/35  medium · avg 51%    4.0%  sharp · at its level
MBPP (maker)                         62.2%  ▃▃▃█··▃▅··●▃ beats 9/11   easy · avg 71%      3.5%  at its level
chat & writing · #377 of 402 · 6.3% of its score Trails [Gemma 3 270M IT](gemma-3-270m.md), [SmolLM2 360M Instruct](smollm2-360m.md), [Granite 4.0 350M](granite-4-0-350m.md) here, though they rank lower overall.
test                                result  vs the others in its run   difficulty  counts  why
LMArena (text)                      1119.2  ▁▁▁●▃▃▃▆▆▇█▃ beats 22/385  avg 1260      3.3%  blunt
Polyrating rating (bias-aware re-…  1039.0  ▂▁▂▁▃●█▆▇▄▂▂ beats 22/95   avg 1187      3.0%  typical
other tests (3)
test                     result  vs the others in its run  difficulty        counts  why
EvoEval (overall)         47.7%  ▂▂▃▄▄█▁▄●▃▁▃ beats 33/42  medium · avg 52%    9.3%  at its level
BigCodeBench (Instruct)   40.5%  ▃▂·▆▆██▆●▃▃▃ beats 26/33  medium · avg 39%    3.7%  at its level
BigCodeBench (Complete)   48.9%  ▂▁▁▄▂▅▇█●▂▂▂ beats 49/58  medium · avg 48%    3.6%  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
EvalPlus / EvalPerf published evaluatio…        2   40% ▇▇▇▇▇
Top Leaderboard Ranking = Top Coding Pr…        2   22% ▇▇▇
Granite Code Models: A Family of Open F…        3   13% ▇▇
Code Llama: Open Foundation Models for …        2   11% ▇
BigCodeBench paper                              2    7% ▇
LMArena leaderboard dataset                     1    3% ▇
Polyrating: A Cost-Effective and Bias-A…        1    3% ▇
prior: pull toward the middle                        0% ▇
weighted average                                   = 47.5
Licences: EvalPlus / EvalPerf published evaluation runs ([Apache-2.0](../../licenses/evalplus-published-runs-Apache-2.0.txt)) · Top Leaderboard Ranking = Top Coding Proficiency ([CC BY 4.0](../../licenses/paper-2403.19114v1-CC-BY-4.0.txt)) · Granite Code Models: A Family of Open Foundation Models for Code Intelligence ([CC BY 4.0](../../licenses/paper-2405.04324v1-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)) · BigCodeBench paper ([CC BY 4.0](http://creativecommons.org/licenses/by/4.0/)) · LMArena leaderboard dataset ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)) · Polyrating: A Cost-Effective and Bias-Aware Rating System for LLM Evaluation ([CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)) ## 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 70B Instruct (Q4_K_M, needs ~41.4 GB, from [huggingface.co/second-state](https://huggingface.co/second-state/CodeLlama-70b-Instruct-hf-GGUF/tree/34ef8185fca7ec48c52ca7aec7711d7d893efa82)) ```sh llama cli -hf second-state/CodeLlama-70b-Instruct-hf-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf second-state/CodeLlama-70b-Instruct-hf-GGUF:Q4_K_M ``` Other versions: Q2_K (~25.5 GB) `llama cli -hf second-state/CodeLlama-70b-Instruct-hf-GGUF:Q2_K` ### 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 70B Instruct (Q4_K_M, needs ~41.4 GB, from [huggingface.co/second-state](https://huggingface.co/second-state/CodeLlama-70b-Instruct-hf-GGUF/tree/34ef8185fca7ec48c52ca7aec7711d7d893efa82)) ```sh lms get https://huggingface.co/second-state/CodeLlama-70b-Instruct-hf-GGUF@Q4_K_M -y ``` 3. Then run lms ls to see its name, and lms chat followed by that name Other versions: Q2_K (~25.5 GB) `lms get https://huggingface.co/second-state/CodeLlama-70b-Instruct-hf-GGUF@Q2_K -y` · 4bit (~39.2 GB, Mac only) `lms get https://huggingface.co/mlx-community/CodeLlama-70b-Instruct-hf-4bit-MLX -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 70B Instruct (Q4_K_M, needs ~41.9 GB, from [ollama.com](https://ollama.com/library/codellama/tags)) ```sh ollama run codellama:70b-instruct-q4_K_M ``` Other versions: Q8_0 (~83.3 GB) `ollama run codellama:70b-instruct-q8_0` ### MLX (Mac) 1. Install MLX (Mac). Apple silicon Macs only, text only. ```sh # with uv uv tool install mlx-lm # or pip install mlx-lm ``` 2. Run Code Llama 70B Instruct (4bit, needs ~39.2 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/CodeLlama-70b-Instruct-hf-4bit-MLX/tree/5a5d71cbdd4ea4fbe48934255d21e7fbe9026c51)) ```sh mlx_lm.chat --model mlx-community/CodeLlama-70b-Instruct-hf-4bit-MLX ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/CodeLlama-70b-Instruct-hf-4bit-MLX ``` Model repository and documentation: [huggingface.co/codellama](https://huggingface.co/codellama/CodeLlama-70b-Instruct-hf) [interactive version](https://whatmodel.sh/model/codellama-70b-instruct) · [JSON](https://whatmodel.sh/api?format=json&all=1)