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.
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
Get Started
HuggingFace
How Much VRAM Does CodeLlama 70B Instruct HF Need?
Select a quantization to see compatible GPUs below.
| Quantization | Bits | VRAM | + Context | File Size | Quality |
|---|---|---|---|---|---|
| Q2_K | 3.40 | 30.3 GB | 31.0 GB | 29.32 GB | 2-bit quantization with K-quant improvements |
| Q3_K_S | 3.50 | 31.1 GB | 31.8 GB | 30.18 GB | 3-bit small quantization |
| Q3_K_M | 3.90 | 34.6 GB | 35.3 GB | 33.63 GB | 3-bit medium quantization |
| Q4_0 | 4.00 | 35.5 GB | 36.1 GB | 34.49 GB | 4-bit legacy quantization |
| Q4_K_M | 4.80 | 42.4 GB | 43.0 GB | 41.39 GB | 4-bit medium quantization — most popular sweet spot |
| Q5_K_M | 5.70 | 50.1 GB | 50.8 GB | 49.15 GB | 5-bit medium quantization — good quality/size tradeoff |
| Q6_Kest. | 6.60 | 57.9 GB | 58.5 GB | 56.91 GB | 6-bit quantization, very good quality |
| Q8_0est. | 8.00 | 70.0 GB | 70.6 GB | 68.98 GB | 8-bit quantization, near-lossless |
est.= calculated VRAM estimate; no published GGUF file found for that quantization yet. Other rows are verified against real community uploads.
Which GPUs 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 single GPU has enough memory — multi-GPU or cluster setups are needed.
Which Devices Can Run CodeLlama 70B Instruct HF?
Q4_K_M · 42.4 GB27 devices with unified memory can run CodeLlama 70B Instruct HF, including NVIDIA DGX H100, NVIDIA DGX A100 640GB, MacBook Pro 16" M4 Max (48 GB).
Runs great
— Plenty of headroomWhere to Download CodeLlama 70B Instruct HF
Community quantizations of this model — GGUF for llama.cpp, Ollama, and LM Studio, plus AWQ/MLX variants where available.
Benchmarks
Benchmark details →Related Models
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)
KV Cache + Overhead ≈ 1.6 GB (at full 4K context)
VRAM usage by quantization
Q4_K_M42.4 GBQ4_K_M + full context43.0 GB- Can NVIDIA GeForce RTX 5090 run CodeLlama 70B Instruct HF?
Yes, at Q3_K_S (31.1 GB) or lower. Higher quantizations like IQ3_M (32.0 GB) exceed the NVIDIA GeForce RTX 5090's 32 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 IQ3_XS at 29.4 GB.
VRAM requirement by quantization
IQ3_XS29.4 GBIQ3_M32.0 GBIQ4_XS38.0 GBQ4_K_M ★42.4 GBQ5_K_S48.4 GBBF16138.9 GB★ Recommended — best balance of quality and VRAM usage.
- Can I run CodeLlama 70B Instruct HF on a Mac?
CodeLlama 70B Instruct HF requires at least 29.4 GB at IQ3_XS, which exceeds the unified memory of most consumer Macs. You would need a Mac Studio or Mac Pro with a high-memory configuration.
- Can I run CodeLlama 70B Instruct HF locally?
Yes — CodeLlama 70B Instruct HF can run locally on consumer hardware. At Q4_K_M quantization it needs 42.4 GB of VRAM. 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)
~123 tok/s~123 tok/s~113 tok/sReal-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 (IQ3_XS) is 28.45 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?
27 devices with unified memory can run CodeLlama 70B Instruct HF at Q4_K_M (42.4 GB), including ASUS Ascent GX10, Asus ROG Flow Z13 (2025, Ryzen AI Max+ 395, 128 GB), Beelink GTR9 Pro (Ryzen AI Max+ 395, 128 GB), Framework Desktop (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.