[whatmodel.sh](../../README.md) / Code Llama 70B (base) # Code Llama 70B (base) Meta · released 2024-01 · 68.98B params · llama2 **score 44.7** ±1.0 · #483 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 70B (base) among every model on that task or test, worst to best.
task    vs the others         rank  counts  tests
coding  ▁▁▁▃▅●█▇▅▄▃▁   #350 of 469     87%      5
coding · #350 of 469 · 87% of its score Beats [LFM2.5 2.6B](lfm2-5-2-6b.md), [LFM2.5 8B-A1B](lfm2-5-8b-a1b.md), [Qwen3-VL 2B Thinking](qwen3-vl-2b-thinking.md) here, though they rank higher overall. Trails [Phi-3-mini-128k-instruct (Apr 2024)](phi-3-mini-128k-instruct.md), [DeepSeek LLM 67B Chat](deepseek-llm-67b-chat.md), [OpenChat 3.5](openchat-3-5.md) here, though they rank lower overall.
test                                result  vs the others in its run  difficulty        counts  why
HumanEval (maker)                    53.0%  █▃▃▅·▃●·▃··▃ beats 8/11   easy · avg 72%       28%  sharp · at its level
HumanEvalSynthesize (HumanEvalPac…   52.8%  ▁·▂▁▂▆▅█▄●▁▂ beats 31/35  medium · avg 62%     19%  at its level
HumanEvalExplain (HumanEvalPack, …   28.2%  ▄▇█▃▄▇●▁▇▃·▁ beats 24/35  medium · avg 46%     13%  at its level
MBPP (maker)                         62.4%  ▃▃▃█··▃▅··●▃ beats 10/11  easy · avg 71%       13%  at its level
HumanEvalFix (HumanEvalPack, 6-la…   32.8%  ▁·▁▁▄██▄█●▅▅ beats 27/35  medium · avg 51%     13%  sharp · at its level
other tests (1)
test                     result  vs the others in its run  difficulty        counts  why
BigCodeBench (Complete)   44.3%  ▂▁▁▄▂▅▇●▆▂▂▂ beats 41/58  medium · avg 48%     12%  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
Granite Code Models: A Family of Open F…        3   46% ▇▇▇▇▇
Code Llama: Open Foundation Models for …        2   41% ▇▇▇▇▇
BigCodeBench paper                              1   12% ▇
prior: pull toward the middle                        0% ▇
weighted average                                   = 44.7
Licences: 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/)) ## 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 (base) (Q4_K_M, needs ~41.4 GB, from [huggingface.co/TheBloke](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/tree/e7f061988e6622bae8cda6cb04e5e0a070f9c077)) ```sh llama cli -hf TheBloke/CodeLlama-70B-hf-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf TheBloke/CodeLlama-70B-hf-GGUF:Q4_K_M ``` Other versions: Q2_K (~25.5 GB) `llama cli -hf TheBloke/CodeLlama-70B-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 (base) (Q4_K_M, needs ~41.4 GB, from [huggingface.co/TheBloke](https://huggingface.co/TheBloke/CodeLlama-70B-hf-GGUF/tree/e7f061988e6622bae8cda6cb04e5e0a070f9c077)) ```sh lms get https://huggingface.co/TheBloke/CodeLlama-70B-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/TheBloke/CodeLlama-70B-hf-GGUF@Q2_K -y` · 4bit (~39.2 GB, Mac only) `lms get https://huggingface.co/mlx-community/CodeLlama-70b-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 (base) (Q4_K_M, needs ~41 GB, from [ollama.com](https://ollama.com/library/codellama/tags)) ```sh ollama run codellama:70b-code-q4_K_M ``` Other versions: Q8_0 (~73 GB) `ollama run codellama:70b-code-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 (base) (4bit, needs ~39.2 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/CodeLlama-70b-hf-4bit-MLX/tree/2fd732eb3a2685a22a03258b8191af356566c203)) ```sh mlx_lm.chat --model mlx-community/CodeLlama-70b-hf-4bit-MLX ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/CodeLlama-70b-hf-4bit-MLX ``` Model repository and documentation: [huggingface.co/codellama](https://huggingface.co/codellama/CodeLlama-70b-hf) [interactive version](https://whatmodel.sh/model/codellama-70b) · [JSON](https://whatmodel.sh/api?format=json&all=1)