How to use the Quantized model size Calculator tool
- Enter the parameter count of the model as a plain whole number, such as 7000000000, in the Number of values field.
- Enter the target precision in the Bits per value field: 4 for 4-bit weights, 8 for INT8, 16 for half precision.
- Select Calculate to get the weight storage.
- Read the first two result lines for the size in bytes and MiB. Divide the MiB figure by 1,024 if you want GiB.
- Change the bit width and calculate again to compare precisions, and select Copy to keep a result.
The formula behind the quantized model size
Weight storage is parameters x bits per weight / 8 bytes. A model with 7 billion parameters at 16 bits needs 14,000,000,000 bytes. Quantize the same weights to 4 bits and the figure drops to 3,500,000,000 bytes, a quarter of the half-precision size.
The tool does this with exact integer arithmetic and rounds up to a whole byte. It also prints Payload, Padding and Efficiency lines, which matter little for a full model: the padding is at most 7 bits in total. The page computes everything locally and needs no model file.
Worked example: a 7 billion parameter model
Running the calculator four times with 7000000000 values gives the table below. The MiB column is the second output line of each run. Divided by 1,024, the 4-bit row is about 3.26 GiB.
Bits Bytes MiB
16 14,000,000,000 13,351.44043
8 7,000,000,000 6,675.720215
4 3,500,000,000 3,337.860107
3 2,625,000,000 2,503.395081Why real files are larger than this estimate
The tool estimates storage before per-group overhead, and that qualifier matters. A quantized checkpoint contains more than packed integers.
The first item in the list below can be estimated. A 16-bit scale for every 32 weights adds 0.5 bits per weight, turning 4 bits into 4.5. The Bits per value field takes whole numbers only, so for that calculation use the Grouped quantization memory Calculator, which adds metadata bytes per group.
- Quantization parameters. Each group or channel of weights stores its own scale, and sometimes a zero point.
- Layers kept at higher precision. Embeddings, normalization weights, biases and output layers are often left at 16 or 32 bits or quantized less aggressively.
- Mixed bit widths. Many schemes give sensitive layers more bits, so the average is above the nominal figure.
- File metadata: tensor names, shapes, the tokenizer vocabulary and alignment padding between tensors.
Disk size is not the memory needed to run the model
The estimate applies to the weights whether they sit on disk, in RAM or in VRAM. Running the model takes more. Inference also allocates activations, and a language model keeps a key-value cache that grows with context length. Some runtimes unpack low-bit weights into wider types for speed. Treat the result as a lower bound when you check whether a model fits on a device.
Frequently asked questions
How big is a 7B model at 4-bit quantization?
The packed weights alone are 3,500,000,000 bytes, about 3.26 GiB. Published 4-bit files of such models are usually larger, because they carry per-group scales and keep some tensors at higher precision.
How do I find the parameter count of my model?
Model cards usually state it. In code, sum the element counts of all weight tensors. Enter the full number with every digit: the field does not accept 7B, 7e9 or 7,000,000,000 with commas.
Can I enter fractional bits per weight such as 4.5?
No. Bits per value must be a whole number from 1 to 64. To model an average of 4.5, calculate 4 and 5 bits and take the midpoint, or account for the overhead separately with the grouped memory tool.
Is the result in MB or MiB?
The second line is in MiB, units of 1,048,576 bytes. Storage vendors and download pages often use decimal units instead. For decimal gigabytes, divide the byte count on the first line by 1,000,000,000.
Does this include the memory needed for the context window?
No. Only the weights are counted. Context-dependent buffers, such as the attention cache of a language model, scale with sequence length and layer count and must be estimated separately.