CodeLlama 70B Instruct HF — Hardware Requirements & GPU Compatibility
ChatCodeCodeLlama-70B-Instruct is Meta's largest Code Llama model, a 69-billion-parameter, instruction-tuned member of the Code Llama family (7B to 70B) built on Llama 2 for general code synthesis, completion, and chat-style coding assistance. Unlike the smaller Code Llama sizes, the 70B Instruct model uses a different chat prompt template, reflecting extra fine-tuning changes made specifically for this larger variant; separate base and Python-specialist versions are also available at the same size. It is not a Python-only or infilling-focused model, but a general instruction-following code assistant. At 69 billion parameters, it needs a multi-GPU workstation or server to run, even once quantized. Context length is 4,096 tokens. It is released under Meta's Llama 2 Community License, a custom license that is free for most commercial and research use but requires organizations with more than 700 million monthly active users to request separate permission from Meta. It was published in January 2024.
Usable on a 24 GB GPU
Runs on 24 GB (IQ2_S · ~29 tok/s · 4K)Macs from 32 GB (IQ3_XXS · ~10 tok/s)
Llama 2 Community
Reference GPU · RTX 4090 24 GB
Estimates, ±20% · how we estimate
Run CodeLlama 70B Instruct HF
One recommended way. Every other method, OS and quant is in the step-by-step guide.Each way opens a step-by-step guide for your OS and quant.
Recommended
ollama run codellama:70b-instruct-q4_K_MQ4_K_M · needs ~43.0 GB · 4K context
Download: CodeLlama-70b-Instruct-hf.i1-Q4_K_M.gguf41.42 GBmradermacher
Ways to runOther ways
each opens step-by-stepRun in cloud
Your own private copy · Q4_K_M · 48 GB GPU
- The easiest way to try this model
- Running in a few minutes, easy setup
- Chat right here or connect any app
$5+ bonus for new users
Runs on A100 80GB (37 GB headroom) · Q4_K_M
- Generation speed
- ~31 tok/s
- generation speed
- Cost per 1M output tokens
- $10.08
- per 1M output tokens
How Much VRAM Does CodeLlama 70B Instruct HF Need?
Select a quantization level; the listed hardware adheres to it.
| Quantization | VRAM | +32K | On RTX 4090 (reference) | |
|---|---|---|---|---|
| 30.3 GB | — | 2-bit · K-quant — 2-bit quantization with K-quant improvements | Does not fit: needs 30.3 GB | |
| 31.1 GB | — | 3-bit small — 3-bit small quantization | Does not fit: needs 31.2 GB | |
| 34.6 GB | — | 3-bit medium — 3-bit medium quantization | Does not fit: needs 34.6 GB | |
| 35.5 GB | — | 4-bit · legacy — 4-bit legacy quantization | Does not fit: needs 35.5 GB | |
| 42.4 GB | — | 4-bit medium — 4-bit medium quantization — most popular sweet spot | Does not fit: needs 42.4 GB | |
| 50.1 GB | — | 5-bit medium — 5-bit medium quantization — good quality/size tradeoff | Does not fit: needs 50.1 GB | |
| 57.9 GB | — | 6-bit, very good — 6-bit quantization, very good quality | Does not fit: needs 57.9 GB | |
| 70.0 GB | — | 8-bit, near-lossless — 8-bit quantization, near-lossless | Does not fit: needs 70 GB |
Selected Q4_K_M
4-bit medium quantization43.0GBat 4K context
- Weights
- 41.4 GB
- KV cache
- 1.3 GB
- Overhead
- 0.3 GB
Doesn't fit RTX 4090 (reference) · needs 19.0 GB more, IQ2_S fits
Or .
Which Hardware Can Run CodeLlama 70B Instruct HF?
Q4_K_M · 42.4 GBCodeLlama 70B Instruct HF (Q4_K_M) requires 42.4 GB of VRAM to load the model weights. For comfortable inference with headroom for KV cache and system overhead, 56+ GB is recommended. Using the full 4K context window can add up to 0.7 GB, bringing total usage to 43.0 GB. No consumer GPU has enough memory. 67 devices with unified memory can run CodeLlama 70B Instruct HF, including Mac Studio (M3 Ultra, 256GB), Mac Studio (M3 Ultra, 512GB), Mac Pro M2 Ultra (64 GB).
≤ 20 GB
≤ 20 GB tier →doesn't fit · smallest quant needs 20.6 GB
32–40 GB
Q4_K_M · best fit Q3_K_S (31.8 GB)
1 GPU · 2 Mac classes · 1 device family
RTX 5090~37Simulate output on RTX 5090M5 Max36 GB~10Simulate output on Mac Studio M5 Max (36 GB)M3 Pro*36 GB~3Simulate output on MacBook Pro 14" M3 Pro (36 GB)Orin~4Simulate output on NVIDIA Jetson AGX Orin 32GB48 GB
48 GB tier →fits · 5.0 GB free · up to 4K ctx
2 Mac classes · 1 device family
M5 Max48 GB~10Simulate output on Mac Studio M5 Max (48 GB)M5 Pro48 GB~5Simulate output on Mac Mini M5 Pro (48 GB)Snapdragon X2 Elite Extreme (X2E-96-100)~4Simulate output on Snapdragon X2 Elite Extreme Copilot+ PC
By VRAM tier · typical GPUs and Macs at Q4_K_M
How good is CodeLlama 70B Instruct HF?
llmrun Score blends public benchmark boards into one number; 100 = the average open model.
Not enough data yet for an llmrun Score.
A Score needs results on enough independent boards. How the Composite Score is built
Benchmarks
This is the single board showing results for this model; badges show who ran the test.
- LMArena Text
LMArena · Oct 2026Arena
Arena1119.2
#179/188 open
Alternatives to CodeLlama 70B Instruct HF
Code Llama family · 4 models →Similar models
6| Model | Score | VRAM | tok/s | Why it is similar |
|---|---|---|---|---|
| Qwen2.5 VL 72B InstructAlibaba | — | 49.7 GB | —needs > 24 GB | same size |
| Llama 3.1 Tulu 3 70BAllen AI | — | 48 GB | —needs > 24 GB | same size |
| Qwen2 VL 72B InstructAlibaba | — | 49.7 GB | —needs > 24 GB | same size |
| Qwen1.5 72B ChatAlibaba | — | 86.6 GB | —needs > 24 GB | same size |
| StableBeluga2Stability AI | — | 23.5 GB | ~29 | same size |
| Apertus 70B 2509swiss-ai | — | 48 GB | —needs > 24 GB | same size |
Specifications
- Publisher
- Meta
- Family
- Code Llama
- Parameters
- 69.0B
- Architecture
- LlamaForCausalLM
- Context Length
- 4,096 tokens
- Vocabulary Size
- 32,016
- Release Date
- 2024-01-29
- License
- Llama 2 Community
Frequently Asked Questions
How much VRAM does CodeLlama 70B Instruct HF need?
CodeLlama 70B Instruct HF requires 42.4 GB of VRAM at Q4_K_M, or 138.9 GB at BF16. Full 4K context adds up to 0.7 GB (43.0 GB total).
VRAM = Weights + KV Cache + Overhead
Weights = 69.0B × 4.8 bits ÷ 8 = 41.4 GB
KV Cache + Overhead ≈ 1 GB (at 2K context + ~0.3 GB framework)
Fit ratings and hardware model lists check this model with room for a 16K-token context, which needs a little more memory.
KV Cache + Overhead ≈ 1.6 GB (at full 4K context)
VRAM usage by quantization
Can NVIDIA GeForce RTX 4090 run CodeLlama 70B Instruct HF?
Yes, at IQ2_S (22.5 GB) or lower. Higher quantizations like IQ2_M (24.3 GB) exceed the NVIDIA GeForce RTX 4090's 24 GB.
What's the best quantization for CodeLlama 70B Instruct HF?
For CodeLlama 70B Instruct HF, Q4_K_M (42.4 GB) offers the best balance of quality and VRAM usage. Q5_0 (44.1 GB) provides better quality if you have the VRAM. The smallest option is IQ2_XXS at 19.9 GB.
VRAM requirement by quantization
★ Recommended — best balance of quality and VRAM usage.
Can I run CodeLlama 70B Instruct HF on a Mac?
Yes — Mac Studio M1 Max (32 GB) and 84 other Macs can run CodeLlama 70B Instruct HF, the smallest at IQ3_XXS. Apple Silicon uses unified memory, so the model shares RAM with the system. At Q4_K_M you need at least 42.4 GB of usable unified memory (RAM minus macOS overhead), from Mac Studio M5 Max (48 GB).
Can I run CodeLlama 70B Instruct HF locally?
Yes — CodeLlama 70B Instruct HF can run locally on consumer hardware. Popular tools include Ollama, LM Studio, and llama.cpp.
How fast is CodeLlama 70B Instruct HF?
At Q4_K_M, CodeLlama 70B Instruct HF can reach ~113 tok/s on AMD Instinct MI350X. Speed depends mainly on GPU memory bandwidth. Real-world results typically within ±20%.
tok/s = (bandwidth GB/s ÷ model GB) × efficiency
Example: NVIDIA B200 → 8000 ÷ 42.4 × 0.65 = ~123 tok/s
Estimated speed at Q4_K_M (42.4 GB)
Real-world results typically within ±20%. Speed depends on batch size, quantization kernel, and software stack.
What's the download size of CodeLlama 70B Instruct HF?
At Q4_K_M, the download is about 41.39 GB. The full-precision BF16 version is 137.95 GB. The smallest option (IQ2_XXS) is 18.97 GB.
Which GPUs can run CodeLlama 70B Instruct HF?
No single consumer GPU has enough VRAM to run CodeLlama 70B Instruct HF at Q4_K_M (42.4 GB). Multi-GPU or professional hardware is required.
Which devices can run CodeLlama 70B Instruct HF?
67 devices with unified memory can run CodeLlama 70B Instruct HF at Q4_K_M (42.4 GB), including ASUS Ascent GX10, Beelink GTR9 Pro (Ryzen AI Max+ 395, 128 GB), Framework Desktop (Ryzen AI Max+ 395, 128 GB), GMKtec EVO-X2 (Ryzen AI Max+ 395, 128 GB). Apple Silicon Macs use unified memory shared between CPU and GPU, making them well-suited for local LLM inference.