CodeLlama-7b-hf
Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 34 billion parameters. This is the repository for the base 7B version in the Hugging Face Transformers format. This model is designed for general code synthesis and understanding. Links to other models can be found in the index at the bottom.
Params
6.7 B
Context
16,384
Downloads 30d
325 K
Likes
379
Download history
daily snapshots · 55 days
▲ 200 K in the last 30 days (38.2%)
527 K259 K
Aug 22Sep 1Sep 11Sep 20
527 K238 K
Jul 28Aug 15Sep 2Sep 20
Can you run it?
Estimated VRAM at 8K context unless noted. Pick your hardware to see the verdict per quantization.
| File | Quant | Size | Est. VRAM | Verdict on RTX 4090 · 24 GB |
|---|---|---|---|---|
| model.safetensors | bf16 | 13.5 GB | 16.3 GB | ✅ Runs comfortably |
| model.safetensors (bf16, full) | bf16 + 16K ctx | 13.5 GB | 17.3 GB | ✅ Runs comfortably |
Estimate: file size × 1.1 + KV cache at 8K + 0.5 GB overhead. Not a benchmark — how we calculate this.
Run it
copy-paste, exact tags checked against the Hub$ curl -s https://aimodelscomparison.com/api/v1/models/codellama-7b-hf
{
"hf_id": "codellama/CodeLlama-7b-hf",
"params_b": 6.74,
"context_length": 16384,
"license": { "id": "llama2", "commercial": "conditional" },
"downloads_30d": 324728,
"vram_estimates": [
{ "quant": "bf16", "gb": 16.3 }
],
"updated_at": "2026-07-28T18:07:27Z"
}
Specifications
- Architecture
- LlamaForCausalLM
- Parameters
- 6.7 B
- Tensor type
- BF16
- Context length
- 16,384
- Vocabulary
- 32,016
- Layers / heads
- 32 / 32
- Licence
- llama2
- First seen on the Hub
- 2023-08-24
- Training datasets
- undisclosed
- Added to our catalog
- 2026-07-28
Compare with any text-generation model
Popular comparisons
Appears in