TAU-HOME.COM
LOADING

llama.cpp Build b12669 Introduces Target Size and BPW Quantization for Precise VRAM Fitting

llama.cpp has released build b12669, featuring --target-size and --target-bpw options in llama-quantize to automatically optimize tensor bit mixes using importa

tau · November 27, 2026

#llama.cpp #LLM #Quantization #OpenSource #AI

llama.cpp Build b12669 Introduces Target Size and BPW Quantization for Precise VRAM Fitting

On November 24, 2026, the open-source local AI inference framework llama.cpp officially released build b12669. This update introduces an advanced automated quantization feature that allows practitioners and local AI users to tailor compressed model sizes down to the megabyte, ensuring precise alignment with their hardware's graphics card (VRAM) capacity.

llama.cpp quantization tool interface and terminal execution screen

Image source: https://webairadar.com/en/news/llama-cpp-can-now-quantize-a-model-to-a-file-size-you-set-and-choose-the-bit-mix-itself

Previously, compressing a model meant relying on fixed standard presets (such as Q4_K_M), forcing users to either settle for a file that underutilized their memory or overshoot their VRAM limits entirely. The newly added --target-size and --target-bpw options in build b12669 break this constraint, enabling customized compression tailored specifically to the user's available hardware budget.

Beyond Fixed Presets: Fitting VRAM Exactly with --target-size

The biggest bottleneck when running large language models (LLMs) locally is available video memory (VRAM). For instance, when running a 70-billion-parameter model on a graphics card with 24 GB of memory, standard presets might yield either a 16.8 GB file that leaves capacity unused or a 24.1 GB file that fails to load altogether.

The new --target-size option lets users specify an exact target size (e.g., 23.85 GiB), allowing the quantization tool to calculate how to allocate bits across tensors to match that exact file size. A companion option, --target-bpw (Bits Per Weight), establishes an average number of bits per weight, simplifying comparisons across models under identical compression ratios.

Minimizing Error via Importance Matrices and Kullback-Leibler Divergence

Standard presets follow rigid rules regarding which parts of a model retain higher bit depths. In contrast, the new optimization method estimates the error each tensor—a block of weights within the neural network—would incur under various quantization formats.

This process relies heavily on an importance matrix (imatrix) file, which records weight sensitivities derived from sample text activations. Using this data, the tool distributes more bits to the tensors where precision reduces error most effectively.

According to test results across 34 models and 238 runs by contributor EAddario, 93% of runs achieved lower (better) Kullback-Leibler divergence (KLD)—a metric measuring how much a compressed model's outputs drift from the original—compared to standard presets. Notable improvements appeared in the middle range (from Q5_K_M to IQ2_M); for example, the Qwen3.5-4B model saw its divergence drop from 0.0906 to 0.0492 at the Q3_K_M size.

Practical Considerations and Trade-offs

While powerful, this automated optimization approach comes with specific trade-offs and operational requirements:

  • Prerequisite Dependency: An importance matrix (imatrix) file must be generated beforehand; without it, the tool refuses to run.
  • Increased Processing Time: Because the tool tests multiple tensor samples across 15 formats to estimate errors, quantization can take 5 to 10 times longer than standard methods. However, the --state-file option can cache intermediate calculations to maintain normal speeds when generating subsequent file sizes for the same model.
  • Mixed Results with Hybrid Architectures: Certain hybrid models (such as granite4-h-small) showed increased divergence in tests, suggesting that results for hybrid designs should be compared carefully against standard presets before deployment.
  • No Absolute Quality Guarantee: The method optimizes estimated tensor-level mathematical error rather than evaluating semantic answer quality directly.

Build b12669 of llama.cpp equips local AI enthusiasts and engineers with a powerful tool to push hardware utilization to its absolute limits, offering a practical solution for matching models precisely to constrained VRAM budgets.

Sources

Impact-Site-Verification: 9b3ebd10-6c45-44cf-a014-5b8c19b7b285