Code Llama models
3 Code Llama models from Meta on Hugging Face, from 6.7B to 33.7B parameters, published by Meta in BF16, with a 16K-token context. The smallest official model, CodeLlama-7b-hf, needs about 15.1 GB of VRAM at its published precision; the cheapest live fit is RTX A4000 at $0.173/hr.
Part of the Llama series
Pick a size
One row per official Code Llama size: the VRAM it needs at each precision, the cheapest GPU that holds it today, and the KV cache for a 32K-token context.
| Model | Parameters | Native VRAM | FP8 VRAM | INT4 VRAM | Live GPU fit (native) | Est. $/hr | KV cache at 32K |
|---|---|---|---|---|---|---|---|
| CodeLlama-7b-hf | 6.7B | 15.1 GB | 7.5 GB | 3.8 GB | RTX A4000 | $0.173/hr | 16.0 GB |
| CodeLlama-34b-Instruct-hf | 33.7B | 75.4 GB | 37.7 GB | 18.9 GB | A100 | $1.18/hr | 6.0 GB |
VRAM is weights times a flat 1.2 overhead; the KV cache is a separate per-model figure at 16-bit, shown where the architecture is published. See the methodology.
Official models (3)
| Model | Parameters | Published as | VRAM needed | Live GPU fit | Est. $/hr |
|---|---|---|---|---|---|
| CodeLlama-7b-hf | 6.7B | BF16 | 15.1 GB | RTX A4000 | $0.173/hr |
| CodeLlama-7b-Instruct-hf | 6.7B | BF16 | 15.1 GB | RTX A4000 | $0.173/hr |
| CodeLlama-34b-Instruct-hf | 33.7B | BF16 | 75.4 GB | A100 | $1.18/hr |
VRAM is for the precision the model is published in: the weights times a flat 1.2 overhead, with the KV cache not included. See the methodology. The fit shown is the lowest-priced single GPU type that holds the model at that precision, or the lowest-priced multi-GPU set (up to 8) when none does.