bigcode / text-generation updated 2 years ago

starcoder2-3b

StarCoder2-3B model is a 3B parameter model trained on 17 programming languages from The Stack v2, with opt-out requests excluded. The model uses Grouped Query Attention, a context window of 16,384 tokens with a sliding window attention of 4,096 tokens, and was trained using the Fill-in-the-Middle objective on 3+ trillion tokens.

Params
3.0 B
Context
16,384
Downloads 30d
184 K
Likes
221
Licence: bigcode-openrail-m Not gated SAFETENSORS View on Hugging Face ↗

Download history

daily snapshots · 10 days
200 K183 K
Jul 28Jul 31Aug 3Aug 6

Can you run it?

Estimated VRAM at 8K context unless noted. Pick your hardware to see the verdict per quantization.

FileQuantSizeEst. VRAMVerdict on RTX 4090 · 24 GB
model.safetensors f32 12.1 GB 14.3 GB ✅ Runs comfortably
model.safetensors (bf16, full) bf16 + 16K ctx 12.1 GB 14.7 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 · api/v1
$ curl -s https://aimodelscomparison.com/api/v1/models/starcoder2-3b
{
  "hf_id": "bigcode/starcoder2-3b",
  "params_b": 3.03,
  "context_length": 16384,
  "license": { "id": "bigcode-openrail-m", "commercial": "unknown" },
  "downloads_30d": 183925,
  "vram_estimates": [
    { "quant": "f32", "gb": 14.3 }
  ],
  "updated_at": "2026-07-28T18:08:09Z"
}
est. VRAM —on RTX 4090 · 24 GBJSON API →

Specifications

Architecture
Starcoder2ForCausalLM
Parameters
3.0 B
Tensor type
F32
Context length
16,384
Vocabulary
49,152
Layers / heads
30 / 24
Licence
bigcode-openrail-m
First seen on the Hub
2023-11-29
Training datasets
bigcode/the-stack-v2-train
DS-1000 (reported)
25
HumanEval (reported)
31.7
CruxEval-I (reported)
32.7
HumanEval+ (reported)
27.4
GSM8K (PAL) (reported)
27.7
RepoBench-v1.1 (reported)
71.19
Added to our catalog
2026-07-28