bigcode · text

starcoder2-7b

bigcode/starcoder2-7b

starcoder2-7b at Q4_K_M is exactly 4,402,887,488 bytes (4.10 GiB / 4.40 GB) — an effective 4.910 bits per weight, not the nominal 4.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
7.2B
Architecture
starcoder2
32 layers
Context
16,384
native (config.json)
License
bigcode-openrail-m

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q2_K2.54 GiB2,724,543,2963.038second-state
Q3_K_S2.88 GiB3,090,234,1763.446second-state
Q3_K_M3.35 GiB3,594,533,6964.008second-state
Q3_K_L3.71 GiB3,985,587,0084.444second-state
Q4_03.77 GiB4,042,799,9364.508second-state
Q4_K_S3.85 GiB4,128,914,2404.604second-state
Q4_K_M4.10 GiB4,402,887,4884.910second-state
Q5_04.60 GiB4,939,332,4165.508second-state
Q5_K_S4.60 GiB4,939,332,4165.508second-state
Q5_K_M4.77 GiB5,124,832,0645.715second-state
Q6_K5.49 GiB5,891,898,1766.570second-state
Q8_07.10 GiB7,628,929,8568.507second-state

KV cache by context

unresolved

This model declares a 4,096-token sliding window, but we could not establish which layers use it. Its architecture publishes the layout as a per-layer array inside the model file rather than as a period in config.json, and we have not yet ingested that array.

A flat context × layers × heads figure would be substantially too high, so we are not showing one. This is tracked as a known gap rather than filled with a guess.

Compare with

same modality, comparable size

Will it run on your card?

full quant x context sweep

Why other calculators give a different number

A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 3.76 GiB. The real file is 4.10 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
32
Attention heads
36
KV heads
4
Head dim
128
Hidden size
4608
Vocab
49,152
Sliding window
4096
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does starcoder2-7b need?
Q4_K_M is exactly 4,402,887,488 bytes (4.10 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
Which quantization of starcoder2-7b should I use?
Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.