Skip to content
sinc-LLMBook a 15-minute call
Page signal: 10 sections as samples, joined by sinc reconstruction; computed from this page's text.

LLM Quantization Guide: AWQ, GPTQ, FP8, INT8 and GGUF Accuracy

A plain guide to running LLMs in fewer bits on your own GPUs: what W4A16 and W8A8 mean, how much memory you save, why 4-bit speeds up decoding, and what the evidence says about accuracy.

Quick Answer & Verified Key Facts

Direct Answer: LLM quantization formats trade memory, speed, and accuracy based on hardware and use case. NF4 suits fine-tuning; GGUF suits CPUs and mixed setups; FP8 requires Ada/Hopper GPUs for full 8-bit math; weight-only formats (GPTQ, AWQ) work on older cards. 8-bit is near-lossless; 4-bit weight-only is close behind for larger models.

On this page

Quantization stores a model's weights, and sometimes its activations, in 8 or 4 bits instead of 16. That cuts weight memory by half or more and often speeds up token generation. Published studies find FP8 close to lossless and 4-bit weight-only formats close behind, but you still need to test on your own tasks.

By Mario AlexandreLLM Performance & Reliability

This guide is for people who run open models on their own GPUs. It covers how to pick a bit width, what each method does, and how to check that the smaller model still does your job. It does not cover KV cache memory in depth. That topic has its own page on KV cache memory for long-context serving. Here the focus is the weights, which are the largest fixed cost of loading a model.

Quantization stores numbers in fewer bits

Quantization means you store each number in a model with fewer bits. A model trained in 16-bit floats can be saved in 8 bits or 4 bits. The model gets smaller, and in many cases it gets faster too.

The Hugging Face quantization overview puts it simply. Models usually load in bf16, which takes 2 bytes per parameter. An 8B model needs about 16GB for its weights in bf16 and about 8GB at 8 bits. At 4 bits it needs roughly 4 to 5GB.

The catch is accuracy. Fewer bits means each stored value is a rougher guess of the real one. Each method makes its own trade between memory, speed, and accuracy. The rest of this page is about how to make that trade with care.

Weights and activations are two different things

A model has two kinds of numbers that matter here. Weights are the fixed values learned in training. Activations are the values that flow through the model as it reads your prompt and writes each token.

Weights are the same for every request, so you can quantize them once, ahead of time. Activations change with every input, so they must be handled on the fly. That is why some methods only touch weights. Others touch both, and those need hardware that can do math in the low format.

Reading W4A16, W8A8, and FP8 labels

The label tells you the bits for each part. W is for weights and A is for activations.

  • W4A16 means 4-bit weights and 16-bit activations. This is weight-only quantization. GPTQ and AWQ checkpoints usually run this way.
  • W8A8 means 8-bit weights and 8-bit activations. The 8 bits can be integers (INT8) or floats (FP8).
  • W8A16 means 8-bit weights with 16-bit math. vLLM uses this mode for FP8 checkpoints on older GPUs.
  • FP8 most often means W8A8 with 8-bit floats for both parts.

The 2411.02355 accuracy study uses short names for the three main formats. In its words, "We refer to W8A8-FP as FP8, W8A8-INT as INT8, and W4A16-INT as INT4." This guide uses the same names.

INT and FP formats spend their bits in different ways

An integer format spreads its values evenly. A float format spends some bits on an exponent, so it can cover a wide range with less detail. The FP8 formats paper defines two 8-bit floats. E4M3 has a 4-bit exponent and a 3-bit mantissa. E5M2 has a 5-bit exponent and a 2-bit mantissa.

The vLLM FP8 guide gives the ranges. E4M3 can store values up to plus or minus 448. E5M2 reaches plus or minus 57344, but it pays for that range with less precision. For inference weights and activations, E4M3 is the common pick.

Weight memory at 16, 8, and 4 bits

The memory math for weights is simple. Take the number of parameters. Multiply by the bits per weight. Divide by 8 to get bytes. Then add a little for the scale values that each method stores.

Worked example: an 8B model (illustrative arithmetic)

These numbers are illustrative arithmetic, not measurements. Inputs: 8 billion parameters, and decimal gigabytes (1 GB is 1 billion bytes).

Format Bits per weight Math Weight memory
BF16 or FP16 16 8B x 16 / 8 16 GB
INT8 or FP8 8 8B x 8 / 8 8 GB
INT4 (no overhead) 4 8B x 4 / 8 4 GB
INT4 with group scales about 4.125 8B x 4.125 / 8 about 4.1 GB

These match the Hugging Face figures of 16GB, 8GB, and 4 to 5GB for an 8B model. The extra fraction of a bit in the last row is the cost of scales.

Scales add a small overhead to every format

A 4-bit value alone means little. Each block of weights also stores a scale that maps the small integers back to real numbers. Those scales take space.

Suppose a method stores one 16-bit scale per group of 128 weights. That adds 16 / 128 = 0.125 bits per weight. This is an illustrative setup, but group sizes like this are common in 4-bit checkpoints.

The QLoRA paper shows a heavier case. With 32-bit constants and a block size of 64, the constants add 32 / 64 = 0.5 bits per parameter on average. QLoRA's double quantization then shrinks the constants. It saves about 0.37 bits per parameter, which the paper puts at about 3 GB for a 65B model.

Worked example: a 70B model on one or two cards (illustrative arithmetic)

Inputs: 70 billion parameters, decimal GB, and a 4-bit format with 0.5 bits of overhead. So we use 4.5 bits per weight. All of this is illustrative arithmetic.

  • 16-bit: 70 x 2 = 140 GB. That needs at least two 80 GB cards before any KV cache.
  • 8-bit: 70 x 1 = 70 GB. It fits in one 80 GB card, but with little room left.
  • 4.5-bit: 70 x 4.5 / 8 = 39.4 GB. It fits on one 48 GB card with about 8.6 GB to spare.

Real files land near these numbers. The llama.cpp quantize README lists Llama 3.1 70B at 280.9 GB for the original file and 43.1 GB at Q4_K_M. The original size works out to about 4 bytes per weight, so it is a 32-bit file. Q4_K_M uses about 4.89 bits per weight, which explains why it sits a bit above our 4.5-bit guess.

Weights are not the whole memory bill

Weight memory is a floor, not the full bill. The server also needs room for the KV cache, which grows with context length and with the number of users at once. It needs some space for activations and the runtime itself too.

So a model that "just fits" will often fail in practice. Leave headroom. If you serve long prompts or many users, read the guide to KV cache memory for long-context LLM serving before you pick a GPU. Quantizing weights frees memory, and that memory can go to more cache, more users, or longer context.

Decoding speed and the memory-bound case

Weight-only 4-bit often makes token generation faster. The reason is that writing tokens one at a time is limited by memory speed, not by math speed. Fewer bytes to read means less time per token.

Prefill and decode use the GPU in different ways

Every request has two phases. Prefill reads your whole prompt at once. Decode writes the answer one token at a time.

The 2411.02355 study states the split plainly. "Prefill is typically compute-bound, while decode is memory-bound." It goes on to say weight quantization "primarily accelerates decode by reducing memory movement." Weight and activation quantization, by contrast, helps compute in prefill. So the best scheme "depends on the ratio of prefill to decode."

In decode with one user, the GPU must read every weight once per token. It does very little math per byte it reads. The bottleneck is how fast bytes come out of memory. Cut the bytes by four, and the bound on time per token drops by about four.

Worked example: a speed ceiling from bandwidth (illustrative arithmetic)

This is a ceiling, not a forecast. Inputs: an 8B model and a GPU with 3 TB/s of memory bandwidth. NVIDIA's Hopper architecture post says the H100 SXM5 delivers "over 3 TB/sec of memory bandwidth," so 3 TB/s is a fair round input.

  • 16-bit weights: 16 GB / 3,000 GB per second = 5.3 ms per token. That caps speed near 187 tokens per second.
  • 4-bit weights: 4 GB / 3,000 GB per second = 1.3 ms per token. That caps speed near 750 tokens per second.

Real speed is lower than both ceilings. Kernels have overhead, the KV cache must also be read, and the GPU never hits peak bandwidth. But the ratio shows why 4-bit weights help single-user chat so much.

Published numbers line up with the memory-bound story

The llama.cpp README has a table for Llama-3.1-8B that shows this well. It lists prompt speed at 512 tokens and text generation speed at 128 tokens. These are the README's published figures, not ours.

GGUF type Bits per weight Size (GiB) Prompt t/s Generation t/s
F16 16.0005 14.96 923.49 29.17
Q8_0 8.5008 7.95 865.09 50.93
Q6_K 6.5633 6.14 812.01 58.67
Q5_K_M 5.7036 5.33 758.69 67.23
Q4_K_M 4.8944 4.58 821.81 71.93

Look at the two speed columns. Generation speed climbs as the file shrinks, from about 29 to about 72 tokens per second. Prompt speed does not climb. F16 is in fact the fastest at prompt work. That is the compute-bound prefill at work. Smaller weights do not help when the GPU is busy doing math.

When 4-bit weights do not speed things up

Weight-only 4-bit is not a free win in every case. Here are the main limits.

  • Large batches. With many users at once, each weight read serves many tokens. The work shifts toward math. The GPTQ paper warns that for "large-batch applications, operations may be compute- rather than memory-bound." Its fast kernels then may not apply.
  • Long prompts. If your traffic is mostly prefill, such as long RAG prompts with short answers, the memory win in decode matters less.
  • Dequant cost. W4A16 kernels turn 4-bit weights back into 16-bit before the math. vLLM's docs note that "Marlin always runs with 16-bit activations." That step costs time when the GPU is already compute-bound.
  • Small matrices. The LLM.int8() paper found its Int8 matrix multiply "speeds up inference only for models with large model and hidden dimensions." Small models can even run slower.

This is why the 2411.02355 study splits its advice by setup. It says "W4A16 is the most cost-efficient for synchronous setups, while W8A8 dominates in asynchronous continuous batching." If your server batches many requests, read about continuous batching for LLM inference and test W8A8 too.

The main methods: LLM.int8, SmoothQuant, GPTQ, AWQ, FP8, NF4, and GGUF

Each method answers the same question in a different way. How do you round billions of numbers without breaking the model? The short version: INT8 methods handle outliers, GPTQ and AWQ make 4-bit weights accurate, FP8 uses new hardware, NF4 serves fine-tuning, and GGUF serves local CPU and mixed setups.

LLM.int8(): 8-bit with an outlier escape hatch

LLM.int8() was one of the first methods to make 8-bit work on very large models. Per the paper, it cuts "the memory needed for inference by half while retaining full precision performance."

The key idea is outliers. A few feature dimensions in large models carry huge values. Rounding them to 8 bits would wreck the output. So LLM.int8() pulls those dimensions out and runs them in 16-bit. Per the paper, "more than 99.9% of values are multiplied in 8-bit" while the outliers stay in 16-bit.

This method aims at memory, not speed. As noted above, the paper found the Int8 multiply only speeds things up for models with large dimensions. Use it when you need a big model to fit and do not mind the speed.

SmoothQuant: making activations easy to quantize

SmoothQuant targets full W8A8, so both weights and activations are 8-bit integers. It is "training-free," which means you do not retrain the model.

The paper's insight is that "weights are easy to quantize while activations are not." Activations have outliers. So SmoothQuant shifts the hard part from activations into weights. It does this with a math trick that leaves the model's output the same. Then both sides can go to INT8.

The paper reports "up to 1.56x speedup and 2x memory reduction for LLMs with negligible loss in accuracy." That speed comes from real 8-bit math on tensor cores, not only from smaller reads. So unlike W4A16, it can help prefill and big batches too.

GPTQ: 4-bit weights with error correction

GPTQ is a "one-shot weight quantization method based on approximate second-order information." In plain words, it rounds weights one column at a time. After each step, it nudges the weights not yet rounded to make up for the error. It uses a small sample of text to decide how.

The results were strong for its time. The paper says GPTQ can quantize 175B-parameter models "in approximately four GPU hours," down to 3 or 4 bits per weight, "with negligible accuracy degradation." It reported end-to-end speedups over FP16 of about 3.25x on an A100 and 4.5x on an A6000.

GPTQ needs calibration data. The paper used "128 random 2048 token segments from the C4 dataset," which is generic web text. That small sample is enough for the method to work.

Here is how the sample is used. GPTQ runs the sample through the model and records the inputs that reach each layer. It then works layer by layer. The goal is "to find a matrix of quantized weights" which "minimizes the squared error, relative to the full precision layer output." So the target is not the weights themselves. It is what the layer outputs on real text. The recorded inputs form a Hessian matrix. The paper's algorithm uses the "inverse Hessian H−1 = (2XX> + λI)−1", where X holds those inputs. That matrix tells GPTQ how much each rounding error hurts the output. It also tells it how to shift the weights not yet rounded to cancel that error. But the choice of sample can matter, as the evidence section shows.

AWQ: protect the weights that matter

AWQ is short for Activation-aware Weight Quantization. It is a "low-bit weight-only quantization" method, so it lands in W4A16 like GPTQ.

AWQ starts from one finding. "Protecting only 1% salient weights can greatly reduce quantization error," per the paper. To find those weights, it looks at activations, not at the weights themselves. Then, rather than keep those weights in higher precision, it scales them up before rounding. This keeps every weight in the same 4-bit format, which is kinder to hardware.

AWQ "does not rely on any backpropagation or reconstruction." The authors say this helps it avoid overfitting the calibration set. The paper also ships TinyChat, a runtime that offers "more than 3x speedup over the Huggingface FP16 implementation" on desktop and mobile GPUs.

FP8: 8-bit floats on newer GPUs

FP8 keeps the float shape but uses only 8 bits. Because it has an exponent, it copes with outliers better than INT8 does. The FP8 formats paper even studied FP8 post-training quantization of models "that resisted fixed point int8 quantization."

FP8 is also the easiest format to make. The vLLM FP8 guide recommends the FP8_DYNAMIC scheme. Weights use simple round-to-nearest, and activations are scaled per token at run time. So, in the guide's words, "we do not need any calibration data for this quantization flow." vLLM can even convert a BF16 or FP16 model to FP8 online at load time, again "without any calibration data required."

The catch is hardware. Full FP8 math needs a recent GPU. The hardware section below has the details.

NF4 and QLoRA: 4-bit for fine-tuning

NF4 comes from the QLoRA paper. It stands for 4-bit NormalFloat, "a new data type that is information theoretically optimal for normally distributed weights." Model weights tend to follow a bell curve, so NF4 puts more of its 16 levels near zero where most weights sit.

QLoRA's goal is fine-tuning on less memory. It "backpropagates gradients through a frozen, 4-bit quantized pretrained language model into Low Rank Adapters." The paper reports it can fine-tune a 65B model on a single 48GB GPU. NF4 loads through the bitsandbytes library, which vLLM also lists as a supported format.

NF4 was built for training, not for top serving speed. Its home is fine-tuning adapters on a model that would not fit in 16-bit. For serving, test it against GPTQ, AWQ, and FP8 in your engine before you commit.

GGUF k-quants in llama.cpp

GGUF is the file format of llama.cpp. It runs on CPUs, Apple chips, and GPUs, and it can split a model between them. The quantize README says the work is "done in two phases": convert the model to GGUF, then quantize the GGUF file.

GGUF names like Q4_K_M and Q5_K_M are "k-quants." They mix bit widths across tensors, so some parts of the model get more bits than others. That is why Q4_K_M averages about 4.89 bits per weight, not 4.0. The README lets you turn the mix off with a --pure flag.

llama.cpp also supports an importance matrix, or imatrix. The README says accuracy loss "can be minimized by using a suitable imatrix file." This plays a role a bit like calibration data in GPTQ and AWQ. If you run models on a laptop or a mixed CPU and GPU box, GGUF is often the practical choice. Our post on running a local LLM for a production website shows that kind of setup in context.

Hardware support decides which formats are fast

A format is only fast if your GPU has kernels for it. The same checkpoint can run as true 8-bit math on one card and as weight-only on another. Check your GPU generation before you pick.

FP8 needs Ada, Hopper, or Blackwell for full speed

The vLLM FP8 guide is direct about this. "FP8 computation is supported on NVIDIA GPUs with compute capability >= 8.9 (Ada Lovelace, Hopper, Blackwell)." On those cards, FP8 runs as W8A8 with real 8-bit math.

Older cards still load FP8 files. Per the same guide, "Turing/Ampere GPUs are supported for W8A16 (weight-only FP8) utilizing Marlin kernels." You still get the memory savings. You do not get the faster 8-bit math. So an A100 or an RTX 3090 treats FP8 much like a weight-only format.

On Hopper the math gain is large. NVIDIA's Hopper post says its tensor cores run at "4x the rate of A100 using the new FP8 data type, compared to previous generation 16-bit floating-point options." The vLLM guide says FP8 gives "a 2x reduction in model memory requirements and up to a 1.6x improvement in throughput with minimal impact on accuracy."

W4A16 and INT8 run on a wider range of cards

Weight-only formats do not need 8-bit math, so they do not need the newest cards. vLLM runs GPTQ, AWQ, and other weight-only checkpoints with Marlin kernels, which keep 16-bit activations. As the FP8 guide shows, Marlin also serves Turing and Ampere cards. So W4A16 gives you the memory win on cards without FP8 support.

The 2411.02355 study tested A6000, A100, and H100 GPUs with vLLM. It covered FP8, INT8, and INT4 on that mix. So its advice covers more than the newest hardware.

Serving engines list what they support

vLLM's quantization index lists the formats it can load. These include AutoAWQ, BitsAndBytes, GPTQModel, LLM Compressor, and several vendor tools. LLM Compressor itself "supports FP8, INT8, INT4, and other quantization formats." On the Hugging Face side, Transformers "integrates more than 20 quantization methods through from_pretrained()."

Engines differ in which kernels they ship and how fast those kernels are. If you are still picking an engine, see our comparison of vLLM, SGLang, llama.cpp, and TensorRT-LLM. The right format often depends on the engine you choose.

Published evidence on accuracy recovery

Two large studies give the best public picture. Both find that 8-bit is close to lossless and 4-bit weight-only is close behind for larger models. Both also warn that results vary by model, size, and task.

The 2411.02355 study on Llama 3.1

The paper titled "Give Me BF16 or Give Me Death" ran a very large test. Per its abstract, it evaluated "FP8, INT8, and INT4 quantization across academic benchmarks and real-world tasks on the entire Llama-3.1 model family." It ran "over 500,000 evaluations" across the 8B, 70B, and 405B models.

Its three headline findings, quoted from the abstract:

  1. "FP8 (W8A8-FP) is effectively lossless across all model scales."
  2. Well-tuned INT8 (W8A8-INT) shows low accuracy loss, which the abstract reports as 1 to 3 percent.
  3. "INT4 weight-only (W4A16-INT) is more competitive than expected, rivaling 8-bit quantization."

On the Open LLM Leaderboard V1 tasks, 8-bit averaged 99.75% recovery, according to the paper. As reported in the same section, W4A16-INT reached "a competitive 99.36%." Recovery here means the quantized score as a share of the BF16 score.

The study also found that for integer formats, quantizing "activations is harder than quantizing weights." That helps explain why W4A16 could beat W8A8-INT on some tasks. Fewer bits on weights can hurt less than 8 bits on activations.

GPTQ and AWQ compared head to head

The same study compared GPTQ and AWQ on 4-bit weights. It found "a small gap between methods on academic benchmarks" but "a more pronounced difference in favor of GPTQ on real-world (open-ended) benchmarks." Elsewhere the paper says a simple variant of "GPTQ outperforms the more recent AWQ" on real-world tasks.

Read that with care. The authors tuned their GPTQ setup, with better clipping and better calibration data than the default. So the lesson is less about which name is best. It is that tuning and calibration data change the result, and that easy benchmarks can hide gaps that open-ended tasks show.

Calibration data mattered by size, too. The paper notes that random tokens were fine at 8B, "but larger models require higher-quality" calibration data. If you quantize a big model yourself, use text that looks like your real traffic.

The 2402.18158 study across many model families

The 2402.18158 study, "Evaluating Quantized Large Language Models," went wide rather than deep. It tested the effect of quantization "on Weight, Activation, and KV Cache on 11 model families," from 125M to 180B parameters.

It covered "five types of tasks: basic NLP, emergent ability, trustworthiness, dialogue, and long-context tasks." That breadth matters. A model can keep its trivia score but lose ground on long inputs or on safety behavior.

Three findings stand out for anyone choosing a format:

  • KV cache is the touchy part. "Most LLMs are more sensitive to KV Cache Quantization than Weight-only and Weight-Activation Quantization."
  • Small models break first at low bits. "Models, such as LLaMA2-7B, when quantized to W3, the accuracy significantly degrades." The paper reports that a 70B model in the same family shows only a marginal decline at W3.
  • Advice does not travel well. The paper's suggested bit widths aim for results "Within 2% accuracy loss on the evaluated tasks." It adds that the advice "may not generalize to other LLMs or tasks."

What the evidence does not tell you

Both studies test public benchmarks. Your tasks are not public benchmarks. A support bot, a code tool, and a data extractor each lean on different skills.

Benchmark averages also hide spread. Suppose a published average recovery is near 99%. That average can still include one task that drops much more. So treat published results as a prior. They tell you which formats are worth testing first. They do not replace your own tests.

Measuring accuracy loss on your own tasks

The only proof that a quantized model works for you is a test on your own tasks. The steps below are a plain process you can run in a day. They assume you already have the full-precision model running.

Step 1: freeze a baseline

Run the BF16 or FP16 model on a fixed eval set. Use real prompts from your product, with known good answers or a clear grading rule. Save every output, not just the score.

Aim for at least a few hundred items. Small sets give noisy scores. In the vLLM FP8 guide's example, a gsm8k run on 250 samples shows a standard error of 0.0268. That is a reported error of nearly 3 points on a 0 to 1 scale. A drop smaller than that is hard to tell from noise.

Step 2: hold everything else fixed

Change only the weights. Keep the same prompt template, sampling settings, max tokens, and engine version. Use greedy decoding, or a fixed seed, for the first pass.

Watch the small details. The vLLM guide warns that "Quantized models can be sensitive to the presence of the bos token" and that lm_eval does not add one by default. A missing start token can look like a quantization loss when it is not.

Step 3: score three ways

Use more than one lens, as the 2411.02355 study did.

  • Task score. Exact match, pass rate, or rubric score on your eval set.
  • Output similarity. Compare quantized and full outputs on the same prompts. The study used ROUGE, BERTScore, and semantic similarity for this.
  • Spot checks. Read a sample of outputs that changed. Look for subtle errors: wrong numbers, dropped steps, format slips.

For llama.cpp users, the quantize README notes that loss "is usually measured in" perplexity or KL divergence. Those are good quick checks. But they measure next-token fit on generic text, not your task. Use them to rule out broken files, then move to task scores.

Step 4: test the hard slices

Slice the results. Check long prompts on their own. Check your rarest task types. Check any language other than English. The 2402.18158 study shows that long-context and trustworthiness tasks can react differently from basic NLP.

If you quantize the KV cache as well, test it on its own. That same study found most models more sensitive to KV cache quantization than to weight quantization.

Step 5: decide with a written threshold

Write down the loss you will accept before you look at the numbers. For example, suppose you accept no more than a 1 point drop in pass rate and no new failure class. That framing is illustrative, so set your own bar. Then compare and decide.

Keep the eval set. You will need it again when the base model updates or when you try a new format. Our guide to AI eval coverage in production testing covers how to build and keep that set over time.

Failure modes and how to spot them

Most quantization problems are quiet. The model still answers, and the answers look fine at a glance. Here are the common ways it goes wrong and how to catch each one.

  • Small model, low bits. A 7B or 8B model at 3 bits can fall apart, as the 2402.18158 study found for LLaMA2-7B. Detect it with a task eval, not just a chat test. Fix it by moving up to 4 or 5 bits.
  • Calibration mismatch. GPTQ and AWQ learn from a sample of text. If that sample is generic web text and your work is code or legal text, quality can slip in your domain. Detect it by slicing your eval by domain. Fix it by quantizing with your own text.
  • Hidden loss on open tasks. Multiple choice scores can stay flat while long answers get worse. The GPTQ and AWQ comparison above showed exactly this pattern. Detect it with output similarity and real reading of long answers.
  • KV cache pushed too far. Quantizing the KV cache saves memory for long context, but models are more sensitive there. Detect it by testing long prompts on their own.
  • Wrong fallback path. An FP8 file on an Ampere card runs as weight-only. You get the memory win but not the speed you expected. Detect it by reading the engine's startup logs, which in vLLM list the chosen kernel.
  • Eval setup bugs. A missing bos token or a changed prompt template can look like quality loss. Detect it by running the full model through the exact same harness.

After launch, keep watching. Output drift can creep in when you change formats, engines, or base models. Our guide to AI drift detection for production output covers how to track it.

Decision table for choosing a format

Pick the format by your GPU, your traffic shape, and how much accuracy risk you can take. The table below sums up the evidence above. Treat it as a starting point for your own tests.

Your situation First format to test Why Watch out for
Ada, Hopper, or Blackwell GPU, any traffic FP8 (W8A8) Found effectively lossless in the 2411.02355 study; no calibration data needed Only 2x memory savings, so big models may still not fit
Single user or low concurrency, memory tight INT4 weight-only (W4A16) with GPTQ or AWQ Decode is memory-bound, so smaller weights mean faster tokens Calibration data quality; small models lose more
Many users at once, continuous batching W8A8 (FP8 or INT8) The 2411.02355 study found W8A8 best for asynchronous serving INT8 needs careful tuning such as SmoothQuant
Ampere or older GPU, model fits in 8-bit INT8 W8A8 or FP8 as W8A16 The study ran INT8 on A6000 and A100; vLLM runs FP8 there as weight-only No FP8 math speedup on these cards
Laptop, Apple chip, or CPU plus GPU split GGUF Q4_K_M to Q6_K llama.cpp runs on mixed hardware and offers many sizes Use an imatrix; check perplexity, then tasks
Fine-tuning a big model on one GPU NF4 with QLoRA Built to train adapters on a frozen 4-bit model Test serving speed separately
Small model (under about 13B) and strict accuracy 8-bit or 16-bit 2402.18158 suggests 8-bit for emergent skills below 13B Memory cost is higher

One more rule of thumb. If a model only fits at 3 bits, consider a smaller model at 4 or 8 bits instead. The 2402.18158 results suggest low bits hurt small models most, but a smaller model in a safer format may still beat a squeezed larger one on your tasks. Test both.

Quantization is also one of several levers on cost. You can route easy requests to a small local model and send hard ones to a frontier model. Our post on LLM cascades with local models and frontier escalation explains that pattern. If decode speed is your main goal, speculative decoding with draft models can stack with a quantized target model.

Checklist before you ship a quantized model

Run through this list before you switch any live traffic. Each item maps to a section above.

  1. Do the weight memory math, and leave room for the KV cache and runtime.
  2. Confirm your GPU generation and which kernels your engine will use for the format.
  3. Prefer a published, well-tested checkpoint before you quantize one yourself.
  4. If you quantize yourself, use calibration text that looks like your real traffic.
  5. Freeze a baseline eval on the full-precision model with a few hundred real items.
  6. Change only the weights. Keep the template, sampling, and engine version fixed.
  7. Score task accuracy, output similarity, and a sample you read by hand.
  8. Slice results by prompt length, task type, and language.
  9. Set your accept threshold before you look at the results.
  10. Load test with your real concurrency, since the best format changes with batch size.
  11. Watch for drift after launch, and keep the eval set for the next change.

If you want help designing that eval and rollout, sinc-LLM works with teams on these choices. See our solutions page for how we can help you test formats against your own tasks.

Frequently asked questions

What does W4A16 mean in LLM quantization?

W4A16 means the model's weights are stored in 4 bits while its activations stay in 16 bits. It is weight-only quantization. GPTQ and AWQ checkpoints usually run this way. The weights take about a quarter of their 16-bit memory, and decoding often gets faster because the GPU reads fewer bytes per token. The math itself still runs in 16-bit, so prefill speed does not improve much.

Is FP8 quantization lossless?

The 2411.02355 study tested FP8 (W8A8-FP) across the whole Llama 3.1 family and called it effectively lossless at all model sizes. That is strong evidence, but it covers one model family and public benchmarks. You should still run your own task eval before switching. Full FP8 speed also needs an Ada Lovelace, Hopper, or Blackwell GPU. Older cards run FP8 files as weight-only.

Should I use GPTQ or AWQ for 4-bit weights?

Both are weight-only 4-bit methods that use a small sample of text to guide rounding. The 2411.02355 study found a small gap on academic benchmarks and a larger gap in favor of a tuned GPTQ setup on open-ended tasks. The bigger lesson is that tuning and calibration data matter. Test the checkpoints you can actually get for your model on your own tasks.

How much GPU memory does a quantized model need?

For weights, multiply the parameter count by the bits per weight and divide by 8. As illustrative arithmetic, an 8B model needs about 16 GB at 16 bits, 8 GB at 8 bits, and about 4 GB at 4 bits, plus a small overhead for scales. Then add room for the KV cache, activations, and the runtime. Long prompts and many users need more.

Why does 4-bit quantization make token generation faster?

Generating tokens one at a time is limited by memory bandwidth, not math. The GPU must read every weight for each new token. With 4-bit weights there are about four times fewer bytes to read, so each token can finish sooner. The gain shrinks with large batches or long prompts, where the work becomes limited by math instead of memory.

When is W8A8 better than W4A16?

W8A8 uses real 8-bit math, so it helps when the GPU is busy computing. That happens in prefill and when many requests are batched together. The 2411.02355 study found W8A8 best for asynchronous serving with continuous batching, while W4A16 was most cost-efficient for synchronous, low-concurrency setups. If you serve many users at once, test W8A8 first.

How do I test whether quantization hurt my model?

Freeze a baseline by running the full-precision model on a few hundred real prompts. Then swap only the weights and keep the template, sampling, and engine fixed. Score task accuracy, compare outputs for similarity, and read a sample of changed answers by hand. Slice results by prompt length and task type. Decide using a threshold you wrote down before you looked.

What is Q4_K_M in llama.cpp?

Q4_K_M is a GGUF k-quant type in llama.cpp. K-quants mix bit widths across tensors, so Q4_K_M averages about 4.89 bits per weight rather than exactly 4. In the llama.cpp README table for Llama 3.1 8B, it is 4.58 GiB, compared with 14.96 GiB for F16. Using an importance matrix file can reduce its accuracy loss.

Sources

  1. Give Me BF16 or Give Me Death? Accuracy-Performance Trade-Offs in LLM Quantization: Large Llama 3.1 study of FP8, INT8, and INT4 accuracy and vLLM serving speed.
  2. Evaluating Quantized Large Language Models: Weight, activation, and KV cache quantization across 11 model families and five task types.
  3. GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers: One-shot 3 and 4 bit weight quantization with second-order error correction.
  4. AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration: Weight-only 4-bit method that protects salient channels found from activations.
  5. SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models: Training-free W8A8 by moving outlier difficulty from activations to weights.
  6. LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale: 8-bit inference with 16-bit handling of outlier features.
  7. FP8 Formats for Deep Learning: Defines the E4M3 and E5M2 8-bit float formats.
  8. QLoRA: Efficient Finetuning of Quantized LLMs: Introduces NF4 and double quantization for 4-bit fine-tuning.
  9. vLLM Quantization documentation: Formats and kernel backends supported by vLLM.
  10. vLLM FP8 W8A8 guide: FP8 hardware support, FP8_DYNAMIC recipe, and eval tips.
  11. Hugging Face Transformers quantization overview: Bytes per parameter and memory at 16, 8, and 4 bits.
  12. NVIDIA Hopper Architecture In-Depth: H100 FP8 tensor core rates and HBM3 memory bandwidth.
  13. llama.cpp quantize README: GGUF quant types, sizes, speeds, and imatrix use.
Original source record

Skip to content

sinc-LLMAboutBlogServices