Evaluating Quantized Local Models: Measuring Quality and Speed on Your Hardware
Imagen generada con gpt-image-2.5-sunburst para InferamaSource ↗
01

Why Measure Before Choosing

Quantization reduces the memory required to load weights, but it does not by itself indicate how much quality will change for a specific task. Nor is knowing the parameter count of a model enough to anticipate speed on your machine: the processor, available memory, inference configuration, context, and system load all play a role. The useful decision comes from measuring alternatives with inputs representative of real usage.

A 2025 study on six models run locally with Ollama in an academic information retrieval system compared accuracy, latency to the first token, and generation speed. That work shows a pertinent empirical approach, but it does not prove that a specific GGUF quantization preserves quality across other models, tasks, or hardware. The following guide turns that principle into a custom protocol: first define what 'getting it right' means and what performance you need; then compare each configuration against an explicit reference.

02

1. Define the Task and Baseline

Start by describing what the model will do in production: who uses it, what it receives as input, what output it must produce, which errors are costly, and how long it can take. An evaluation of field extraction requires measuring value matches; a document-based response task needs to check fidelity to sources; a code generator requires running tests, not just judging if the response seems plausible. If you mix different tasks into a single score, you may hide critical failures.

Prepare a test set that represents the expected distribution: frequent input types, edge cases, ambiguous inputs, and difficult examples. Include a verifiable reference for each case—a correct answer, expected fields, automated tests, or an evaluation rubric—and record where it comes from. Separate a development set, which you can use to tune prompts or parameters, from an evaluation set that you should not use for repeated optimization. This reduces the risk of choosing a configuration that only works well on already-seen examples.

Minimum Test Set Design

Before running models, document the task, examples, expected outputs, and approval criteria. Keep inputs fixed and do not change the rubric mid-comparison.

  1. 01Describe a specific task and an acceptable output.
  2. 02Collect representative examples and difficult cases, without including sensitive data that should not be processed locally.
  3. 03Note the expected answer or verification method for each example.
  4. 04Reserve evaluation cases that you will not use to tune the prompt.
  5. 05Define in advance which failures are critical and what minimum threshold each metric must meet.
03

2. Measure Quality for the Real Work

Quality is not a single metric. For responses with a known solution, calculate accuracy or hit rate; for extraction, exact match per field and per record; for classification, report precision and recall when false positives and negatives have different costs. In open generation tasks, use an explicit rubric—for example, factuality, coverage, clarity, and utility—and keep error examples to interpret the score. An automatic or model-based assessment can help review many cases, but it should not be treated as ground truth without checking its validity for that use.

Measure format as an independent criterion when the system requires JSON, a fixed structure, a tool call, or length limits. Check if the output can be parsed by the real validator and if it respects mandatory fields, types, enumerations, and constraints. Also record consistency between runs when sampling is not deterministic: a single correct response does not prove the system is reliable. For high-risk tasks, explicitly count critical errors and establish a rejection or human review rule before evaluating.

Quality Metric by Task

Choose metrics that correspond to the failure you want to avoid; do not average incompatible indicators without explaining what the result means.

Task TypePractical MeasurementWhat to Check Additionally
Classification with expected labelAccuracy and, if classes are imbalanced, precision and recall per classRelative cost of false positives and false negatives
Structured ExtractionExact match per field and percentage of fully correct recordsMissing fields, incorrect types, and invalid JSON
Document-based ResponseCorrect answer rubric and support in available sourcesUnsupported claims, incorrect citations, and critical omissions
Code GenerationExecution of automated tests and task resolution rateSecurity errors, dependencies, and edge cases
Open WritingRubric with defined criteria and sample reviewVariability between runs and suitability for the audience
04

3. Measure Speed, Latency, and Memory

Record at least the latency to the first token and the generation speed in tokens per second. The former approximates how long a person waits before seeing a response; the latter describes subsequent production. Add the total time to complete the response, because a long output can take a long time even if the generation rate is high. Indicate which tool reports each measure and what it includes: initial model load, prompt preparation, input processing, or only generation.

Note memory consumption during inference and the context tested. The size of the GGUF file does not automatically equal the total memory required: context, attention cache, runtime, and the operating system can also influence it. Compare the same model and the same task with identical context limits, generation parameters, and hardware. If a configuration does not fit in memory and resorts to swapping to storage or a different execution path, record it: it is no longer an equivalent comparison.

Performance Log

Save values per run, not just a final average. Summarize the median and range or percentiles afterwards, especially if response time matters for users.

FieldWhat to RecordWhy It Matters
First ResponseLatency to first token, with unit and methodRepresents initial wait time
GenerationTokens per second during outputAllows comparing production rate under the same configuration
Complete ResponseTotal time and output lengthCaptures the perceived cost of completing a task
MemoryMaximum observed usage and available memoryVerifies that execution is viable on the target machine
ConditionsHardware, runtime, version, context, and parametersMakes the comparison interpretable and reproducible
05

4. Run a Controlled Comparison

To attribute differences to the evaluated configuration, keep the input set, prompt template, token limit, temperature, and other relevant parameters constant. Note the model name and revision, the source of the GGUF file, and its exact quantization. Also record versions of Ollama or LM Studio, operating system, processor, accelerator, memory, and layer offloading options. In the protocol, specify if the model was already loaded or if you also measure the initial load.

Run a preparation pass first if you need the model to load and stabilize, and do not mix it with regular measurements unless startup is part of the operational requirement. Repeat each test several times; report the median and variability, not the most favorable run. If the application uses stochastic outputs, fix the seed when the tool allows it or evaluate several samples with the same policy. Alternate the order of configurations if thermal or system load may change during the session. Repeat tests in conditions close to deployment, not just with a freshly rebooted machine.

Reproducible Protocol in Ollama or LM Studio

Menu names and options may vary by version. Note the effective configuration you used, instead of assuming two interfaces automatically apply the same values.

  1. 01Download or identify the variants of the same model you want to compare; record the file and exact quantization.
  2. 02Use the same machine, the same set of prompts, and the same generation parameters for each variant.
  3. 03Fix the context and verify if all layers run on the same device or if there is partial offloading to CPU.
  4. 04Perform a warm-up pass and then several measured repetitions.
  5. 05Save outputs, times, memory, errors, and software versions in a common log.
  6. 06Check that conditions match before attributing a difference to quantization.
06

5. Decide Between Quantization and Model Size

First evaluate if each option meets the pre-defined quality and performance requirements. Discard configurations that fail a critical criterion, even if they excel in another metric. Among those that pass, compare total time, initial latency, memory, and format stability. If a more aggressive quantization of the large model maintains necessary quality and fits in the hardware, it may be preferable; if it loses precision in a sensitive task, a smaller model with more conservative quantization may yield better results. There is no general rule that resolves that choice without measuring.

It is also reasonable that the best option is a different model than initially planned, or that the workflow routes simple tasks to a fast model and reserves a more capable one for difficult cases. The academic Ollama study mentioned earlier found differences in speed and accuracy between models in its own RAG system; its results should not be transferred as a guarantee to another configuration. To justify a technical decision, keep results by task type and explain what trade-offs the team accepts. If two alternatives are very close, consider the uncertainty of the measurements and repeat the test before fixing a conclusion.

Decision Matrix

The decision is made in two stages: first, requirement compliance; second, preference among valid options.

Evaluation ResultSuggested DecisionVerification
Fails a critical quality requirementDo not deploy that configuration in the workflow without mitigationReview errors, test set, and need for human review
Meets quality, but exceeds latency or memoryChange configuration or hardware and re-measureConfirm context, layer offloading, and concurrent load
Meets all thresholds and has stable marginConsider it a candidate for controlled deploymentValidate with operational data and monitor changes
Two options meet criteria and results are closeChoose based on operational cost and maintenance ease; repeat if the difference mattersCompare dispersion, consumption, and behavior in difficult cases
07

6. Limits and Best Practices

A small set may miss rare errors; one too similar to development examples may favor the configuration tuned to those cases. An aggregated score can also hide failures by language, length, document type, or minority class. Examine broken-down results and keep error examples. If a difference is within run-to-run variation, do not describe it as a conclusive improvement without more repetitions or evidence.

The results of a research published in an academic RAG environment are evidence about that work and its configuration, not an evaluation of GGUF or a universal recommendation. Similarly, generic figures on a supposed fixed quality loss per quantization level do not replace a test with the specific model and task. Document the source of files, avoid including personal data in test prompts without authorization, and establish human review or rejection mechanisms when an error may cause harm. After deployment, periodically review a sample of real usage and repeat the protocol if the model, runtime, hardware, or input pattern changes.

Pre-Decision Checklist

A conclusion is more useful if it allows another person to repeat the evaluation and understand what is outside its scope.

  1. 01Are the task and error costs defined?
  2. 02Does the set represent common and difficult cases, with verifiable references?
  3. 03Is quality measured with pertinent criteria, including format and critical failures?
  4. 04Were first response, generation, total time, and memory measured?
  5. 05Were conditions kept constant and runs repeated?
  6. 06Were versions, configuration, results, and generalization limits preserved?

Open questions

  • The provided evidence on Ollama describes a 2025 study in an academic RAG system; it does not specifically evaluate GGUF degradation by quantization nor allow generalizing its results to other tasks.
  • The technical source provided offers general figures on quality loss by quantization, but the verifiable material does not credit that they are applicable to any model or test set; therefore, they are not used as guarantees in this guide.
  • Names and controls available in Ollama and LM Studio may vary by version. The protocol requires recording the effective configuration of each run.
08

Keep exploring

08

Sources consulted

03

Corrections and transparency

If you spot incorrect or outdated information, send us a correction with the page and source we should review.

Submit a correction