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
151 K
Likes
379
Download history
daily snapshots · 106 days
▲ 257 K in the last 30 days (63.1%)
400 K151 K
Oct 12Oct 22Nov 1Nov 10
527 K151 K
Aug 13Sep 12Oct 12Nov 10
527 K151 K
Jul 28Sep 1Oct 6Nov 10
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": 150591,
"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