[whatmodel.sh](../../README.md) / Code Llama 70B Python # Code Llama 70B Python Meta · released 2024-01 · 68.98B params · llama2 **score 45.2** ±0.9 · #474 of 732 · from 4 benchmark results across 2 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 Python among every model on that task or test, worst to best.
task vs the others rank counts tests coding ▁▁▁▃▅●█▇▅▄▃▁ #343 of 469 74% 2
test result vs the others in its run difficulty counts why HumanEval 60.4% ▁█▄▅▇█·●▇▅▄▄ beats 25/42 easy · avg 75% 63% sharp · at its level · several runs MBPP (maker) 65.6% ▃▃▃█··▃▅··▅● beats 11/11 easy · avg 71% 11% at its level
test result vs the others in its run difficulty counts why EvoEval (overall) 40.1% ▂▂▃▄▄█▁●▅▃▁▃ beats 26/42 medium · avg 52% 26% at its level
source results share of the score Top Leaderboard Ranking = Top Coding Pr… 2 66% ▇▇▇▇▇▇▇▇ Code Llama: Open Foundation Models for … 2 33% ▇▇▇▇ prior: pull toward the middle 0% ▇ weighted average = 45.2Licences: 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)) ## 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 Python (Q4_K_M, needs ~41.4 GB, from [huggingface.co/TheBloke](https://huggingface.co/TheBloke/CodeLlama-70B-Python-GGUF/tree/93631dc923319a06fcd5acacbd39f30ae9f48610)) ```sh llama cli -hf TheBloke/CodeLlama-70B-Python-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-Python-GGUF:Q4_K_M ``` Other versions: Q2_K (~25.5 GB) `llama cli -hf TheBloke/CodeLlama-70B-Python-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 Python (Q4_K_M, needs ~41.4 GB, from [huggingface.co/TheBloke](https://huggingface.co/TheBloke/CodeLlama-70B-Python-GGUF/tree/93631dc923319a06fcd5acacbd39f30ae9f48610)) ```sh lms get https://huggingface.co/TheBloke/CodeLlama-70B-Python-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-Python-GGUF@Q2_K -y` · 4bit (~39.2 GB, Mac only) `lms get https://huggingface.co/mlx-community/CodeLlama-70b-Python-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 Python (Q4_K_M, needs ~41 GB, from [ollama.com](https://ollama.com/library/codellama/tags)) ```sh ollama run codellama:70b-python-q4_K_M ``` Other versions: Q8_0 (~73 GB) `ollama run codellama:70b-python-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 Python (4bit, needs ~39.2 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/CodeLlama-70b-Python-hf-4bit-MLX/tree/9b9750069185026b24634df2eae3cd74e5a5a31c)) ```sh mlx_lm.chat --model mlx-community/CodeLlama-70b-Python-hf-4bit-MLX ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/CodeLlama-70b-Python-hf-4bit-MLX ``` Model repository and documentation: [huggingface.co/codellama](https://huggingface.co/codellama/CodeLlama-70b-Python-hf) [interactive version](https://whatmodel.sh/model/codellama-70b-python) · [JSON](https://whatmodel.sh/api?format=json&all=1)