Frequently Asked Questions
How does the Neural Network Tensor Memory & Quantization Compression (FP32/BF16/INT8/INT4) Calculator compute capacity?
It evaluates EffectiveBits = QuantBits + (16 / GroupSize); Size_GiB = (Elements × EffectiveBits / 8) / 2³⁰ directly in your browser and plots three custom SVG diagrams.
Why is the FP16 footprint 59.6 GiB and not 64 GB for 32 billion weights?
Both are correct in different units. Thirty-two billion weights at 2 bytes each is 64 billion bytes, which is 64 decimal gigabytes. The calculator reports binary gibibytes, where one GiB is 2 to the power 30 bytes, about 7% bigger than a GB. Dividing 64 billion bytes by that larger unit gives 59.6 GiB. Tools such as nvidia-smi also report binary units.
Is BF16 or FP16 smaller in memory?
Neither. Both formats use 16 bits, so both take 2 bytes per weight and the calculator shows them as one line. They differ in how those bits are split. BF16 has an 8-bit exponent and 7 fraction bits, so it covers the FP32 range with coarse precision. FP16 has a 5-bit exponent and 10 fraction bits, so it is finer near 1 but overflows above about sixty-five thousand.
What does machine epsilon mean for these formats?
It is the gap between 1 and the next number the format can store, so it tells you the relative precision available. FP32 has an epsilon of 2 to the minus 23, about 1.19 times 10 to the minus 7. FP16 has 2 to the minus 10, about 0.000977. BF16 has 2 to the minus 7, which is 0.0078125. Smaller epsilon means finer steps between neighbouring values.
Does the calculator count a zero point as well as a scale?
No. It assumes one 16-bit scale per group, which adds 16 divided by the group size to every weight. Asymmetric schemes that also store a zero point, or formats with a second scale level, carry a little more metadata. For those, add the extra bits by hand or treat the displayed footprint as a minimum and check it against a real checkpoint file.
Will a 4-bit 32 billion weight model run on a 16 GiB GPU?
Probably not in practice. The weights alone come to 15.37 GiB at a group size of 128 here, which leaves almost no room for the KV cache, activations or the runtime's own buffers. Short prompts might load, but longer contexts would run out of memory. A card with clear headroom above the weight figure, or a lower bit width, is the safer plan.
Why is the read time 16.5 ms when the footprint is 15.37 GiB?
They are the same data in different units. The read time divides bytes by bandwidth in decimal GB/s, so 16.5 billion bytes at 1000 GB/s takes 16.5 ms. The footprint is the same 16.5 billion bytes expressed in binary GiB, which comes to 15.37. Peak bandwidth is rarely reached in practice, so real reads will usually be somewhat slower than the line suggests.
How much does shrinking the group size cost?
Each halving of the group size doubles the scale overhead. On the default 32 billion weights at 4 bits, a group of 128 gives 4.125 effective bits and 15.37 GiB, a group of 64 gives 4.25 bits and 15.83 GiB, and a group of 32 gives 4.5 bits and 16.76 GiB. Smaller groups often preserve accuracy better, so it is a trade between memory and quality that only testing on your own prompts can settle.
Can I use this for a single layer rather than a whole model?
Yes. The elements field is in billions, so enter a decimal for a smaller tensor. A layer with 50 million weights is 0.05. The footprint, effective bits and read time all scale the same way, which makes it easy to see how much one large projection matrix or embedding table costs at each precision before you decide which layers to quantize.
What changes when I set 16 or 32 bits?
The scale overhead disappears, because a plain FP16 or FP32 tensor stores no group scales, and the headline label changes to Tensor Footprint (GiB, Unquantized). At 16 bits the default model is 59.6 GiB and reads in 64 ms per pass. At 32 bits it is the full FP32 size, 128 GB expressed in GiB, and reads in 128 ms, exactly double.
Does a smaller footprint guarantee faster generation?
Not always. When decoding is limited by memory bandwidth, moving fewer bytes per step does help, which is what the read time line reflects. But low-bit formats need extra work to unpack and rescale weights, and some kernels are better optimised for 8-bit or 16-bit maths. Measure throughput on your own stack before assuming the 4-bit build will be the fastest.
How 32 billion weights at 4 bits become 15.37 GiB
Start with the defaults: 32 billion weights, a 4-bit target, a group size of 128 and a GPU with 1000 GB/s of memory bandwidth. The headline result is 15.37 GiB, and the FP16 or BF16 copy of the same tensor is listed beside it at 59.6 GiB.
Both numbers come from one idea. Memory equals the number of parameters times the bytes each one takes. At 16 bits a weight is 2 bytes, so 32 billion weights need 64 billion bytes. A GiB is 2 to the power 30 bytes, a little more than a billion, so 64 billion bytes is 59.6 GiB. The gap between the decimal GB that spec sheets use and the binary GiB shown here is about 7%, which is why the answer looks smaller than the simple 64 you might expect.
The quantized figure follows the same rule with fewer bits. At 4.125 effective bits a weight costs a little over half a byte, so the tensor needs 16.5 billion bytes, which is 15.37 GiB. That is roughly a quarter of the FP16 size, and the missing sliver beyond an exact quarter is the scale metadata explained below.
If you only remember one check, make it this one: billions of parameters times bits per weight, divided by 8, gives gigabytes. Divide by about 1.074 to get GiB.
Why the effective bits line reads 4.13 instead of 4
Grouped quantization does not store 4-bit numbers on their own. Each block of weights shares a scale factor, and the calculator assumes that scale is kept as a 16-bit value. Spread one 16-bit scale across 128 weights and every weight carries an extra 0.125 bits, giving 4.125. The display rounds that to 4.13 bits per weight.
Smaller groups track the weight distribution more closely, which usually helps accuracy, but they cost more memory. With the group size set to 64 the overhead doubles to 0.25 bits, effective bits become 4.25 and the footprint grows to 15.83 GiB. At a group size of 32 the overhead is half a bit, effective bits are 4.5 and the tensor needs 16.76 GiB. Going from 128 to 32 adds about 1.4 GiB on this model, which can matter on a card that is already close to full.
The formula counts one 16-bit scale per group and nothing else. Some schemes also store a zero point or a second-level scale, and those add a little more. If your format does that, treat the result as a floor rather than an exact figure.
The group size must be a whole number of 16 or more, and the page shows an input error otherwise. At the minimum of 16 the overhead is a full bit, so 4-bit weights cost 5 effective bits. Enter the group size your quantization tool actually reports.
FP32, FP16 and BF16: what the bits inside each format do
The slug names three floating-point formats, and the page uses FP16 and BF16 as its unquantized baseline, so it helps to know how they differ. All three store a sign bit, an exponent and a fraction (the mantissa).
FP32 uses 1 sign bit, 8 exponent bits and 23 fraction bits. Its largest finite value is about 3.4 times 10 to the 38, and its machine epsilon, the gap between 1 and the next representable number, is 2 to the minus 23, about 1.19 times 10 to the minus 7.
FP16 uses 1 sign bit, 5 exponent bits and 10 fraction bits. The small exponent caps its largest finite value at a little over sixty-five thousand, and its epsilon is 2 to the minus 10, about 0.000977. Values that grow past that ceiling during training overflow, which is why loss scaling exists.
BF16 keeps the 8-bit exponent of FP32 and cuts the fraction to 7 bits. Its range is almost the same as FP32, with a largest value of roughly 3.39 times 10 to the 38, but its epsilon is 2 to the minus 7, or 0.0078125, so it is much coarser than FP16 near 1.
For memory, none of that detail matters: FP16 and BF16 are both 2 bytes per weight, which is why the calculator lists them on one line. FP32 is 4 bytes, so the same 32 billion weights would need 128 GB, exactly double the FP16 line, if you set the bit width to 32.
Trying 8-bit, 3-bit and full 16-bit settings
The bit width field accepts more than 4. Setting it to 8 gives 8.125 effective bits and 30.27 GiB, close to half the FP16 size. Setting it to 3 gives 3.125 effective bits and 11.64 GiB.
At 16 bits the calculator drops the scale overhead and reports 16 bits per weight and 59.6 GiB, matching the FP16 line exactly. That is the right behaviour, because a plain FP16 tensor has no group scales. At 32 bits it reports exactly twice the FP16 figure, which is the FP32 size. From 16 bits upward the headline label switches to Tensor Footprint (GiB, Unquantized), a reminder that no group scales are being stored. The bit width accepts 2 to 32 bits.
The model size scales linearly. The brief's lower preset, 19 billion weights, comes to 9.12 GiB at 4 bits against 35.39 GiB in FP16. The higher preset, 48 billion, comes to 23.05 GiB against 89.41 GiB. A 7 billion weight model needs 3.36 GiB at 4 bits and 13.04 GiB in FP16, and a 70 billion model at 4 bits needs 33.61 GiB.
The calculator does not judge accuracy. Dropping from 8 to 4 to 3 bits saves memory in clean steps, but the quality loss grows unevenly and depends on the model and the method. Use the numbers to see what fits, then test the quality yourself.
Memory read time: what the 16.5 ms line measures
The last supporting line estimates how long the GPU needs to stream every weight from memory once, which is roughly the floor on the time for one decoding step when generation is bandwidth bound. On the defaults it shows 16.5 ms.
The arithmetic works in bytes, matching how GPU spec sheets quote bandwidth in decimal gigabytes per second. The 4-bit tensor is 16.5 billion bytes, and reading 16.5 billion bytes at 1000 GB/s takes 16.5 ms. Notice that the read time is not the GiB figure: 15.37 GiB and 16.5 ms describe the same bytes in different units.
Bandwidth acts inversely. Doubling it to twice the default halves the read time to 8.25 ms, and halving it doubles the time. Model size acts directly: the lower preset of 19 billion weights reads in 9.8 ms, and the higher preset of 48 billion in 24.75 ms.
Quantization helps here as well as with capacity. At 16 bits the same 32 billion weights take 64 ms per pass, about four times the 4-bit figure, and at 32 bits they take 128 ms.
Real kernels rarely reach the peak bandwidth printed on the box, and the read time ignores compute, the KV cache and any communication between GPUs. It is a lower bound on the cost of reading the weights, not a tokens per second forecast.
Capacity this footprint leaves out: KV cache and runtime buffers
The result is the size of the weight tensor and nothing more. Running a model also needs room for the KV cache, which grows with context length and batch size, for activations, and for the framework's own workspace and memory fragmentation.
So a 4-bit model at 15.37 GiB does not simply fit on a card with 16 GiB. The weights would fit with almost nothing to spare, and the first long prompt would run out of memory. Leave clear headroom above the weight figure, and size the cache separately from your context length and the model's layer and head counts.
Embedding tables and output heads are also often kept at higher precision than the rest of the model. If your quantized checkpoint does that, part of the parameter count really costs 16 bits per weight, and the true file is larger than the calculator's figure. Check the file size of an actual checkpoint against the estimate when you can.
Treat the tensor elements field as the count of weights that are actually quantized. If you know a model has a few billion parameters in embeddings left at FP16, run those separately at 16 bits and add the two results.
Entering billions, bits and group size correctly
The elements field is in billions. Type 32 for a 32 billion parameter model, not the full count with nine zeros, or the result will be absurdly large. For a single layer or a small tensor, use a decimal such as 0.05 for 50 million weights.
The bit width is per weight before scales. Do not type 4.5 because your tool reports 4.5 bits per weight overall; that number already includes the group overhead, and the calculator would add it a second time. Type the base width and the matching group size.
Group size is the number of weights sharing one scale. Common values are powers of two such as 128, 64 and 32. A per-channel scheme has very large groups, so the overhead almost disappears and the effective bits sit close to the base width.
Bandwidth should be the memory bandwidth of the GPU that holds the weights, in GB/s. If the model is split across several cards, each card reads only its own share, so divide the footprint by the number of cards before thinking about read time.
Using the result to choose a card or a precision
A practical sequence works well. First enter the parameter count and look at the FP16 line, which tells you whether the model fits at full half precision at all. On the default 32 billion weights that is 59.6 GiB, more than most single consumer cards hold.
Next try 8 bits. At 30.27 GiB the default model would fit on a card with a comfortable margin for cache only if that card is large. Then try 4 bits with your real group size, which gives 15.37 GiB at a group size of 128 on the defaults.
Compare each figure with your card's capacity minus the headroom you need for context. Pick the highest precision that still leaves that headroom, because extra bits usually buy accuracy at no cost once the memory is there.
Finally, look at read time to see whether the card's bandwidth will give acceptable latency. Two cards with the same capacity but different bandwidth will hold the same model and still run it at noticeably different speeds.