Skip to content

Quantization Bit-Width Comparison Calculator

Pure frontend: enter parameter count and bit width to see theoretical weight size and a side-by-side comparison. Data stays in your browser — no network call, nothing recorded.

How to use

Fill in the parameter count (billions) and a bit width. The tool computes theoretical weight size in decimal GB from parameters × bits ÷ 8 and shows reference rows for FP16, FP8/INT8 and INT4 alongside. The "memory free" field shows what would be left for KV cache and runtime overhead.

Assumptions and where the formula comes from

Weight size uses the common rule of thumb from quantization work: the bytes per parameter depend only on bit width.

theoretical weight bytes = parameters × 10^9 × bits ÷ 8
theoretical weight GB   = parameters × bits ÷ 8   (decimal GB, 1 GB = 10^9 bytes)
ratio against FP16      = target bits ÷ 16
memory left             = available VRAM − theoretical weight GB

The formula comes from the unit conversion — one bit is an eighth of a byte — plus the parameters × bytes per parameter convention used consistently across quantization documentation. Hugging Face's quantization overview gives the same order-of-magnitude examples: an 8B model is about 16 GB of weights at BF16, about 8 GB at 8-bit and roughly 4–5 GB at 4-bit.

What it leaves out matters more than what it includes:

  • Scale factors, zero points and group metadata. Finer groups add more per-parameter overhead, so nominal 4-bit is usually slightly above 4 bits in practice.
  • Embeddings, output projections and normalisation layers are often kept at FP16; on large-vocabulary models that share is significant.
  • KV cache, activations, CUDA context, fragmentation and runtime buffers are all outside the formula.
  • Mixture-of-experts models must use total parameters rather than active parameters, because expert weights generally all have to be resident.
  • Bit width is not linearly related to speed or quality; the tool predicts neither.

Read the result this way: "memory left" is an upper bound on what could be assigned elsewhere, not a count of how many concurrent users you can serve. Estimate the KV term separately, then leave runtime headroom.

Common formats and their trades

Direction Typical bits Main characteristic Watch out for
bitsandbytes 4 / 8 Quantize on load inside Transformers; easy to adopt hardware and kernel support; some layers stay at higher precision
GPTQ commonly 4 Post-training quantization with error compensation checkpoint and kernel compatibility
AWQ 4 Focuses on weights with high output impact toolchain and runtime matching
GGUF / llama.cpp several low-bit levels mature local-run ecosystem with many level choices architecture support; quality-versus-memory trade
FP8 8 Keeps a floating-point form, broadly supported depends on specific hardware and kernels

This table gives directions, not a verdict on which is best. At the same bit width, implementations can differ in quality by more than a one-bit step; evaluate on your own tasks rather than a public leaderboard.

Reading the output

Halving the bit width halves the raw weight bytes; KV cache, activations and runtime overhead sit outside that formula. That is why a model quantized to 4-bit can handle short chats fine and then fail to allocate memory once the context grows — the part that broke was never the part you compressed.

A smaller number on the weight line is not the same thing as a smaller bill for quality — bit width is a trade, not a discount. The question worth asking is "what fits on which card at acceptable quality", not "which level has the smallest theoretical size". Use the estimate as a filter: rule out combinations that cannot possibly fit, then run quality and speed measurements on the survivors before deciding.

From theoretical size to a real file

Theoretical and downloaded file sizes almost never match exactly, for four reasons. First, group-wise quantization stores a scale per small group and sometimes a zero point; overhead rises as groups get finer, so a nominal 4-bit file may use slightly more than 4 bits per parameter. Second, sensitive layers are usually left unquantized: embeddings, output projections and normalisation layers are frequently kept at half precision, a meaningful share for large vocabularies. Third, the checkpoint container carries configuration, tokenizer and other additions. Fourth, some schemes store a small fraction of weights at higher precision to preserve key layers.

For MoE models, ask one more question: total parameters and parameters active per step differ greatly, but all expert weights generally must remain resident during inference, so size the weights by the total, not the active count. This is a common order-of-magnitude underestimate.

Decimal versus binary units deserve their own warning. Vendors quote VRAM in decimal GB while GiB is binary, roughly 7% apart. In a "just barely fits" case that difference can flip the verdict: two GB left on paper may be less than one in reality. The tool uses decimal GB to line up with nameplate capacity; convert before comparing against engine logs reported in GiB.

Turning the estimate into a decision

Work in three steps, each answering one question. First, use this tool to compute theoretical weights for each candidate bit width and drop the combinations that cannot hold the weights at all. Second, use the KV cache estimator with your real context length and concurrency to get the dynamic memory term, then check whether what remains is enough. Third, measure quality and speed on the survivors: run real questions from your workload and record answer accuracy, long-context recall and tokens per second — not just perplexity or a leaderboard.

Keep that order. Picking the lowest bit width or the best leaderboard score up front usually forces a step backwards later: not enough memory, quality below target, or a kernel that does not support your hardware. Calculating first, then evaluating, narrows the field to two or three candidates and saves more time than another round of benchmarks.

Official references