LLM quantization: how to choose Q4, Q8 or NVFP4 locally

Quantization changes a model’s memory footprint and can change its answers and speed. This guide starts with one 32 GB RTX 5090, then separates the checkpoint, runtime and context choices that need to be tested on each machine.

Three carved stone owls of the same shape, from blocky to finely carved
Illustration: three carved stone owls of the same shape, from blocky to finely carved.

With the right quantization, a 27B model runs comfortably on one consumer card. A poor choice either runs out of memory or gives fluent answers that are subtly wrong. Both failures look like other problems until you measure them.

What quantization changes

LLM quantization stores a model’s weights at lower precision than the floating-point format it was trained in, which cuts model size and memory use.

A model stores numerical parameters. Lower precision can reduce weight storage, while scales and retained higher-precision tensors add overhead. The complete memory budget also includes the cache, activations, workspaces and any speculative drafter.

Lower precision can change answers. The size and direction of a benchmark difference depend on the model, conversion recipe and task; a lower-bit build does not have to score worse on every test. Compare the actual checkpoints against the same higher-precision baseline.

The GGUF and MLX builds people download are usually made by post-training quantization (PTQ): the finished model is converted, with no retraining. Quantization-aware training (QAT) simulates the rounding during training so the model learns to tolerate it, which takes far more work. The gap between the original number and the rounded one is the quantization error, and it is what the checks further down are looking for.

Six formats that show up in practice

The format name is a starting point. Check the exact checkpoint and the runtime that will load it.

Common formats are alternatives, not a universal quality ranking.
FormatNominal bitsWhat it describesSelection rule
BF16 / FP1616Common higher-precision baselinesUse a supported baseline when memory allows.
FP88Floating-point formats with runtime-specific scaling and kernelsCheck model, GPU and backend support.
Q88A family of quantized representationsCheck the exact format and measured behavior.
Q66A family of roughly 6-bit quantizationsConsider when the chosen 8-bit build leaves too little memory.
Q4 / Q4_K_M4Roughly 4-bit formats, sometimes mixed across tensor typesCheck actual checkpoint size and task accuracy.
NVFP44Floating-point values with block and tensor scalesUse a supported hardware/runtime path and validate the export.

Q4_K_M and NVFP4 are different approaches, not successive quality levels. NVIDIA’s NVFP4 description explains its scaling design; it does not establish an accuracy ordering against GGUF formats.

Mixed precision matters to the memory estimate. NVIDIA’s NVFP4 export of Qwen3.8-Flash-Next keeps attention and shared layers in BF16 and its n-gram table in FP8. The published checkpoint is about 124 GiB rather than the 84 GiB suggested by uniform 4-bit arithmetic. Its system requirements explain the distinction.

How much memory each quantization leaves on a 32 GB card

Weights, KV cache, runtime workspaces, activations, graphs and any speculative drafter share the same device memory. The table below estimates weights only; a complete serving configuration can fail even when its weights fit.

Approximate weight arithmetic, not guaranteed runtime capacity.
27B model atApproximate weightsWeight-only readingRoom for the rest
BF16~54 GBExceeds a 32 GB cardNo room without a supported offload or multi-device path.
Q8 / FP8~27–28 GBMay fit as weights aloneLimited; exact export, runtime and context determine the result.
Q4 / NVFP4~14–15 GBOften leaves a larger gross remainderRoughly 17–18 GB before export differences, cache and runtime allocations.

Use the actual file size where available and keep GB and GiB consistent. The memory calculator estimates weights, cache and overhead. Confirm peak allocation while loading and running a representative prompt with room for its response.

Compare quality by checkpoint and task

FP8 and Q8 are different 8-bit representations. Q4_K_M and NVFP4 use different scaling, conversion recipes and kernels. Their names do not establish which will answer more accurately.

Start with a supported checkpoint that leaves enough memory for the actual prompt, output and runtime. Compare it with a higher-precision build using the same task set, chat template, sampling settings and scoring. Include long-context recall, structured output and tool calls when the workflow needs them. Repeat enough runs to distinguish a persistent regression from ordinary variation.

Published scores establish behavior for their stated model and configuration. My serving results show whether the adopted build passed my checks; they do not measure a general accuracy loss for every precision.

How to test a quantization instead of guessing

I test a quantization the way I will use it, whatever its label says. My field-note contract records nine things for every configuration, quantizations included:

  1. Model identity + quantization: exact filename and bits.
  2. Configured context: what the runtime was told to reserve.
  3. Task and input shape: the real job with its real inputs, never a synthetic prompt.
  4. Recall: whether it answers a question it was asked to remember.
  5. Tool calling: whether structured output still works.
  6. Instruction following: whether it obeys the format you asked for.
  7. Latency and memory: tokens per second, and VRAM after the run.
  8. Observed failure: what broke, and how.
  9. Cloud comparison: whether it matches a cloud model on the same task.

A quantization that returns fluent text but breaks tool calls has failed, however fast it runs. A configuration that passes all nine checks is good enough. When one fails a check, I ask whether this task needs the thing that broke.

The drafter and the KV cache share the memory you saved

A lower quantization frees memory for context. A speculative drafter, the part that makes local inference fast, needs some of that memory too. So the smallest model is not automatically the fastest, because the memory you saved may not hold both the drafter and the context you wanted.

I measured this when I built the RTX 5090 serving recipes. DFlash 2 stayed my validated 32K speed profile. DSpark used less VRAM and could reach 112K, so the fastest profile and the longest-context profile were different ones. On one card, quantization, context length and speed draw on the same memory, and I could not maximise all three at once.

What I run on each machine, and why

I pick the quantization by machine and by job:

  • On the RTX 5090: NVFP4 weights with an FP8 KV cache. NVFP4 is the 4-bit format the card accelerates natively, and I adopted it only after it passed recall, tool-calling and stability gates. Named profiles cover fast 32K chat and longer-context agent work.
  • On the Mac: Q4_K_M or 8-bit, chosen by how much unified memory the job can spare. It is the same RAM-based choice I documented for Qwen 3.8.
  • Anything that must be right: the highest precision I can afford, tested before I trust it.

The rule I follow is to use the largest quantization that still leaves room for the context this task needs. A coding task that needs 64K context should give up weight precision for cache room, because there the context is the bottleneck.

Three mistakes I made

Mistake 1: chasing the smallest number. Saving a few gigabytes on weights bought nothing once the setup I wanted, a speculative drafter plus long context, no longer fit beside them in the same recipe.

Mistake 2: trusting the advertised context. A model can advertise 128K while the loaded configuration has far less room. The effective limit is the smaller of the declared length and the physical KV pool, so I measure what fits and ignore the printed figure.

Mistake 3: comparing quantizations on one synthetic prompt. A high tokens-per-second figure on a short prompt tells you little about the real job. I test on the real task, at the real context length, and repeat the run. One run is an observation, not a reliable estimate of typical performance or failure rate.

Common questions

Can one RTX 5090 run a 27B model?

The weights of many 27B Q4 or NVFP4 builds fit on a 32 GB RTX 5090, but the complete configuration needs room for context, output and runtime allocations. Some 8-bit exports leave little headroom; BF16 weights alone need roughly 54 GB.

Is 4-bit quantization good enough?

It can be, but the exact checkpoint and task decide. Compare accuracy, structured output and any required long-context behavior before adopting it.

Q4 or Q8?

Choose a supported checkpoint that leaves room for the required prompt and output. Compare the candidates on the same task; a weight-only fit does not guarantee enough runtime memory.

Does quantization slow down inference?

Quantization can speed inference through lower memory traffic and suitable kernels. It can also slow a workload when dequantization, kernel support, shapes or batching outweigh those savings, even when everything fits. Measure prefill, decode and total successful-task time. PyTorch’s quantized-kernel work illustrates why implementation matters.

What is NVFP4?

NVIDIA’s 4-bit floating-point format uses block and tensor scales, with native acceleration on supported Blackwell paths such as the RTX 5090. It is one low-precision option, not the smallest possible format or a guaranteed quality ranking.

Suhail Mohebi · published 25 August 2026 · the cover is a generated illustration

Use this

Local model memory worksheetMarkdown · v1.1 · 14 Nov 2026 · 8 KB
Download the template (.md) ↓Check if a model fits →

← Previous: Qwen3.8-Flash-Next System Requirements: VRAM, RTX 5090 & Mac

Want this inside your team’s workflow? The Verified AI Operations Sprint tests one workflow in ten working days. See the sprint →

What quantization changes
  1. What quantization changes
  2. Six formats that show up in practice
  3. How much memory each quantization leaves on a 32 GB card
  4. Compare quality by checkpoint and task
  5. How to test a quantization instead of guessing
  6. The drafter and the KV cache share the memory you saved
  7. What I run on each machine, and why
  8. Three mistakes I made
  9. Common questions