[whatmodel.sh](../../README.md) / Code Llama 34B Instruct # Code Llama 34B Instruct Meta · released 2023-08 · 33.7B params · llama2 **score 41.6** ±0.7 · #538 of 732 · from 16 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 34B Instruct among every model on that task or test, worst to best.
task vs the others rank counts tests coding ▁▁▁▃●▇█▇▅▄▃▁ #369 of 469 57% 6 chat & writing ▁▁▁●▆▄▆█▆▇▇▃ #367 of 402* 8.8% 2 math ▁▁▃▅●▆▄█▄▂▁▁ #301 of 431* 3.4% 1
test result vs the others in its run difficulty counts why HumanEval 51.8% ▁█▄▅▇●·▄▇▅▄▄ beats 23/42 easy · avg 75% 32% sharp · at its level · several runs HumanEvalSynthesize (HumanEvalPac… 41.3% ▁·▂▁▂▆▅●▄▄▁▂ beats 19/35 medium · avg 62% 7.6% at its level MBPP (maker) 57.0% ▃▃▃█··▃●··▅▃ beats 8/11 easy · avg 71% 5.4% at its level HumanEvalExplain (HumanEvalPack, … 30.3% ▄▇█▃▄▇●▁▇▃·▁ beats 26/35 medium · avg 46% 4.7% at its level HumanEvalFix (HumanEvalPack, 6-la… 28.2% ▁·▁▁▄██▄●▁▅▅ beats 23/35 medium · avg 51% 4.4% sharp · at its level Tulu 2: CodexEval pass@10 76.5% ▃▃▃·▆▃▃█●▂▂▅ beats 20/25 easy · avg 83% 2.9% sharp · at its level
test result vs the others in its run difficulty counts why LMArena (text) 1136.9 ▁▁▁●▃▃▃▆▆▇█▃ beats 29/385 avg 1260 4.6% blunt Polyrating rating (bias-aware re-… 1070.0 ▂▁▂▁▃●█▆▇▄▂▂ beats 33/95 avg 1187 4.2% typical
test result vs the others in its run difficulty counts why GSM8K 38.0% ▆▂▅█●▅▃▆···▂ beats 13/25 easy · avg 72% 3.4% sharp · at its level
test result vs the others in its run difficulty counts why EvoEval (overall) 33.3% ▂▂▃▄▄●▁▄▅▃▁▃ beats 21/42 medium · avg 52% 12% at its level BIG-Bench Hard 59.2% ▁·····▂█●▅·▁ beats 17/25 easy · avg 74% 6.4% sharp · at its level BigCodeBench (Complete) 35.1% ▂▁▁▄▂●▇█▆▂▂▂ beats 15/58 medium · avg 48% 4.7% at its level BigCodeBench (Instruct) 28.9% ▃▂·●▆██▆▅▃▃▃ beats 5/33 medium · avg 39% 4.5% at its level MMLU 50.9% ▁▁▃▃▄●▄▁█··▁ beats 11/25 medium · avg 73% 2.8% at its level Tulu 2: TyDiQA gold passage, 1-sh… 55.1% ▂··▁▃▂▂▂█●▁▂ beats 19/25 medium · avg 59% 0.7% blunt · at its level
source results share of the score Top Leaderboard Ranking = Top Coding Pr… 2 32% ▇▇▇▇ Code Llama: Open Foundation Models for … 2 17% ▇▇ Granite Code Models: A Family of Open F… 3 17% ▇▇ Tulu 2 5 16% ▇▇ BigCodeBench paper 2 9% ▇ LMArena leaderboard dataset 1 5% ▇ Polyrating: A Cost-Effective and Bias-A… 1 4% ▇ prior: pull toward the middle 0% ▇ weighted average = 41.6Licences: 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)) · 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)) · Tulu 2 ([CC BY 4.0](../../licenses/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 34B Instruct (Q4_K_M, needs ~20.2 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/CodeLlama-34b-Instruct-hf-GGUF/tree/3238409c5878bdb4eaf71f1892f0da6a4ae8843f)) ```sh llama cli -hf mradermacher/CodeLlama-34b-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 mradermacher/CodeLlama-34b-Instruct-hf-GGUF:Q4_K_M ``` Other versions: Q8_0 (~35.9 GB) `llama cli -hf mradermacher/CodeLlama-34b-Instruct-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 34B Instruct (Q4_K_M, needs ~20.2 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/CodeLlama-34b-Instruct-hf-GGUF/tree/3238409c5878bdb4eaf71f1892f0da6a4ae8843f)) ```sh lms get https://huggingface.co/mradermacher/CodeLlama-34b-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: Q8_0 (~35.9 GB) `lms get https://huggingface.co/mradermacher/CodeLlama-34b-Instruct-hf-GGUF@Q8_0 -y` · 4bit (~19.4 GB, Mac only) `lms get https://huggingface.co/mlx-community/CodeLlama-34b-Instruct-hf-4bit -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 34B Instruct (Q4_K_M, needs ~20.72 GB, from [ollama.com](https://ollama.com/library/codellama/tags)) ```sh ollama run codellama:34b-instruct-q4_K_M ``` Other versions: Q8_0 (~40.94 GB) `ollama run codellama:34b-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 34B Instruct (4bit, needs ~19.4 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/CodeLlama-34b-Instruct-hf-4bit/tree/7f372a865fbe23d97ada15f195092711bc7f56b4)) ```sh mlx_lm.chat --model mlx-community/CodeLlama-34b-Instruct-hf-4bit ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/CodeLlama-34b-Instruct-hf-4bit ``` Model repository and documentation: [huggingface.co/codellama](https://huggingface.co/codellama/CodeLlama-34b-Instruct-hf) [interactive version](https://whatmodel.sh/model/codellama-34b-instruct) · [JSON](https://whatmodel.sh/api?format=json&all=1)