Back to list

Tech Blog · AI Agents

[AI Agent Basics 9] Big models, small models — which fits a factory?

Which AI model should you use in a factory cut off from the internet, or on a floor where data cannot leave the site? We outline how distillation and quantization make models smaller, what is lost, and architectures that mix small and large models.

Aug 25, 2026 · OPTI-X

Basics series “How AI Agents Are Built” · Part 9

Most of the best-performing language models run in huge data centers. But many factories are on air-gapped networks separated from the internet for security, and cannot send process data outside. In that case, the option is a model that can run inside the factory.

In the last part we covered how to evaluate an agent. This time the question is how large the model inside that agent should be.

Two ways to make a model smaller

Distillation: Train a small model (the student) on the answers of a large model (the teacher). When limited to a specific task, a small model can perform quite well.

Quantization: Represent the model's numbers with fewer bits. It loses a little precision, but memory use drops sharply and answers are generated faster.

Weight size of a 7-billion (7B) parameter model

Depends on the number of bits used per number (weights only; running it needs additional memory)

16-bit
14.0GB
8-bit
7.0GB
4-bit
3.5GB
Source: Approximation calculated as size ≈ number of parameters × bits ÷ 8

Reduced to 4 bits, a 7B model becomes small enough to run on an ordinary business GPU or a high-end workstation. The larger the model, the more compression is needed. According to the GPTQ study, a 175-billion-parameter model takes up 326GB at 16 bits and does not fit on a single GPU. The authors reduced this model to 3–4 bits in about four hours on one GPU. The 3-bit model ran on a single GPU and generated each token about 3.25 times faster than the 16-bit model running on 5 GPUs.

How much does distillation transfer?

The key to distillation is having the student learn the teacher's full set of probabilities, not just the single correct answer. If the teacher, looking at a handwritten 2, says "3 is more likely than 7," that tells you which 2s look like 3s. Hinton and colleagues softened these probabilities (by raising the temperature) and trained the student on them.

Test errors in handwritten digit recognition

A small model of the same size makes nearly half as many errors when it learns the teacher's probabilities

Large model (teacher)
67 errors
Small model (trained alone)
146 errors
Small model (distilled)
74 errors
Source: Hinton et al. (2015), Section 3 MNIST experiment, redrawn

In speech recognition, more than 80% of the accuracy gain from an ensemble of 10 models was transferred to a single model. The results carried over to language models. A 2023 study taught the student the large model's worked reasoning as well, and a 770-million-parameter model scored higher than a 540-billion-parameter model on one benchmark. It used 80% of the training data.

What you lose when you shrink

Quantization costs more in small models. In the GPTQ experiments, the 175-billion model's perplexity (an error measure for language prediction) barely moved at 4 bits, from 8.34 to 8.37. The 6.7-billion model went from 10.86 to 11.39, and to 14.86 at 3 bits. That is why the smaller the model going into a factory, the more it needs to be validated again after shrinking.

The GPTQ authors state that the speedup comes from reading fewer numbers from memory; the amount of computation itself does not go down. A distilled student is a dedicated model fitted to one task. The authors of the reasoning-distillation study list as a limitation that the teacher model's reasoning is weak on complex planning tasks. The method fits narrow, repetitive tasks such as summarizing shift logs or classifying alarms.

Mixing the two

Large cloud models vs. small on-site models

Performance is not the only criterion

Large cloud model
Small model installed on-site
Performance
Best general-purpose capability
Often sufficient when tailored to a specific task
Data
Sent outside
Never leaves the factory
Network
Requires internet
Works on an air-gapped network
Cost structure
Usage-based pricing
Upfront hardware + operating staff
Updates
Automatically up to date
Replaced and validated in-house

Recently, architectures that combine the two have been widely studied. In 2025, NVIDIA researchers argued that since most of what agents do is narrow and repetitive, small models should be the default and large models called only when needed. By their summary, serving a 7B model is 10–30 times cheaper in latency, energy and computation than a 70–175-billion model. Their estimate from examining three open-source agents is that 40–70% of language model calls could be replaced by appropriately fine-tuned small models. The same paper also records the counterargument that the cost of building infrastructure and staffing it, when you run models yourself, is often left out of the calculation.

Applied to a factory, cloud models would handle non-sensitive planning and document work, while small on-site models handle lookups and summaries that touch process data.

Choosing a model for the factory

Questions when choosing a model for the factory

What to check before any performance comparison table

DataCan the data leave the site?
If not, on-site installation is a given
LatencyWithin how many seconds must it answer?
If real-time, a small, fast model
ScopeDoes it need general conversation, or a specific task?
The narrower the task, the more a small model is enough

What matters more than model size is the role the model plays. A realistic structure is one where setpoints such as reactor temperature or chemical dosing rate are calculated by a dedicated model validated on process data rather than by a language model, and the language model explains the results and communicates with people. Split this way, the language model can be small, and errors introduced by shrinking it do not go straight to the equipment.

In the next part, we wrap up the series by looking at how the components covered so far fit together inside a coding agent.

References

Could this work for your process?

Talk to us