LLMs ·

Code Llama 34B Instruct

Parameters
34B
Architecture
Dense
Max context
16K tokens
License
llama2
Released
2023-08

How to run it

Quickest · Ollama

One command downloads a ready-to-run version and starts a chat.

Get Ollama at ollama.com/download (opens in a new tab) · model page (opens in a new tab)

ollama run codellama:34b

Quantized files · GGUF

Works in LM Studio, llama.cpp, Jan and Ollama. No sign-in needed.

huggingface.co/TheBloke/CodeLlama-34B-Instruct-GGUF (opens in a new tab)

ollama run hf.co/TheBloke/CodeLlama-34B-Instruct-GGUF

Original weights · Hugging Face

Full-precision files from Meta, for fine-tuning, vLLM, Transformers.

huggingface.co/meta-llama/CodeLlama-34b-Instruct-hf (opens in a new tab)

Free Hugging Face account needed: request access on the model page, and Meta approves it (usually within minutes to a few hours).

Official repo · GitHub

Reference code, inference scripts and docs from Meta. The weights themselves download from Hugging Face.

github.com/meta-llama/codellama (opens in a new tab)

Meta’s official Code Llama repo.

git clone https://github.com/meta-llama/codellama

Apps that run Code Llama 34B Instruct

Our pick for each kind of computer, assuming the model fits in its memory. Pick your own GPU or device in the Model Finder for an exact answer.

Mac (Apple silicon)

LM Studio

Runs the MLX build, typically up to 10% faster than GGUF for a model with 33.7B active parameters on Apple silicon.

Also good:

Windows PC, NVIDIA GPU

Ollama

One command with Ollama’s own build of this model.

Also good:

Windows PC, AMD Radeon

Lemonade

AMD’s own app: llama.cpp tuned for Radeon on Vulkan and ROCm.

Also good:

Linux, NVIDIA GPU

Ollama

One command with Ollama’s own build of this model.

Also good:

Linux server, 80 GB+ GPUs

vLLM

The full model fits in GPU memory at 8-bit, so it can batch many requests: best for serving a team or an app.

Also good:

App Type Opens it as Systems Engine Start
LM Studio Desktop app GGUF or MLX macOSWindowsLinux llama.cpp, MLX Open in LM Studio
Ollama CLI + API Ollama library macOSWindowsLinux llama.cpp, MLX
ollama run codellama:34b
llama.cpp CLI + API GGUF macOSWindowsLinux llama.cpp
llama-server -hf TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
Jan Desktop app GGUF or MLX macOSWindowsLinux llama.cpp, MLX Open in Jan
MLX LM CLI + API MLX macOS MLX
mlx_lm.chat --model mlx-community/CodeLlama-34b-Instruct-hf-4bit
vLLM Server Original weights WSLWindowsLinux vLLM
vllm serve meta-llama/CodeLlama-34b-Instruct-hf
SGLang Server Original weights WSLWindowsLinux SGLang
python3 -m sglang.launch_server --model-path meta-llama/CodeLlama-34b-Instruct-hf
Docker Model Runner CLI + API GGUF macOSWindowsLinux llama.cpp, vLLM
docker model run hf.co/TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
Lemonade Desktop app GGUF macOSWindowsLinux llama.cpp, ONNX Runtime GenAI
lemonade pull TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
Unsloth Desktop Desktop app GGUF or MLX macOSWindowsLinux llama.cpp, MLX, stable-diffusion.cpp Open in Unsloth Desktop
Atomic Chat Desktop app GGUF or MLX macOSWindowsLinux llama.cpp, MLX-VLM Open in Atomic Chat
Pi Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp or MLX LM Point it at a llama.cpp or MLX LM server
Hermes Agent Assistant GGUF or MLX macOSWSLWindowsLinux uses llama.cpp or MLX LM Point it at a llama.cpp or MLX LM server
OpenClaw Assistant GGUF or MLX macOSWSLWindowsLinux uses llama.cpp or MLX LM Point it at a llama.cpp or MLX LM server
OpenCode Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Codex CLI Coding agent GGUF or MLX macOSWSLWindowsLinux uses Ollama or any OpenAI-compatible server Point it at a llama.cpp or MLX LM server
OpenHands Coding agent GGUF or MLX macOSWSLWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Zed Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Cline Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Open Interpreter Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Goose Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Aider Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Crush Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Qwen Code Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Kilo Code Coding agent GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Open WebUI Assistant GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Khoj Assistant GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
Letta Assistant GGUF or MLX macOSWindowsLinux uses llama.cpp, Ollama or LM Studio Point it at a llama.cpp or MLX LM server
GPT4All Desktop app GGUF macOSWindowsLinux llama.cpp Get GPT4All
KoboldCpp Desktop app GGUF macOSWindowsLinux llama.cpp Get KoboldCpp
Text Generation WebUI Desktop app GGUF macOSWindowsLinux llama.cpp, Transformers, ExLlamaV3 Get Text Generation WebUI
llamafile CLI + API GGUF macOSWindowsLinux llama.cpp Get llamafile
Msty Studio Desktop app GGUF or MLX macOSWindowsLinux Ollama, llama.cpp, MLX Open in Msty Studio
Llama (macOS) Desktop app GGUF macOS llama.cpp Open in Llama (macOS)
RecurseChat Desktop app GGUF macOS llama.cpp Open in RecurseChat
Inferencer Desktop app MLX macOS MLX Get Inferencer
node-llama-cpp Library GGUF macOSWindowsLinux llama.cpp Get node-llama-cpp
exo Server MLX macOSLinux MLX Get exo
Continue Coding agent GGUF or MLX macOSWindowsLinux uses Ollama, LM Studio or llama.cpp Point it at a llama.cpp or MLX LM server
SillyTavern Assistant GGUF or MLX macOSWindowsLinux uses Ollama, LM Studio or llama.cpp Point it at a llama.cpp or MLX LM server
LibreChat Assistant GGUF or MLX macOSWindowsLinux uses Ollama, LM Studio or llama.cpp Point it at a llama.cpp or MLX LM server
Cherry Studio Assistant GGUF or MLX macOSWindowsLinux uses Ollama, LM Studio or llama.cpp Point it at a llama.cpp or MLX LM server
Chatbox Assistant GGUF or MLX macOSWindowsLinux uses Ollama, LM Studio or llama.cpp Point it at a llama.cpp or MLX LM server
PrivateGPT Assistant GGUF or MLX macOSWindowsLinux uses Ollama, LM Studio or llama.cpp Point it at a llama.cpp or MLX LM server
PocketPal AI Mobile app GGUF iOSAndroid llama.cpp App Store Google Play
ChatterUI Mobile app GGUF Android llama.cpp Download the APK
LLM Farm Mobile app GGUF iOS llama.cpp Not on the App Store or TestFlight for now (checked 2026-11-09).

Which apps can open a model depends on the files published for it: GGUF for llama.cpp-based apps, MLX for Apple’s engine, the original weights for vLLM and SGLang. Compare every app.

Memory needed

Weights plus KV cache and runtime overhead. Leave a little extra free for the operating system and other apps. Try another context length.

Quantization Quality Weights Total at 8K context Total at 16K context Download
Q2_K Low 13.5 GB 15.7 GB 17.3 GB GGUF (opens in a new tab)
Q3_K_M Low 16.5 GB 18.7 GB 20.4 GB GGUF (opens in a new tab)
Q4_K_M Good 20.6 GB 22.8 GB 24.4 GB GGUF (opens in a new tab)
Q5_K_M High 24.0 GB 26.2 GB 27.8 GB GGUF (opens in a new tab)
Q6_K High 27.7 GB 29.9 GB 31.5 GB GGUF (opens in a new tab)
Q8_0 Very high 35.8 GB 38.0 GB 39.6 GB GGUF (opens in a new tab)
F16 Full 67.5 GB 69.7 GB 71.3 GB Original weights (opens in a new tab)

Best hardware for Code Llama 34B Instruct

The least expensive GPU in our catalog that runs it without offloading is the AMD Radeon RX 7900 XT (launch price $899) at Q2_K.

Quality Hardware Quant Memory Speed Runs
36Basic quality (D) · 36 of 100: how capable the model is at Q4_K_M, whatever it runs on. Match score 71/100 (quality, fit, speed and memory use) sets the ranking. NVIDIA GeForce RTX 5090 Founders EditionNVIDIA GeForce RTX 5090 Q4_K_M 24.4 GB / 32.0 GB 65.2 tok/s Runs great
36Basic quality (D) · 36 of 100: how capable the model is at Q4_K_M, whatever it runs on. Match score 69/100 (quality, fit, speed and memory use) sets the ranking. NVIDIA GeForce RTX 4090 Founders EditionNVIDIA GeForce RTX 4090 Q4_K_M 24.0 GB / 24.0 GB 36.7 tok/s Runs welltight fit
31Basic quality (D) · 31 of 100: how capable the model is at Q3_K_M, whatever it runs on. Match score 69/100 (quality, fit, speed and memory use) sets the ranking. ASUS ROG Strix GeForce RTX 3090 OC Edition 24GB GDDR6XNVIDIA GeForce RTX 3090 Q3_K_M 19.9 GB / 24.0 GB 44.0 tok/s Runs great
31Basic quality (D) · 31 of 100: how capable the model is at Q3_K_M, whatever it runs on. Match score 69/100 (quality, fit, speed and memory use) sets the ranking. Sapphire NITRO+ AMD Radeon RX 7900 XTX Vapor-X 24GBAMD Radeon RX 7900 XTX Q3_K_M 19.9 GB / 24.0 GB 38.9 tok/s Runs great
37Basic quality (D) · 37 of 100: how capable the model is at Q6_K, whatever it runs on. Match score 65/100 (quality, fit, speed and memory use) sets the ranking. NVIDIA RTX PRO 6000 Blackwell Workstation EditionNVIDIA RTX PRO 6000 Blackwell Q6_K 34.7 GB / 96.0 GB 45.2 tok/s Runs great
36Basic quality (D) · 36 of 100: how capable the model is at Q4_K_M, whatever it runs on. Match score 63/100 (quality, fit, speed and memory use) sets the ranking. Apple MacBook Pro (14-inch, M4 Pro or M4 Max, 2024)Apple M4 Max (64 GB) Q4_K_M 26.6 GB / 48.0 GB 17.1 tok/s Runs well
36Basic quality (D) · 36 of 100: how capable the model is at Q4_K_M, whatever it runs on. Match score 62/100 (quality, fit, speed and memory use) sets the ranking. Apple MacBook Pro (14-inch, 2021) (M1 Pro or M1 Max)Apple M1 Max (64 GB) Q4_K_M 26.6 GB / 48.0 GB 12.5 tok/s Runs well
31Basic quality (D) · 31 of 100: how capable the model is at Q3_K_M, whatever it runs on. Match score 61/100 (quality, fit, speed and memory use) sets the ranking. Apple MacBook Pro (14-inch, M4 Pro or M4 Max, 2024)Apple M4 Pro (48 GB) Q3_K_M 21.6 GB / 36.0 GB 11.1 tok/s Runs well
36Basic quality (D) · 36 of 100: how capable the model is at Q4_K_M, whatever it runs on. Match score 58/100 (quality, fit, speed and memory use) sets the ranking. Apple Mac Studio (2023) (M2 Max or M2 Ultra)Apple M2 Ultra (192 GB) Q4_K_M 34.3 GB / 144 GB 25.1 tok/s Runs well
36Basic quality (D) · 36 of 100: how capable the model is at Q4_K_M, whatever it runs on. Match score 58/100 (quality, fit, speed and memory use) sets the ranking. Apple MacBook Pro (14-inch, M4 Pro or M4 Max, 2024)Apple M4 Max (128 GB) Q4_K_M 30.5 GB / 96.0 GB 17.1 tok/s Runs well

Check it on your own hardware

Run it on a cluster

Devices that can’t run Code Llama 34B Instruct alone can run it together. These example clusters do:

Try it with your own devices

Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.

Was this page helpful?