codellama_codellama-70b-hf needs about 44.6 GB of memory at Q4_K_M (a 41.4 GB file) with an 8K context window, so it fits on a 48 GB GPU. This repository has 10 quants, from 25.5 GB (Q2_K) to 48.8 GB (Q5_K_M).
CodeLlama 70B – large‑scale code generation model in GGUF format
CodeLlama 70B is a 69‑billion‑parameter autoregressive model designed for code synthesis and understanding. It supports up to 16k training context tokens and 100k inference context tokens. The GGUF files are quantised by TheBloke for efficient local deployment.
Good at
- Code completion
- Code understanding
- Large context handling
Limits
- No vision support
- Requires large VRAM for full precision
- License governed by Meta
Best for
- Developers needing high‑quality code generation
- Research on code synthesis
- Large‑scale code analysis
Who it’s for. This model is intended for developers, researchers, and enterprises that require advanced code generation capabilities. It is suitable for use in local inference environments with sufficient GPU memory.
Quants & memory
| Quant | File | Est. memory | vs VRAM | Result | |
|---|---|---|---|---|---|
| Q2_K | 25.5 GB | 28.6 GB | Too big | Get file → | |
| Q3_K_S | 29.9 GB | 33.1 GB | Too big | Get file → | |
| Q3_K_M | 33.3 GB | 36.5 GB | Too big | Get file → | |
| Q3_K_L | 36.1 GB | 39.3 GB | Too big | Get file → | |
| Q4_0 | 38.9 GB | 42.1 GB | Too big | Get file → | |
| Q4_K_S | 39.2 GB | 42.4 GB | Too big | Get file → | |
| Q4_K_M | 41.4 GB | 44.6 GB | Too big | Get file → | |
| Q5_0 | 47.5 GB | 50.6 GB | Too big | Get file → | |
| Q5_K_S | 47.5 GB | 50.6 GB | Too big | Get file → | |
| Q5_K_M | 48.8 GB | 51.9 GB | Too big | Get file → |
For 8‑GB VRAM, use Q4_K or Q4_K_S (≈42‑44 GB memory at 8k context). For 16‑GB VRAM, Q5_K_M or Q5_0 (≈51‑52 GB). For 32‑GB VRAM, Q4_K_M or Q4_0 (≈44‑45 GB). Estimates are approximate.
What GPU do you need for codellama_codellama-70b-hf?
These figures add the file size, an fp16 KV cache at an 8K context window (worked out from this model’s own header) and about 0.5 GB for the runtime. They are estimates, so leave a little headroom, and expect to use less context or a smaller quant if you are right at the limit.
- 4 GB VRAM: no quant fits at an 8K context.
- 6 GB VRAM: no quant fits at an 8K context.
- 8 GB VRAM: no quant fits at an 8K context.
- 12 GB VRAM: no quant fits at an 8K context.
- 16 GB VRAM: no quant fits at an 8K context.
- 24 GB VRAM: no quant fits at an 8K context.
- 32 GB VRAM: the best quant that fits is Q2_K (25.5 GB file, about 28.6 GB in use).
- 48 GB VRAM: the best quant that fits is Q4_K_M (41.4 GB file, about 44.6 GB in use).
Which codellama_codellama-70b-hf quant should you choose?
Q4_K_M is the usual starting point for codellama_codellama-70b-hf: it balances file size and quality well. Here it is a 41.4 GB file.
If memory is tight, the smallest file is Q2_K at 25.5 GB, with the quality trade-offs that come with fewer bits. Use it only when memory is very tight. Expect a clear drop in quality, which is usually worse on small models and easier to live with on large ones.
New to quant names? Read GGUF quantization explained.
Specifications
Architecture from the GGUF header
Source
Frequently asked questions about codellama_codellama-70b-hf
How much VRAM does codellama_codellama-70b-hf need?
About 44.6 GB at Q4_K_M with an 8K context window. That is the 41.4 GB file, plus the KV cache and roughly 0.5 GB of runtime overhead. Smaller quants need less and longer context needs more.
Can I run codellama_codellama-70b-hf on an 8 GB GPU?
Not at an 8K context. The smallest file needs about 28.6 GB, so you would need a larger GPU or CPU offloading.
What is the file size of codellama_codellama-70b-hf GGUF?
It depends on the quant: Q2_K is 25.5 GB, Q3_K_S is 29.9 GB, Q3_K_M is 33.3 GB, Q3_K_L is 36.1 GB, Q4_0 is 38.9 GB, Q4_K_S is 39.2 GB and 4 more.
What context length does codellama_codellama-70b-hf support?
The GGUF header lists a trained context length of 16,384 tokens (16K). The KV cache grows with the context you use: about 2.7 GB at 8K and 5.4 GB at 16K.
Where can I download codellama_codellama-70b-hf GGUF?
The files are on Hugging Face in the TheBloke/CodeLlama-70B-hf-GGUF repository. The download buttons on this page open the file on Hugging Face. ggufmodels.com does not host any model files.
What license does codellama_codellama-70b-hf use?
Hugging Face lists the license as llama2. Licenses can differ between the quantized files and the original model, so check the repository and the base model before commercial use.
Can I run CodeLlama 70B on 8 GB VRAM?
Use Q4_K or Q4_K_S quantisation; memory usage will be around 42‑44 GB at 8k context, which exceeds 8 GB VRAM, so it is not feasible.
What context length does the model support?
The model was trained with 16k tokens and supports up to 100k tokens at inference time.
Is the model licensed for commercial use?
Yes, it is governed by the Meta license, which allows commercial use under the specified terms.