Experimental global target bits‑per‑weight quantization of mistralai/Ministral-3-14B-Instruct-2512

Using non-standard (forked) LLaMA C++ release b7560 for quantization.

Original model: mistralai/Ministral-3-14B-Instruct-2512

From the original model creators:

Ministral 3 14B Instruct 2512

The largest model in the Ministral 3 family, Ministral 3 14B offers frontier capabilities and performance comparable to its larger Mistral Small 3.2 24B counterpart. A powerful and efficient language model with vision capabilities.

This model is the instruct post-trained version in FP8, fine-tuned for instruction tasks, making it ideal for chat and instruction based use cases.

The Ministral 3 family is designed for edge deployment, capable of running on a wide range of hardware. Ministral 3 14B can even be deployed locally, capable of fitting in 24GB of VRAM in FP8, and less if further quantized.

Learn more in our blog post and paper.

⚠️ PLEASE READ THIS BEFORE USING THESE EXPERIMENTAL VERSIONS! ⚠️

An area of personal interest is finding ways to optimize the inference performance of LLMs when deployed in resource-constrained environments like commodity hardware, desktops, laptops, mobiles, edge devices, etc. There are many approaches to accomplish this, including architecture simplification and knowledge distillation, but my focus has been primarily on quantization and pruning.

The method to produce these experimental versions involves using a custom version of llama-imatrix to generate an imatrix that includes the mean activations, and a custom version of llama-quantize, which computes a per-tensor weighted mean squared quantization error and a bias/projection term, to automatically select the lowest error quantization recipe that achieves a global target bits‑per‑weight (bpw). More details on the implementation and test results here

There are two pull requests (#14891 & #15550) to merge these changes back into the core llama.cpp project. This may or may not ever happen so, until then, the modified versions will be available on GitHub.

For testing and comparison, I use models produced by Bartowski (see credits below) and Unsloth (Daniel and Michael Han do some really interesting stuff!) but when they don't provide versions of the required model, tests and comparisons are against standard quantization obtained by simply running llama-quantize with no further optimizations.

All experimental versions were generated using an appropriate imatrix created from datasets available at eaddario/imatrix-calibration. In llama.cpp, an imatrix is a calibration file derived from running representative text through the model and collecting activation statistics. It is used to weight quantization error so that error in more “important” directions (as estimated from activations) is penalized more heavily.

The process to generate these models is roughly as follows:

  1. Convert the original model's safetensors to GGUF F16*
  2. Estimate the Perplexity score for the F16 model (baseline) using the wikitext-2-raw-v1 dataset, and save the logits
  3. Generate an imatrix from the most appropriate calibration dataset
  4. Quantize the baseline model targeting a bpw average, allocating more bits to tensors estimated to matter more (e.g. llama-quantize --target-bpw 4.5678 --keep-bpw-state --imatrix imatrix.gguf baseline-model-F16.gguf 12)
  5. Quantize the baseline model targeting a bpw average, treating each tensor equally instead of prioritizing some (e.g. llama-quantize --target-bpw 4.5678 --no-importance --keep-bpw-state --imatrix imatrix.gguf baseline-model-F16.gguf 12)
  6. Calculate Perplexity, KL Divergence, ARC (Easy+Challenge), HellaSwag, MMLU, Truthful QA and WinoGrande scores for each quantized model
  7. Keep version with the best 𝜌PPL scores (i.e. highest Cor(ln(PPL(Q)), ln(PPL(base))))
  8. Repeat until all desired quants are created

*BF16 would be preferred, but F16 performs better on Apple's GPUs

Advantages and disadvantages of the global target bits‑per‑weight quantization process

Advantages

  1. Target arbitrary size models

    • When specifying --target-bpw 4.5678 for instance, the algorithm will produce a model (nearly) exactly of that size, which is very useful for maximizing VRAM usage. In a system with 24GB VRAM and a 70B model, standard quants might produce a 16.8GB file (too small, quality left on table) or a 24.1GB file (won't fit). This approach can generate a 23.85GB file to utilize the hardware fully.
  2. Data-driven mixed precision often can improve quality at fixed size

    • Instead of using hardcoded heuristics (e.g. make attn_v Q5_K for a 70B model), that may be sub‑optimal for a given architecture or size, the quantization mix is determined by the actual error sensitivity of the specific model's weights. This, in practice, often yields a better quality/size trade-off, especially in aggressive quantization scenarios (1.5 to 3.5 bpw), or for unusual architectures.

    • Please note: llama.cpp’s heuristics have been tuned across many models and are highly optimized; although the target bpw method produces better quality often (>75% based on tests with 130 models from 11 different families), it can also lose in surprising cases.

  3. Allows better like-for-like comparisons between models and families

    • Standard llama.cpp quantization uses hardcoded rules like: "use Q4_K_M, except bump some tensors up/down, except fall back if incompatible, except keep some tensors unquantized..." and for that reason, two different models quantized with the same Q4_K_M type can end up with very different bpw (e.g. 4.75 and 4.30).

    • All things being equal, the performance of a model is usually proportional to its overall bpw size; models with a higher bpw tend to perform better than lower bpw models. Since model A has simply been given more bits, it will typically perform better (lower perplexity, better eval scores, etc.) even if the underlying quantization method is identical. That makes comparing the performance not a controlled experiment, because the comparison is between models with different effective compression ratios.

    • --target-bpw tries to address that by making the experiment more controlled: each model gets quantized to land on (approximately) the same global byte budget, so that the models' performance differences are more attributable to architecture/training differences, quantization error behaviour at the same compression ratio, optimizer’s allocation decisions, etc.

Disadvantages

  1. Quantization process is significantly slower than standard

    • This approach can take 5x-10x longer as it quantizes a sample of most tensors into 15 different formats, dequantizes them back to floats, computes error diffs, and selects the best size/error option that fits the global bpw budget.

    • However, the --keep-bpw-state option will save the above-mentioned computations to disk so that future quantizations, in the permissible bpw range for the same model, can be generated at normal speed. It also allows to interrupt the computation process and resume it at a later time.

  2. The optimization target is only a proxy for the model's performance quality

    • The process minimizes a per-tensor estimated error computed from sampled rows, not actual perplexity or divergence of output distributions (a future version may address this). Since errors interact nonlinearly across layers, there are no guarantees it will select the best possible quantization recipe subject to the bpw size constraint.

    • Furthermore, the process can operate in two modes: giving priority to important tensors (default) or treating each tensor equally (setting the --no-importance option). To my knowledge, there is no computationally feasible way to determine ahead of time which modality will yield better results, and two runs per model may be needed to obtain the best quality, but the default mode usually wins.

  3. An imatrix with activations data is required for best results

    • Activation data is required to compute the bias factor (i.e. the systematic error projected onto activation directions). If the imatrix file does not contain activation data, the quantization recipe will likely be sub-optimal.

Models

Bits per weight, size, perplexity and KL Divergence scores

Model BPW Size (GB) μPPL 𝜌PPL μKLD Same Top-P
Ministral-3-14B-Instruct-2512-F16 16.0005 27.0 6.108995 ±0.035406 100% N/A N/A
Ministral-3-14B-Instruct-2512-IQ1_L 1.7499 2.96 17.838241 ±0.115870 79.51% 1.042692 ±0.002787 58.093 ±0.127
Ministral-3-14B-Instruct-2512-IQ2_S 2.2500 3.81 8.953976 ±0.055687 91.14% 0.375018 ±0.001538 72.557 ±0.115
Ministral-3-14B-Instruct-2512-IQ2_XS 2.1250 3.60 9.445999 ±0.059183 90.01% 0.428392 ±0.001697 71.712 ±0.116
Ministral-3-14B-Instruct-2512-IQ2_XXS 2.0000 3.38 10.753635 ±0.068509 87.28% 0.551551 ±0.002049 68.803 ±0.119
Ministral-3-14B-Instruct-2512-IQ3_XXS 2.9999 5.07 6.842477 ±0.040417 97.20% 0.119316 ±0.000627 84.223 ±0.094
Ministral-3-14B-Instruct-2512-Q2_K 2.5000 4.23 7.974240 ±0.049230 94.02% 0.267340 ±0.001115 76.098 ±0.110
Ministral-3-14B-Instruct-2512-Q3_K_L 3.7499 6.34 6.442265 ±0.036704 99.02% 0.048352 ±0.000208 89.326 ±0.079
Ministral-3-14B-Instruct-2512-Q3_K_S 3.2500 5.50 6.564097 ±0.039540 98.25% 0.079733 ±0.000403 86.779 ±0.087
Ministral-3-14B-Instruct-2512-Q3_K 3.5000 5.92 6.575291 ±0.037661 98.65% 0.065983 ±0.000311 88.167 ±0.083
Ministral-3-14B-Instruct-2512-Q4_K_S 4.2500 7.18 6.192385 ±0.036100 99.67% 0.014786 ±0.000085 94.277 ±0.060
Ministral-3-14B-Instruct-2512-Q4_K 4.4999 7.61 6.173471 ±0.035961 99.76% 0.010793 ±0.000065 95.101 ±0.055
Ministral-3-14B-Instruct-2512-Q4_K_M-bartowski 4.8755 8.24 6.165798 ±0.035804 99.77% 0.010576 ±0.000060 95.159 ±0.055
Ministral-3-14B-Instruct-2512-Q4_K_M-unsloth 4.8755 8.24 6.166569 ±0.035834 99.77% 0.010569 ±0.000061 95.213 ±0.055
Ministral-3-14B-Instruct-2512-Q4_K_M-bpw 4.8755 8.24 6.150051 ±0.035776 99.84% 0.007267 ±0.000078 95.968 ±0.051
Ministral-3-14B-Instruct-2512-Q5_K_S 5.2499 8.87 6.138807 ±0.035686 99.89% 0.005022 ±0.000037 96.610 ±0.046
Ministral-3-14B-Instruct-2512-Q5_K 5.5000 9.29 6.130668 ±0.035570 99.93% 0.003241 ±0.000023 97.251 ±0.042
Ministral-3-14B-Instruct-2512-Q6_K 6.4998 11.0 6.118252 ±0.035516 99.97% 0.001140 ±0.000009 98.397 ±0.032
Ministral-3-14B-Instruct-2512-Q8_0 8.4998 14.4 6.111559 ±0.035422 99.99% 0.000142 ±0.000001 99.408 ±0.020

ARC, HellaSwag, MMLU, Truthful QA and WinoGrande scores

Scores generated using llama-perplexity with 750 tasks per test, and a context size of 768 tokens.

For the test data used in the generation of these scores, follow the appropriate links: HellaSwag, ARC, MMLU, Truthful QA and WinoGrande

Model ARC HellaSwag MMLU Truthful QA WinoGrande Avg Score
Ministral-3-14B-Instruct-2512-IQ1_L 53.2000 60.2700 31.6000 28.0000 59.2000 46.45
Ministral-3-14B-Instruct-2512-IQ2_S 63.8667 73.0700 38.2667 31.3333 70.4000 55.39
Ministral-3-14B-Instruct-2512-IQ2_XS 61.0667 71.4700 36.8000 29.4667 67.7333 53.31
Ministral-3-14B-Instruct-2512-IQ2_XXS 59.6000 68.4000 37.4667 29.0667 63.6000 51.63
Ministral-3-14B-Instruct-2512-IQ3_XXS 70.2667 76.2600 41.3330 34.0000 74.8000 59.33
Ministral-3-14B-Instruct-2512-Q2_K 69.2000 75.7300 41.6000 28.8000 71.4667 57.36
Ministral-3-14B-Instruct-2512-Q3_K_L 69.8667 79.3300 43.2000 33.8667 75.4667 60.35
Ministral-3-14B-Instruct-2512-Q3_K_S 71.2000 78.4000 44.0000 33.0667 74.5333 60.24
Ministral-3-14B-Instruct-2512-Q3_K 69.3333 78.6700 44.2667 35.0667 74.2667 60.32
Ministral-3-14B-Instruct-2512-Q4_K_S 70.8000 79.6000 44.0000 35.0667 76.4000 61.17
Ministral-3-14B-Instruct-2512-Q4_K 69.4667 80.4000 43.3333 35.4667 75.8667 60.91
Ministral-3-14B-Instruct-2512-Q4_K_M-bartowski 70.8000 79.8700 43.6000 35.6000 76.0000 61.17
Ministral-3-14B-Instruct-2512-Q4_K_M-unsloth 70.8000 80.2700 43.4667 35.7333 75.7333 61.20
Ministral-3-14B-Instruct-2512-Q4_K_M-bpw 69.8667 80.1300 44.0000 35.0667 76.5333 61.12
Ministral-3-14B-Instruct-2512-Q5_K_S 70.9333 80.2700 43.6000 35.4667 76.1333 61.28
Ministral-3-14B-Instruct-2512-Q5_K 70.2667 80.6700 43.6000 34.8000 76.8000 61.23
Ministral-3-14B-Instruct-2512-Q6_K 70.5333 80.9300 43.3333 35.8667 76.9333 61.52
Ministral-3-14B-Instruct-2512-Q8_0 70.5333 80.8000 43.6000 35.7333 77.0667 61.55

Tokens per second benchmarks

Scores generated using llama-bench. Standard (llama-quantize with no optimization) Q4_K_M quantization included for comparison.

model size params backend threads test t/s
Ministral-3-14B-Instruct-2512-Q4_K_M-bpw 7.67 GiB 13.51 B Metal,BLAS 12 pp512 506.65 ± 2.53
Ministral-3-14B-Instruct-2512-Q4_K_M-bpw 7.67 GiB 13.51 B Metal,BLAS 12 tg128 40.74 ± 1.26
Ministral-3-14B-Instruct-2512-Q4_K_M-bpw 7.67 GiB 13.51 B Metal,BLAS 12 pp1024+tg1024 66.42 ± 2.55
Ministral-3-14B-Instruct-2512-Q4_K_M-bartowski 7.67 GiB 13.51 B Metal,BLAS 12 pp512 458.19 ± 33.86
Ministral-3-14B-Instruct-2512-Q4_K_M-bartowski 7.67 GiB 13.51 B Metal,BLAS 12 tg128 42.51 ± 3.08
Ministral-3-14B-Instruct-2512-Q4_K_M-bartowski 7.67 GiB 13.51 B Metal,BLAS 12 pp1024+tg1024 75.39 ± 1.96
Ministral-3-14B-Instruct-2512-Q4_K_M-unsloth 7.67 GiB 13.51 B Metal,BLAS 12 pp512 506.48 ± 10.25
Ministral-3-14B-Instruct-2512-Q4_K_M-unsloth 7.67 GiB 13.51 B Metal,BLAS 12 tg128 48.00 ± 1.49
Ministral-3-14B-Instruct-2512-Q4_K_M-unsloth 7.67 GiB 13.51 B Metal,BLAS 12 pp1024+tg1024 68.65 ± 12.01

Metrics used

Perplexity: one of the key metrics used in NLP evaluation. It measures the quality of a language model by evaluating how well it predicts the next token given a particular sequence of words. A PPL of 1 indicates an exact match between predicted and actual, whereas values greater than one indicate a degree of "surprise" the generated token differs from the expected.

Kullback–Leibler (KL) Divergence: a statistical measure of how much a probability distribution differs from another. When quantizing models (or altering the original tensors in any way for that matter), the closest we can preserve the weights' probability distribution to the original model the better, thus the closest to 0 the better.

AI2 Reasoning Challenge (ARC): a benchmark to evaluate the ability of AI models to answer complex science questions that require logical reasoning beyond pattern matching.

HellaSwag: the Harder Endings, Longer contexts, and Low-shot Activities for Situations With Adversarial Generations (bit of a mouthful!) is a benchmark designed to test commonsense natural language inference. It requires the model to predict the most likely ending of a sentence.

MMLU: the Massive Multitask Language Understanding evaluates LLMs’ general knowledge and problem-solving abilities across 57 subjects, including elementary mathematics, US history, computer science, and law.

Truthful QA: evaluates how well LLMs generate truthful responses to questions. It identifies whether AI models can avoid generating false or misleading information, particularly in areas where human knowledge is prone to misconceptions.

Winogrande: based on the Winograd Schema Challenge, is a natural language understanding task requiring models to resolve ambiguities in sentences involving pronoun references.

Credits

LLaMa C++ has a large and vibrant community of contributors (~1,200 last time I checked) that actively maintain and extend its functionality, adding new models and architectures almost as fast as they appear. Considering the breakneck speed at which the AI/ML field is advancing, this alone is a remarkable feat!

While I'm grateful to all contributors, I want to recognise three in particular:

  • Colin Kealty (Bartowski), for the many contributions and for being one of the best sources of high quality quantized models available on Hugging Face
  • Georgi Gerganov for his amazing work with llama.cpp and the ggml/gguf libraries
  • Iwan Kawrakow for being one of the key authors behind the many quantization algorithms and the imatrix functionality.
Downloads last month
597
GGUF
Model size
14B params
Architecture
mistral3
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for eaddario/Ministral-3-14B-Instruct-2512-GGUF

Dataset used to train eaddario/Ministral-3-14B-Instruct-2512-GGUF

Paper for eaddario/Ministral-3-14B-Instruct-2512-GGUF