Which model optimization technique to pick for edge inference is settled by measuring on the target device, not by a headline compression ratio. A documented int8 workflow starts with 8-bit post-training quantisation and moves to partial quantisation or quantisation-aware training only if accuracy falls short.
Model optimization for edge inference means choosing which techniques to apply to a trained network (quantisation, pruning, knowledge distillation, low-rank factorisation, operator fusion) so that it fits one device’s memory ceiling, latency budget and runtime. Model optimization in this sense is not the optimiser in a training loop. SGD or Adam adjust weights to minimise a loss while the model learns. Deployment-side model optimization starts from a trained model and changes its representation, structure or execution to cut latency, memory and power, which matters most on mobile and IoT devices where resources are tightest.
Quantisation speedups depend on the hardware: on-chip memory, bandwidth and cache hierarchy all change what quantising a given layer actually buys. That is why GPU performance engineering profiles the target before choosing a technique, rather than applying best practices out of context.
What Are the Main Model Optimization Techniques, and How Do They Differ?
The main model optimization techniques split into those that reduce numerical precision, those that remove parameters, those that replace the model with a smaller one, and those that change how the runtime executes the graph. Each depends on different support from the hardware or runtime.
| Technique | What it changes | Retraining needed? | Where the gain comes from | The catch |
|---|---|---|---|---|
| Quantisation (int8, fp16, int4, fp4) | Precision of weights and activations | No for post-training quantisation; yes for quantisation-aware training | Faster integer math pipelines, less memory bandwidth, smaller memory footprint | Gains need hardware with low-precision instructions; accuracy can drop on hard-to-quantise models |
| Unstructured pruning | Zeroes individual weights | Usually fine-tuned after; post-training methods exist for large models | Fewer non-zero parameters | Real acceleration needs special hardware or sparse software |
| Structured and semi-structured pruning | Removes filters, channels, heads or layers; or enforces 2:4 patterns | Usually fine-tuned after | A narrower dense model, or sparse tensor cores for 2:4 | Lower accuracy than unstructured pruning at the same prune ratio |
| Knowledge distillation | Trains a smaller student on a teacher’s soft outputs | Yes, a full student training run | A smaller architecture | Distillation alone tends to lose accuracy at aggressive compression |
| Low-rank factorisation | Replaces convolution filters with a low-rank basis | – | Fewer operations in convolution layers | Speedup is tuneable but trades against accuracy |
| Operator fusion and graph optimisation | Merges consecutive ops, folds constants, changes layout | No; basic rewrites preserve semantics | Fewer kernels and less memory round-tripping | Extended fusions apply only on some execution providers |
The primary sources give a feel for the scale of each. Jaderberg et al. (2014) reported a 2.5x speedup with no accuracy loss and 4.5x with less than 1% drop for low-rank expansion on a text-recognition network. Hinton et al. (2015) framed distillation as compressing the knowledge of a large model or ensemble into a single model that is cheaper to deploy. The techniques also combine: pruning with quantisation, or pruning, quantisation and distillation together, appear repeatedly in the pruning literature.
Which Optimisations Work After Training, and Which Need Retraining
Post-training quantisation calibrates quantisation parameters offline from a sample of data, with no further training. Its overhead is low and it works when data is limited or unlabelled, but it usually costs more accuracy than quantisation-aware training, especially at low bit widths. Some pruning methods also skip retraining by using compensation mechanisms; SparseGPT prunes large language models to at least 50% sparsity with minor accuracy loss.
Quantisation-aware training inserts fake quantisation operations into the network and fine-tunes, so the weights adapt to the lower precision. NVIDIA’s guidance (2025) suggests running it for about 10% of the original training epochs, and less than 1% of pre-training time is often enough for LLMs. Quantisation-aware distillation differs in its loss: it trains the quantised student to match the full-precision teacher’s output distribution rather than the task loss. Distillation itself needs a training run, because the compact student model is trained with the teacher’s help.
How Do Quantisation and Mixed Precision Cut Inference Latency and Memory, and How Much Accuracy Do They Cost?
Quantisation cuts latency and memory for three reasons: processors run low-bit math faster, smaller words reduce memory bandwidth pressure, and smaller tensors fit caches better. Wu et al. (2020) give the theoretical ceiling as up to 16x for math-intensive int8 operations versus fp32 and up to 4x for memory-limited ones. Krishnamoorthi (2018) observed 2x to 3x speedups for quantised networks on CPUs and up to 10x on DSPs with fixed-point SIMD, alongside a 4x model size reduction from 8-bit weights.
DeepEdgeBench (2021) measured inference time reductions from quantising MobileNetV2 of 37.6% on Asus Tinker Edge R, 39.3% on the Coral Dev Board and 33.7% on Raspberry Pi 4. The same study measured an accuracy cost of about 0.6% Top-1 and 0.4% Top-5.
Accuracy cost varies by model, not just by bit width. Krishnamoorthi (2018) found that per-channel 8-bit post-training quantisation kept classification accuracy within 2% of floating point across a wide range of CNNs, and quantisation-aware training narrowed that to 1%. Wu et al. (2020) found post-training quantisation dropped more than 1% for MobileNets, EfficientNets, Transformer and BERT, yet their full workflow brought every network studied to within 1% of the floating-point baseline. Even with per-channel quantisation, networks like MobileNet were shown not to reach int8 baseline without quantisation-aware training. Below 8 bits the cost climbs: 4-bit weights with quantisation-aware training lost 2% to 10%, with the larger drops on smaller networks.
For large language models, larger models proved more robust to quantisation. NVIDIA’s 2026 quantisation-aware distillation report found that the very large models it tested stayed near original accuracy with post-training quantisation alone. For Llama Nemotron Super V1, by contrast, NVFP4 post-training quantisation took AIME25 from 46.0 to 32.3, quantisation-aware training recovered it to 41.5, and quantisation-aware distillation to 45.6. For models trained with reinforcement learning, plain quantisation-aware training broke their capabilities while distillation-based recovery did not.
Mixed precision gives each layer its own bit width, spending bits on sensitive layers and saving them on tolerant ones. The difficulty is that the search space grows exponentially with layer count. When it is done hardware-aware, it pays: Gholami et al. (2021) report HAWQv3 reaching up to 50% speedup with mixed INT4/INT8 over pure INT8 on T4 GPUs. A cheaper relative is partial quantisation, where a one-at-a-time sensitivity analysis finds the few layers responsible for most of the accuracy loss and leaves them in floating point.
The trade-off has to be measured on the converted model running on the device. Accuracy can change after a model is converted and optimised for a specific platform, so DeepEdgeBench included it in its device comparison. TensorRT’s documentation states the same point: aggressive quantisation reduces latency but introduces error that degrades accuracy.
How Does Model Optimization Work in Practice?
In practice, model optimization is a form of inference performance tuning, a measure-then-change loop: benchmark, apply one change, measure again to confirm it had the effect you expected. NVIDIA’s TensorRT guide is blunt about it: without a stable measurement baseline, every optimisation is a guess. Combining that guide with the int8 workflow of Wu et al. (2020), the steps run in this order:
- Baseline. Record latency, throughput, memory and per-layer cost, with GPU clocks, power and thermal throttling controlled so the numbers are stable.
- Post-training quantisation. Quantise the compute-heavy layers and try several activation calibrations (max, entropy, 99.99% and 99.999% percentile), since no single calibration is best for every network.
- Partial quantisation. If accuracy falls short, use sensitivity analysis to keep the most sensitive layers in floating point.
- Quantisation-aware training. If that still misses, fine-tune from the best calibrated model for around 10% of the original schedule.
- Structural changes. Only if the model still does not fit, consider structured pruning, distillation or factorisation, each followed by fine-tuning.
- Re-measure and revalidate accuracy on the device after every step, because the runtime may not run the changed graph the way you expect.
The page on how machine learning model optimization works and what it measures covers the measurement side in more depth. For which metrics actually explain a slowdown, see ML model metrics that explain GPU bottlenecks versus those that mislead.
How Do Runtime Compilers and Toolkits (TensorRT, ONNX Runtime, TensorFlow Model Optimization Toolkit, Core ML) Change Which Optimisations Are Worth Applying?
The runtime determines which optimisations actually execute fast on a given chip. Quantisation on hardware without fast int8 instructions can buy nothing or run slower, because quantising and dequantising adds overhead. Each toolkit shifts the calculation differently.
TensorRT compiles a trained network, usually from ONNX, into a GPU-specific engine that fuses layers, runs in reduced precision and keeps the fastest kernels it times on the target GPU. Its weight-only INT4 mode is aimed at GEMMs limited by memory bandwidth or at scarce GPU memory, so it suits a memory ceiling problem rather than a compute problem. With its 2:4 structured sparsity support, NVIDIA measured gains approaching 20% at large batch sizes and up to 36% performance per watt at smaller ones on an A100 with TensorRT 8.0. That is a data-centre A100 result, not an edge measurement.
ONNX Runtime applies graph optimisations at basic, extended and layout levels; extended fusions only apply to nodes assigned to CPU, CUDA or ROCm execution providers. Its documentation says GPU quantisation needs Tensor Core int8 support, as on T4 or A100, and older hardware will not benefit. It recommends dynamic quantisation for RNNs and transformers and static quantisation for CNNs.
The TensorFlow Model Optimization Toolkit supports post-training quantisation, quantisation-aware training, pruning and clustering. Its guidance recommends 16-bit floats for GPU acceleration and 8-bit integers for CPU execution, with full-integer quantisation (which needs a small representative dataset) for integer-only accelerators. Google’s Edge TPU accepts only fully 8-bit quantised TensorFlow Lite models compiled for it, so quantisation is a requirement there, not an option.
Core ML favours different techniques on each compute unit: weight palettisation for memory and latency on the Neural Engine, W8A8 on newer chips such as A17 Pro and M4, INT4 per-block weights on Mac GPUs, and pruning for latency on the Neural Engine and CPU. Apple’s guidance is to test each model and Apple Silicon combination, because decompression strategy varies per compute unit.
How Does Runtime-Specific Compilation Change Which Optimisations Pay Off?
Runtime-specific compilation ties the optimised artefact to the hardware it was built for. A TensorRT engine by default runs only on the GPU type and TensorRT version it was built with; portable engines trade some speed. An ONNX Runtime model saved offline with layout optimisations for AVX2 needs AVX2 CPUs, and one pre-optimised for a GPU execution provider cannot run on a CPU-only machine. Kernel selection is hardware-specific too: in TensorFlow Lite, Winograd kernels gave up to 1.32x on PowerVR GE8320 and 1.26x on Mali G76, yet nothing on Adreno 640 or 616. The practical consequence is that a fleet with several device types needs a build and a measurement per type, and an optimisation choice should be judged per target rather than once.
How Do I Choose an Optimisation Technique Against an Edge Device’s Memory Ceiling and Tail-Latency Budget?
Choose by finding which constraint the device actually breaks: memory, mean latency, or tail latency. Then apply the technique that moves that constraint and that the runtime accelerates. The table below is our starting rule, with the evidence behind each row.
| Measured problem on the device | First move | Why |
|---|---|---|
| Model does not fit in RAM, or swaps | 8-bit (or lower) weight quantisation, then pruning or distillation to a smaller architecture | 8-bit weights cut model size 4x; on a 4 GB Jetson Nano, a model that did not fit pushed to SD-card swap and ran slower on the GPU than on a CPU |
| Memory-bandwidth-bound | Weight-only or mixed-precision quantisation | Sustained throughput depends more on data movement than on peak TOPS |
| Compute-bound convolutions | Full int8 on hardware with int8 paths | Math-intensive int8 operations have the largest theoretical gain |
| Accelerator needs a format the model lacks | Full-integer quantisation and replacement of unsupported ops | One unsupported op on an Edge TPU sends the rest of the graph to the CPU |
| Accuracy lost after quantisation | Partial quantisation, then quantisation-aware training | Sensitive layers carry most of the loss; QAT follows if that falls short |
| No sparse hardware, but need real speedup from pruning | Structured pruning | Most frameworks and hardware cannot accelerate unstructured sparse matrices |
When Pruning or Distillation Beats Quantisation
Prune or distil when quantisation has already been taken as far as accuracy allows and the model still breaks the memory or latency budget, or when the target lacks fast low-precision instructions, so quantisation buys little. Structured pruning gives a smaller dense model that needs no special hardware or software. Unstructured pruning reaches higher ratios and loses less accuracy at the same ratio; one survey example shows 0.44 Top-1 loss at 80% pruning against 0.89 at 51.8% for a structured method. But unstructured pruning only speeds things up where sparse kernels exist. Distillation replaces the architecture itself with a compact student model. Gholami et al. note that distillation alone tends to degrade accuracy at aggressive compression, while combining it with quantisation and pruning works well.
Treat published pruning results with care. Blalock et al. (2020) aggregated 81 papers and concluded that the lack of standard benchmarks and metrics makes pruning techniques hard to compare. The multi-platform form of the distil-or-quantise decision is worked through in distillation vs quantisation for multi-platform edge inference.
Why a Data-Centre Optimisation Still Fails at the Edge Boundary
An optimisation that passes on a data-centre GPU can fail on an edge device because memory bandwidth drops by an order of magnitude and memory is far smaller. A 2025 edge AI survey puts an A100 at 1555 GB/s of memory bandwidth against 50-60 GB/s for a Snapdragon 8 Gen 2. The same survey finds quantised LLMs still exceeding edge memory by 2-10x, with high-end phones offering 6-12 GB of DRAM. Halving memory on a large GPU says nothing about fitting under that ceiling.
The runtime adds failures that pass low-volume testing unnoticed. A 2026 BSP-aware deployment paper describes execution providers that are present but not fully usable, and fallback paths that silently shift work to the CPU. Coral’s documentation warns that even a small fraction of the graph on the CPU can slow inference by an order of magnitude. Thermal throttling can dominate steady-state throughput on battery-powered devices. And device-level differences such as image signal processing produced divergent classifications for 14-17% of images across mobile devices in the study by Cidon et al. that the paper cites.
Silent CPU fallback, allocator churn from dynamic shapes and thermal throttling all degrade latency in the field while low-volume tests look healthy. A tail budget therefore has to be measured on the device, under sustained load, after every optimisation step. The 2025 survey makes the same point in general terms: concrete thresholds are deployment- and hardware-specific and should be established by measurement on the target platform. Our page on real-time edge processing with GPU acceleration looks at the latency side of that work.
How Do Model Optimization Decisions Feed Back into Agent Framework Selection for On-Device Inference?
Optimisation decisions set the envelope an on-device agent framework has to fit inside: the memory left after weights and KV cache, the precision formats the runtime must load, and the decode latency per step. Decode for edge LLMs is latency-critical at batch size one, where KV-cache reuse and speculative decoding dominate throughput. Format support varies by runtime. MiniCPM, for example, ships int4 and GGUF builds for llama.cpp, Ollama, vLLM and SGLang.
The consequence is an order of decisions. A framework that cannot load the format you quantised to, or whose own memory overhead pushes the total past the device ceiling, is ruled out before its features matter. Fix the optimised model and its runtime first, then pick the framework. The selection criteria themselves are covered in agent framework selection for edge-constrained inference targets. Precision that adapts at run time is covered in DynaQ explained: dynamic quantisation for edge-constrained agent inference. The data side of the same constraint is in the data-centric approach for edge-constrained agent inference. Teams commissioning that kind of on-device generative or agentic system can see how TechnoLynx scopes it on the Generative & Agentic AI R&D page.
An Optimised Model Is Not yet a Qualified One
An optimised model passing an accuracy check on the bench is the start of qualification, not the end. The BSP-aware deployment paper argues for soak tests, multi-hour or multi-day runs with telemetry, and degradation tests for when the accelerator is unavailable. It also asks that runtime acceleration be positively verified rather than assumed. For a vision model on a production line, that evidence belongs in the artefacts described in what keeps a line-side inspection model running in production.
The concrete latency threshold each optimisation must meet is hardware-specific and has to be measured on your own device. Until you have that number from your own hardware, the choice between quantising further, pruning and distilling is still an estimate.