6 min read · AI for business · AI technology and models

A team wants to run an AI model on a small machine on site, because they do not want to send images or documents outside the factory. Someone suggests using a shrunk model, or choosing a small model. The next questions are whether the result is still usable and what is lost.
This article does not calculate GPU memory. For resource planning, see the articles on deploying AI in an organization and on estimating workloads on a GPU. For deciding whether AI should run on site or in the cloud, see the article edge-ai-vs-cloud-ai-factory. This article focuses on the quality you trade away.
Tell them apart: model size, number format and memory
- Model size: the number of values the model has learned (parameters). A small model has fewer.
- Number format: how many bits each number is stored in. Fewer bits save more space but lose precision.
- Memory actually used: depends on the two items above, and on the software that runs the model.
Quantization (storing the model's numbers with fewer bits), according to the Hugging Face documentation, means storing the weights, and in some methods also the intermediate values during computation, in fewer bits so the model uses less memory. A side effect is that accuracy can drop somewhat.
One more caution: the same documentation says that many models in GGUF format are converted back to full precision when loaded, so they use no less memory than an unquantized model. This is why you must measure on the software you will actually use.
Each method gives different results
Quantization is not a single switch. There are several methods, and each trades memory, speed and accuracy in different proportions. The Hugging Face documentation says some methods need a calibration dataset, while many do not.
ONNX Runtime states plainly that quantization is not a lossless transformation and can make model accuracy worse, so do not assume every model behaves the same way. A method that works well for one model may not work well for another.
The LLM.int8() paper points to what makes this harder in transformer language models: extremely large outlier values. The authors propose a specific way to handle them and report that their method does not lose accuracy, but that is the claim of one method, not a general guarantee.
Measure everything: quality, response time, throughput and machine limits
- Quality: correct and usable answers on our own question set, not a public one.
- Response time (latency): how long one request takes.
- Throughput: how many requests per period when several users are active at once.
- Machine limits: temperature, power draw and which instruction sets are supported.
Speed does not always improve. ONNX Runtime states that the result depends on both the model and the hardware, and that older machines without 8-bit integer instructions may get slower. This is why you must test on the real target machine.
Test hard cases, and prepare to go back to the original model
A simple question set usually shows no difference. Add the hard cases you actually meet on site, such as long documents, Thai mixed with English, numbers and units, or images in poor light. Then compare the standard model and the shrunk model on the same question set.
- Build a set of questions or test images from real work, with answers that a person has checked.
- Run the standard model to set the baseline.
- Run the shrunk model on the same set, on the target machine.
- Look at the items that differ, especially those the shrunk model gets wrong and the standard model gets right.
- Keep the standard model ready to switch back to, and agree in advance how bad the results must be before you roll back.
Hypothetical example: the test set has 120 questions from a machine manual. The standard model answers 96 correctly (80%) and the shrunk model answers 90 correctly (75%). That is 6 questions, or 5 percentage points, apart. Looking at the wrong answers, 5 of the 6 lost questions are about torque values. The team decides to use the shrunk model for general questions and to send numeric questions to the standard model. All numbers are hypothetical so that the arithmetic can be checked.
Checklist before you start
- Have you agreed what you want to reduce, for example memory, response time, or sending data outside the site?
- Can you tell whether what is reduced is the model size, the number format, or both?
- Do you have a test set from real work, including hard cases, with answers?
- Did you measure quality, response time and throughput on the real target machine?
- Does the software you use actually reduce memory, or does it only make the file smaller?
- Do you have the original model ready to switch back to, and a rule for when to roll back?
When it fits, and limits
It fits when there are machine or privacy constraints and the task does not need top accuracy on every item, for example classifying the type of a question or summarizing short text.
There is no guarantee that a smaller model is faster on every machine, or that quality stays the same. For work where a mistake is costly, such as technical numbers or documents that must be legally correct, a person should always check.
Talk to BT San about testing on the target machine
Start by measuring on the machine you will actually use. Prepare the machine details, sample work with the sensitive data masked, and the quality level you can accept. Then talk to the BT San team to design a test set that compares the standard model with the shrunk model.
References
- Hugging Face Transformers: Quantization overview (accessed 2026-11-20)
- ONNX Runtime: Quantize ONNX models (accessed 2026-11-20)
- arXiv 2208.07339: LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale (accessed 2026-11-20)




