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

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

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

From the original model creators:

Ministral 3 14B Reasoning 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 reasoning post-trained version, trained for reasoning tasks, making it ideal for math, coding and stem related 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 32GB of VRAM in BF16, and less than 24GB of RAM/VRAM when 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-Reasoning-2512-F16 16.0005 27.0 6.436297 ±0.039434 100% N/A N/A
Ministral-3-14B-Reasoning-2512-IQ1_L 1.7499 2.96 22.132043 ±0.152503 77.56% 1.208592 ±0.003084 55.222 ±0.128
Ministral-3-14B-Reasoning-2512-IQ2_S 2.2500 3.81 9.588696 ±0.062743 91.12% 0.389679 ±0.001571 72.215 ±0.115
Ministral-3-14B-Reasoning-2512-IQ2_XS 2.1250 3.60 10.290454 ±0.068161 89.60% 0.459912 ±0.001780 70.526 ±0.117
Ministral-3-14B-Reasoning-2512-IQ2_XXS 2.0000 3.38 12.026650 ±0.081067 86.72% 0.607188 ±0.002170 67.300 ±0.120
Ministral-3-14B-Reasoning-2512-IQ3_XXS 2.9999 5.07 7.282053 ±0.045407 97.21% 0.124056 ±0.000618 84.285 ±0.093
Ministral-3-14B-Reasoning-2512-Q2_K 2.4999 4.23 8.565386 ±0.055711 93.92% 0.277481 ±0.001145 76.209 ±0.109
Ministral-3-14B-Reasoning-2512-Q3_K_L 3.7499 6.34 6.761373 ±0.040460 99.00% 0.051564 ±0.000209 89.399 ±0.079
Ministral-3-14B-Reasoning-2512-Q3_K_S 3.2500 5.49 7.016841 ±0.045008 98.24% 0.082114 ±0.000402 87.037 ±0.086
Ministral-3-14B-Reasoning-2512-Q3_K 3.5000 5.92 6.887992 ±0.043694 98.66% 0.061232 ±0.000311 88.897 ±0.081
Ministral-3-14B-Reasoning-2512-Q4_K_S 4.2500 7.18 6.527023 ±0.040267 99.66% 0.015459 ±0.000089 93.995 ±0.061
Ministral-3-14B-Reasoning-2512-Q4_K 4.5000 7.61 6.504096 ±0.040048 99.76% 0.011151 ±0.000065 94.870 ±0.057
Ministral-3-14B-Reasoning-2512-Q4_K_M-bartowski 4.8755 8.24 6.495948 ±0.039938 99.79% 0.009252 ±0.000054 95.480 ±0.053
Ministral-3-14B-Reasoning-2512-Q4_K_M-unsloth 4.8755 8.24 6.496198 ±0.039898 99.79% 0.009316 ±0.000056 95.457 ±0.053
Ministral-3-14B-Reasoning-2512-Q4_K_M-bpw 4.8755 8.24 6.479312 ±0.039858 99.83% 0.007521 ±0.000050 95.795 ±0.052
Ministral-3-14B-Reasoning-2512-Q5_K_S 5.2500 8.87 6.468715 ±0.039772 99.88% 0.005323 ±0.000034 96.391 ±0.048
Ministral-3-14B-Reasoning-2512-Q5_K 5.5000 9.29 6.457297 ±0.039602 99.92% 0.003445 ±0.000020 97.079 ±0.043
Ministral-3-14B-Reasoning-2512-Q6_K 6.4998 11.0 6.448191 ±0.039554 99.97% 0.001177 ±0.000007 98.333 ±0.033
Ministral-3-14B-Reasoning-2512-Q8_0 8.4999 14.4 6.439012 ±0.039469 99.99% 0.000137 ±0.000001 99.442 ±0.019

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-Reasoning-2512-IQ1_L 46.6667 57.3333 31.8667 28.6667 56.4000 44.19
Ministral-3-14B-Reasoning-2512-IQ2_S 62.8000 69.3333 39.7333 28.8000 67.0667 53.55
Ministral-3-14B-Reasoning-2512-IQ2_XS 62.1333 68.6667 36.9333 28.4000 67.4667 52.72
Ministral-3-14B-Reasoning-2512-IQ2_XXS 57.3333 63.6000 34.8000 27.7333 64.0000 49.49
Ministral-3-14B-Reasoning-2512-IQ3_XXS 69.0667 75.3333 40.4000 32.4000 71.0667 57.65
Ministral-3-14B-Reasoning-2512-Q2_K 69.4667 72.2667 40.9333 28.5333 69.3333 56.11
Ministral-3-14B-Reasoning-2512-Q3_K_L 69.0667 77.2000 41.8667 32.5333 74.9333 59.12
Ministral-3-14B-Reasoning-2512-Q3_K_S 70.0000 75.8666 41.6000 32.8000 70.9333 58.24
Ministral-3-14B-Reasoning-2512-Q3_K 71.3333 76.0000 41.4667 31.6000 75.0667 59.09
Ministral-3-14B-Reasoning-2512-Q4_K_S 70.6667 78.0000 42.6667 32.8000 74.6667 59.76
Ministral-3-14B-Reasoning-2512-Q4_K 69.7333 77.8667 43.4667 32.2667 74.5333 59.57
Ministral-3-14B-Reasoning-2512-Q4_K_M-bartowski 69.2000 78.1333 43.6000 32.2667 74.8000 59.60
Ministral-3-14B-Reasoning-2512-Q4_K_M-unsloth 68.6667 78.6666 42.6667 30.5333 73.3333 58.77
Ministral-3-14B-Reasoning-2512-Q4_K_M-bpw 70.0000 78.2667 43.2000 32.4000 74.1333 59.60
Ministral-3-14B-Reasoning-2512-Q5_K_S 70.2667 78.4000 42.6667 32.0000 73.8667 59.44
Ministral-3-14B-Reasoning-2512-Q5_K 70.0000 78.8000 42.5333 31.2000 73.4667 59.20
Ministral-3-14B-Reasoning-2512-Q6_K 69.6000 79.0666 43.0667 31.6000 74.5333 59.57
Ministral-3-14B-Reasoning-2512-Q8_0 69.8667 78.6666 42.6667 31.6000 74.4000 59.44

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-Reasoning-2512-Q4_K_M-bpw 7.67 GiB 13.51 B Metal,BLAS 12 pp512 507.26 ±0.86
Ministral-3-14B-Reasoning-2512-Q4_K_M-bpw 7.67 GiB 13.51 B Metal,BLAS 12 tg128 41.11 ±1.35
Ministral-3-14B-Reasoning-2512-Q4_K_M-bpw 7.67 GiB 13.51 B Metal,BLAS 12 pp1024+tg1024 68.68 ±0.18
Ministral-3-14B-Reasoning-2512-Q4_K_M-bartowski 7.67 GiB 13.51 B Metal,BLAS 12 pp512 486.21 ±6.62
Ministral-3-14B-Reasoning-2512-Q4_K_M-bartowski 7.67 GiB 13.51 B Metal,BLAS 12 tg128 48.05 ±3.19
Ministral-3-14B-Reasoning-2512-Q4_K_M-bartowski 7.67 GiB 13.51 B Metal,BLAS 12 pp1024+tg1024 78.17 ±0.24
Ministral-3-14B-Reasoning-2512-Q4_K_M-unsloth 7.67 GiB 13.51 B Metal,BLAS 12 pp512 501.23 ±12.03
Ministral-3-14B-Reasoning-2512-Q4_K_M-unsloth 7.67 GiB 13.51 B Metal,BLAS 12 tg128 45.61 ±3.09
Ministral-3-14B-Reasoning-2512-Q4_K_M-unsloth 7.67 GiB 13.51 B Metal,BLAS 12 pp1024+tg1024 78.73 ±0.14

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
433
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-Reasoning-2512-GGUF

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

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