Skip to content
ENExplore Calculators

Model Size In Memory Calculator

Work out model size in memory instantly with clear inputs, formula shown and shareable results.

About Model Size In Memory Calculator

Weight memory is parameters multiplied by bytes per parameter, so precision is the only lever that matters at rest: 7 billion parameters occupy 28 GB in fp32, 14 GB in fp16, 7 GB in int8 and about 3.5 GB in int4. Loader buffers, alignment padding and allocator fragmentation add a single-digit percentage on top.

Formula

Weight footprint

bytes = parameters x bytes per parameter x (1 + overhead); GiB = bytes / 1024^3

Worked example

With the default values below, Model Size In Memory Calculator returns Memory footprint of 14.08 GiB. Change any input above and every figure here is recalculated in your browser.

Inputs used

Parametersminimum 1
7,000,000,000
Numeric precisionone of fp32 - 4 bytes, fp16 / bf16 - 2 bytes, int8 - 1 byte, int4 - 0.5 bytes
fp16 / bf16 - 2 bytes
Loader and buffer overheadaccepts 0–100 %
8 %

Results

Memory footprint
14.08 GiB
Raw weight bytes
13.04 GiB
Overhead
1.04 GiB
Footprint in GiB
14.082 GiB

Step by step

  1. 1Values used
  2. 2Weight footprint
  3. 3Memory footprint= 15,120,000,000
  4. 4Raw weight bytes= 14,000,000,000
  5. 5Overhead= 1,120,000,000
  6. 6Footprint in GiB= 14.082 GiB

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax or compounding frequency into account.
  • Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Is bf16 the same size as fp16?

Yes, both are 2 bytes. bf16 trades mantissa bits for exponent range, which makes training more numerically stable without changing the footprint.

Why do quantised files look larger than the arithmetic suggests?

Quantisation stores scales and zero points per group, and some layers such as embeddings and norms are often kept at higher precision.

Model Size In Memory Calculator – Calculate Memory footprint