BLOG / QUANTIZATION

Quantization needs two benchmarks

A quantized model can serve more requests without making one request much faster. Separate execution gains from capacity gains before judging it.

A quantized model might barely improve an isolated request and still be valuable in production. Smaller weights can free enough GPU memory to admit more sequences. Conversely, a faster kernel can improve one request without increasing the rate the service sustains within its latency target.

These outcomes answer different questions. Quantization deserves two comparisons: the same work at fixed concurrency, then the best sustainable operating point for each representation. Reporting only one can hide a benefit or attribute it to the wrong cause.

Hold work fixed to measure execution. Retune within the same latency and quality requirements to measure serving capacity.
Hold work fixed to measure execution. Retune within the same latency and quality requirements to measure serving capacity.

First, identify what changed

“Four-bit” names a representation, not an execution plan. Weight-only quantization can store compact parameters while a kernel unpacks or dequantizes them for higher-precision arithmetic. Quantizing weights and activations can enable a different matrix multiplication path. Quantizing the KV cache changes attention-state storage and traffic separately.

ChangeDirect opportunityPossible new limit
Compact weightsLess weight storage and trafficConversion work, KV traffic, or host overhead
Low-precision weights and activationsSupported low-precision matrix executionKernel support, scaling overhead, or other operators
Compact KV cacheMore resident context and less state trafficAttention-kernel support and task quality

The supported combinations depend on hardware and runtime, as the vLLM quantization documentation makes explicit. Record the path that actually executes. The checkpoint's file size cannot tell you which resource is now limiting.

Benchmark one: keep the work comparable

Use the same base model and tokenizer. Hold hardware, request shapes, and active concurrency fixed. Separate prefill from decode, and separate short-context decode from long-context decode. Those regimes expose different balances of arithmetic, weight traffic, and KV traffic.

For the execution comparison, control the number of processed tokens. If a changed representation generates shorter answers, a lower completion time combines faster execution with less work. Record that behavior separately in the task evaluation.

Consider a hypothetical serial step: 6 ms of work benefits from reduced weight traffic; 4 ms is unaffected. If the affected component becomes twice as fast:

Original: 6 + 4 = 10 ms
Changed:  6 / 2 + 4 = 7 ms
Speedup:  10 / 7 ≈ 1.43×

Even eliminating that component would cap the gain at 2.5×. This is an Amdahl budget, not a prediction from bit width. Use a trace to establish which work changes and whether components overlap.

A small measured gain can therefore be entirely consistent with an effective optimization. If long-context attention now dominates, further weight compression may target an increasingly small share of the step.

Benchmark two: let each representation use its memory

Next, allow each representation its own concurrency and admission settings. At each tested arrival rate, keep hardware, workload distribution, arrival pattern, latency objectives, and quality requirements the same. Find the highest sustainable rate of useful completed work for each.

This comparison measures the deployment opportunity. Freed weight memory may support more active sequences, improving weight amortization and aggregate throughput. Retaining the original concurrency would leave that opportunity untested.

The additional sequences also consume KV memory and lengthen or complicate execution steps. Increase load only while the latency objective holds and the queue remains stable. A larger batch that produces more tokens while missing request deadlines is not additional usable capacity for that service.

Keep the results of the two comparisons separate:

Fixed-workload resultRetuned-capacity resultInterpretation to investigate
FasterHigherExecution and operating capacity both improved
SimilarHigherThe principal benefit may be memory headroom
FasterSimilarAnother limit may prevent a capacity gain
SlowerHigherA capacity benefit may coexist with a latency cost

These are diagnoses to investigate, not proofs of causality. Verify the kernel path, active batches, memory occupancy, and queue behavior that explain the result.

Quality changes the denominator

Run a separate task evaluation with the same prompts, decoding policy, and output limits, allowing natural completions. Include the long contexts, structured outputs, and difficult cases that matter to the application.

Measure successful tasks, retries, and total work consumed, not just generated tokens. A configuration that makes tokens cheaper can make completed tasks more expensive if it needs additional attempts or longer outputs. An average score can also conceal a regression concentrated in an important request class.

Set the acceptable quality level before choosing the fastest configuration. Then compare resource cost per successful task and completed requests within the latency objective. This connects the numerical representation to what the service is paid to deliver.

What to remember

  • Run a controlled execution comparison and a separately retuned capacity comparison.
  • Keep token work comparable when attributing speed; evaluate natural outputs for task quality.
  • Explain gains through the resource that changed and the resource that now limits progress.
  • Choose the representation that improves useful service at acceptable quality, not the one with the smallest checkpoint.

← Back to Blog