Distillation vs Quantisation for Multi-Platform Edge Inference: How to Choose

Distillation and quantisation both shrink models for edge inference, but for three-or-more platforms only distillation keeps quality consistent.

Distillation vs Quantisation for Multi-Platform Edge Inference: How to Choose
Written by TechnoLynx Published on 28 Apr 2026

How do you choose between distillation and quantisation for a multi-platform edge target?

A model that runs acceptably on a development machine needs to run in real time on iOS, Android, and browser targets. Both distillation and quantisation reduce the model to something that fits within mobile and edge memory budgets. They do not make the same tradeoffs, and choosing the wrong approach for a multi-platform deployment creates a hidden problem that appears after the first target ships: the model that validates correctly on iOS behaves differently on Android, and the browser implementation has quality characteristics that diverge from both.

The divergence is not a bug in any individual implementation. It is the expected consequence of applying precision reduction techniques independently to runtime-specific implementations of the same model, without a shared quality baseline across platforms.

What distillation and quantisation actually do

Distillation trains a smaller student model to replicate the behaviour of a larger teacher model. The student model has a different architecture — fewer layers, reduced hidden dimensions, or a simpler design — but is trained to match the teacher’s output distribution rather than just the ground-truth labels. The resulting model is smaller because it has fewer parameters, not because its parameters have been reduced in precision. A distilled model is a portable artefact: it can be exported to any runtime (CoreML, ONNX Runtime, TensorRT) and its behaviour is determined by its architecture and weights, not by the runtime’s precision implementation.

Quantisation reduces the numerical precision of an existing model’s weights and activations — typically from 32-bit floating point to 16-bit or 8-bit integers. The same model architecture is preserved, but the precision reduction means the numerical results differ slightly between the original and quantised implementations. Critically, INT8 quantisation on CoreML and INT8 quantisation on ONNX Runtime apply different quantisation schemes, different calibration methods, and potentially different operator implementations. A model quantised for CoreML is not the same numerical object as the same model quantised for ONNX Runtime, even if both are labelled “INT8.”

The pre-condition: device-capability profiling on the actual target hardware

Choosing between distillation and quantisation only makes sense once the team knows what the target devices can actually execute. The same GPU profiling methodology that diagnoses server-side bottlenecks applies to constrained inference targets — browser WebGL/WebGPU contexts, mobile NPUs, and edge accelerators — but the inputs change: median-device performance rather than peak hardware specs, runtime-version coverage across the deployment cohort, and the operator subset each runtime actually supports without falling back to CPU.

The device-capability baseline is a project-specific measurement, not an industry benchmark. Skipping it produces the failure mode discussed in why client-side ML projects miss latency targets before deployment: a model validated on the development machine fails to hit the latency budget on the median user device by a factor of 5–10× — an observed range across our edge-deployment engagements, not a guaranteed outcome — because the architectural decision was made against the wrong device profile. Establishing the baseline before the distillation-vs-quantisation decision is what lets the decision be made once rather than reversed after the first deployment cycle.

The platform-count decision criterion

Situation Recommended approach Rationale
Single target platform Quantisation Platform-specific quantisation is well-documented, tooling is mature, quality validation is a single cycle
Two platforms with tolerance for minor quality divergence Quantisation per platform, with cross-platform validation Manageable if quality variation between platforms is acceptable to the use case
Three or more platforms Distillation to a shared portable model Quantisation per platform creates N independent validation cycles; quality divergence grows with N
Real-time quality consistency required across all targets Distillation Only distillation guarantees identical numerical behaviour across runtimes
Memory budget tight, accuracy threshold flexible Quantisation Quantisation achieves higher compression ratios than distillation for equivalent architecture
Memory budget adequate, quality threshold strict Distillation Distillation preserves quality more reliably across the precision boundary

In a text-to-speech inference optimisation project on edge we ran — deploying an audio synthesis model to iOS (CoreML), Android (ONNX Runtime), and browser targets — the three-platform requirement made quantisation impractical. Separate INT8 quantisation for CoreML and ONNX Runtime produced audible quality differences at certain phoneme transitions that were acceptable on one platform and not on the other. The resolution was distilling the full-size model to a smaller architecture that could be exported directly to both runtimes from a shared set of weights, producing consistent audio quality across all targets. The distilled model ran within latency targets on the lowest-specification test devices in the deployment cohort.

The ONNX deployment architecture consideration

For models targeting ONNX Runtime across multiple platforms, the deployment decision is separate from the compression decision. ONNX functions as a cross-platform model exchange format: a model exported to ONNX runs on any ONNX Runtime-compatible environment without modification. This makes ONNX a natural choice for multi-platform deployments where the runtime environments are heterogeneous.

The key distinction is between ONNX-as-file-format (converting a model once for compatibility) and ONNX-as-deployment-architecture (designing the model export, versioning, and validation pipeline around ONNX Runtime as the canonical runtime). The latter requires cross-platform GPU performance portability thinking applied to inference targets: the model should be validated against all target ONNX Runtime versions in the deployment pipeline, not just the development version.

When distillation is combined with ONNX export, the validation burden reduces significantly: a single distilled model is exported to ONNX once, validated once against the ONNX Runtime specification, and deployed to all target platforms. CoreML targets receive the model through CoreML Tools’ ONNX import path, maintaining a single model artefact throughout the pipeline.

The distillation training procedure

Distillation is more involved than a quantisation pass; the team needs an explicit training procedure rather than a one-shot conversion. The procedure outlined below is the structure we use; specific hyperparameters depend on the task and the teacher–student capacity gap.

1. Capacity targeting. Choose the student architecture before training, not during. The student’s parameter count should be sized against the deployment memory budget on the lowest-tier target device, with a safety margin (we typically target 60–70% of the available budget to leave headroom for activations and runtime overhead). Smaller students need more training compute to close the quality gap; the smallest viable student is rarely the fastest path to an acceptable model.

2. Loss formulation. The standard distillation loss is a weighted sum of two terms: a task loss against ground-truth labels (cross-entropy for classification, L1 or L2 for regression, a domain-specific loss for generative models) and a distillation loss against the teacher’s outputs. For classification, the distillation loss is typically the KL divergence between the teacher’s and student’s softmax distributions, with a temperature parameter T (commonly 2–5) that softens the distributions to expose the teacher’s relative confidence over non-target classes. For regression and generative models, an L1 or L2 distance between teacher and student outputs is the standard form. The weighting between the two losses is tuned per task; a starting point is 0.5 * task_loss + 0.5 * (T * T) * distillation_loss, with the T*T factor compensating for the temperature scaling of gradients.

3. Layer alignment (optional but high-value). When the student architecture is similar enough to the teacher to permit it, adding intermediate-layer matching losses — typically L2 distance between selected hidden states of teacher and student at corresponding depths — accelerates convergence and improves the final quality of the student. This is the approach used by FitNets and the wider family of feature-distillation methods. Layer alignment requires deciding which student layer corresponds to which teacher layer; in practice, evenly spaced selections (student layer k/K matches teacher layer k/K of teacher depth) are a robust default. Hugging Face Transformers’ distillation recipes for DistilBERT and similar models implement this pattern and can be adapted as a reference.

4. Training data. Distillation benefits from training data that is broader than the original task training set, because the teacher provides supervision on every input regardless of whether ground-truth labels exist. Unlabelled data from the target domain — product images from the actual deployment environment, audio clips from the target user population, telemetry from the target device cohort — is high-value distillation data even without labels. The teacher’s outputs serve as the supervision signal.

5. Validation protocol. Quality validation should be conducted at three points: against the teacher (does the student match the teacher within the defined quality tolerance?), against the original task ground truth (does the student perform the task acceptably?), and against the deployment runtime (does the student, after export to CoreML / ONNX Runtime, produce numerically equivalent results to the PyTorch reference?). The third check is the one most often skipped and most often responsible for deployment-time surprises.

6. Iteration cadence. A first-pass distilled model rarely meets the quality target. Plan for at least three iteration cycles: initial training, quality assessment against the validation suite, and refinement of either the student architecture, the loss weighting, or the training data composition. Distillation projects that allocate time for one cycle and assume success ship under-trained students.

The hidden cost of the wrong choice

For a two-platform deployment, quantisation per platform is a reasonable choice and the validation cost is manageable. The hidden cost appears when a third target is added — a new device category, a new operating system version, or a new runtime — and the team discovers that the quantisation work done for the first two platforms does not transfer.

The device-baseline audit that precedes this decision — establishing which runtimes the target devices support, what quantisation schemes each runtime implements, and what the latency budget is across the device cohort — is the step that makes the distillation-vs-quantisation choice tractable. Without it, the choice is made on the wrong information. For teams approaching this decision for the first time, a GPU and Inference Optimisation Assessment evaluates the compression strategy against the platform count and quality requirements before implementation begins.

GPU-Accelerating RF Signal Propagation Simulation: From Days to Hours

GPU-Accelerating RF Signal Propagation Simulation: From Days to Hours

28/04/2026

Naive GPU porting of sequential RF simulation delivers modest gains. Algorithmic redesign to expose parallelism turns multi-day runtimes into hours.

What Cross-Platform GPU Performance Portability Requires

What Cross-Platform GPU Performance Portability Requires

26/04/2026

Source-level portability is not performance portability. Competitive speed across GPU vendors needs architecture-aware abstraction and per-target tuning.

Cloud GPU vs On-Premise AI Accelerators: A Total Cost Analysis

Cloud GPU vs On-Premise AI Accelerators: A Total Cost Analysis

25/04/2026

Cloud GPU suits variable, short-term workloads. On-premise is cheaper for sustained utilisation above 60%. The break-even is calculable, not philosophical.

How to Optimise AI Inference Latency on GPU Infrastructure

How to Optimise AI Inference Latency on GPU Infrastructure

24/04/2026

Inference latency optimisation targets model compilation, batching, and memory management — not hardware speed. TensorRT and quantisation are key levers.

Algorithmic Restructuring vs Kernel Tuning: Choosing the Higher-Leverage GPU Optimisation

Algorithmic Restructuring vs Kernel Tuning: Choosing the Higher-Leverage GPU Optimisation

23/04/2026

Kernel tuning improves constant factors. Algorithmic restructuring changes complexity class. Identify your bottleneck type before committing effort.

How to Profile GPU Kernels to Find the Real Bottleneck

How to Profile GPU Kernels to Find the Real Bottleneck

22/04/2026

GPU profiling separates compute-bound from memory-bound kernels. Nsight Compute roofline analysis shows where a kernel sits and what would move it.

The Hidden Cost of GPU Underutilisation

The Hidden Cost of GPU Underutilisation

21/04/2026

Most GPU workloads use 30–50% of available compute. Without profiling, the waste is invisible. Bandwidth, occupancy, and serialisation are the root causes.

CUDA vs OpenCL vs SYCL: Choosing a GPU Compute API

CUDA vs OpenCL vs SYCL: Choosing a GPU Compute API

20/04/2026

CUDA delivers the deepest optimisation on NVIDIA hardware. OpenCL and SYCL offer portability. Choose based on lock-in tolerance and performance needs.

GPU Performance Per Dollar — Why Cost, Efficiency, and Value Are Not the Same Metric

GPU Performance Per Dollar — Why Cost, Efficiency, and Value Are Not the Same Metric

17/04/2026

Performance per dollar. Tokens per watt. Cost per request. These sound like the same thing said differently, but they measure genuinely different dimensions of AI infrastructure economics. Conflating them leads to infrastructure decisions that optimize for the wrong objective.

Precision Is an Economic Lever in Inference Systems

Precision Is an Economic Lever in Inference Systems

17/04/2026

Precision isn't just a numerical setting — it's an economic one. Choosing FP8 over BF16, or INT8 over FP16, changes throughput, latency, memory footprint, and power draw simultaneously. For inference at scale, these changes compound into significant cost differences.

Precision Choices Are Constrained by Hardware Architecture

Precision Choices Are Constrained by Hardware Architecture

17/04/2026

You can't run FP8 inference on hardware that doesn't have FP8 tensor cores. Precision format decisions are conditional on the accelerator's architecture — its tensor core generation, native format support, and the efficiency penalties for unsupported formats.

Steady-State Performance, Cost, and Capacity Planning

Steady-State Performance, Cost, and Capacity Planning

17/04/2026

Capacity planning built on peak performance numbers over-provisions or under-delivers. Real infrastructure sizing requires steady-state throughput — the predictable, sustained output the system actually delivers over hours and days, not the number it hit in the first five minutes.

Why Benchmarks Mislead AI Hardware Procurement — and How to Use Them Correctly

16/04/2026

A benchmark result starts with full context — workload, software stack, measurement conditions. By the time it reaches a procurement deck, all that context is gone. The failure mode is not wrong benchmarks but context loss during propagation.

Building an Audit Trail: Benchmarks as Evidence for Governance and Risk

16/04/2026

High-value AI hardware decisions need traceable evidence, not slide-deck bullet points. When benchmarks are documented with methodology, assumptions, and limitations, they become auditable institutional evidence — defensible under scrutiny and revisitable when conditions change.

The Comparability Protocol: Why Benchmark Methodology Defines What You Can Compare

16/04/2026

Two benchmark scores can only be compared if they share a declared methodology — the same workload, precision, measurement protocol, and reporting conditions. Without that contract, the comparison is arithmetic on numbers of unknown provenance.

How to Choose AI Hardware and GPU for AI Workloads: A Decision Framework

16/04/2026

Hardware selection is a multivariate decision under uncertainty — not a score comparison. This framework walks through the steps: defining the decision, matching evaluation to deployment, measuring what predicts production, preserving tradeoffs, and building a repeatable process.

How Benchmarks Shape Organizations Before Anyone Reads the Score

16/04/2026

Before a benchmark score informs a purchase, it has already shaped what gets optimized, what gets reported, and what the organization considers important. Benchmarks function as decision infrastructure — and that influence deserves more scrutiny than the number itself.

Accuracy Loss from Lower Precision Is Task‑Dependent

16/04/2026

Reduced precision does not produce a uniform accuracy penalty. Sensitivity depends on the task, the metric, and the evaluation setup — and accuracy impact cannot be assumed without measurement.

Precision Is a Design Parameter, Not a Quality Compromise

16/04/2026

Numerical precision is an explicit design parameter in AI systems, not a moral downgrade in quality. This article reframes precision as a representation choice with intentional trade-offs, not a concession made reluctantly.

Mixed Precision Works by Exploiting Numerical Tolerance

16/04/2026

Not every multiplication deserves 32 bits. Mixed precision works because neural network computations have uneven numerical sensitivity — some operations tolerate aggressive precision reduction, others don't — and the performance gains come from telling them apart.

Throughput vs Latency: Choosing the Wrong Optimization Target

16/04/2026

Throughput and latency are different objectives that often compete for the same resources. This article explains the trade-off, why batch size reshapes behavior, and why percentiles matter more than averages in latency-sensitive systems.

Quantization Is Controlled Approximation, Not Model Damage

16/04/2026

When someone says 'quantize the model,' the instinct is to hear 'degrade the model.' That framing is wrong. Quantization is controlled numerical approximation — a deliberate engineering trade-off with bounded, measurable error characteristics — not an act of destruction.

GPU Utilization Is Not Performance — Why Low GPU Utilization Often Means the Right Thing

15/04/2026

The utilization percentage in nvidia-smi reports kernel scheduling activity, not efficiency or throughput. This article explains the metric's exact definition, why it routinely misleads in both directions, and what to pair it with for accurate performance reads.

FP8, FP16, and BF16 Represent Different Operating Regimes

15/04/2026

FP8 is not just 'half of FP16.' Each numerical format encodes a different set of assumptions about range, precision, and risk tolerance. Choosing between them means choosing operating regimes — different trade-offs between throughput, numerical stability, and what the hardware can actually accelerate.

Peak Performance vs Steady‑State Performance in AI

15/04/2026

AI systems rarely operate at peak. This article defines the peak vs. steady-state distinction, explains when each regime applies, and shows why evaluations that capture only peak conditions mischaracterize real-world throughput.

The Software Stack Is a First‑Class Performance Component

15/04/2026

Drivers, runtimes, frameworks, and libraries define the execution path that determines GPU throughput. This article traces how each software layer introduces real performance ceilings and why version-level detail must be explicit in any credible comparison.

The Mythology of 100% GPU Utilization

15/04/2026

Is 100% GPU utilization bad? Will it damage the hardware? Should you be worried? For datacenter AI workloads, sustained high utilization is normal — and the anxiety around it usually reflects gaming-era intuitions that don't apply.

Why Benchmarks Fail to Match Real AI Workloads

15/04/2026

The word 'realistic' gets attached to benchmarks freely, but real AI workloads have properties that synthetic benchmarks structurally omit: variable request patterns, queuing dynamics, mixed operations, and workload shapes that change the hardware's operating regime.

Why Identical GPUs Often Perform Differently

15/04/2026

'Same GPU' does not imply the same performance. This article explains why system configuration, software versions, and execution context routinely outweigh nominal hardware identity.

Training and Inference Are Fundamentally Different Workloads

15/04/2026

A GPU that excels at training may disappoint at inference, and vice versa. Training and inference stress different system components, follow different scaling rules, and demand different optimization strategies. Treating them as interchangeable is a design error.

Performance Ownership Spans Hardware and Software Teams

15/04/2026

When an AI workload underperforms, attribution is the first casualty. Hardware blames software. Software blames hardware. The actual problem lives in the gap between them — and no single team owns that gap.

Performance Emerges from the Hardware × Software Stack

15/04/2026

AI performance is an emergent property of hardware, software, and workload operating together. This article explains why outcomes cannot be attributed to hardware alone and why the stack is the true unit of performance.

Power, Thermals, and the Hidden Governors of Performance

14/04/2026

Every GPU has a physical ceiling that sits below its theoretical peak. Power limits, thermal throttling, and transient boost clocks mean that the performance you read on the spec sheet is not the performance the hardware sustains. The physics always wins.

Why AI Performance Changes Over Time

14/04/2026

That impressive throughput number from the first five minutes of a training run? It probably won't hold. AI workload performance shifts over time due to warmup effects, thermal dynamics, scheduling changes, and memory pressure. Understanding why is the first step toward trustworthy measurement.

CUDA, Frameworks, and Ecosystem Lock-In

14/04/2026

Why is it so hard to switch away from CUDA? Because the lock-in isn't in the API — it's in the ecosystem. Libraries, tooling, community knowledge, and years of optimization create switching costs that no hardware swap alone can overcome.

GPUs Are Part of a Larger System

14/04/2026

CPU overhead, memory bandwidth, PCIe topology, and host-side scheduling routinely limit what a GPU can deliver — even when the accelerator itself has headroom. This article maps the non-GPU bottlenecks that determine real AI throughput.

Why AI Performance Must Be Measured Under Representative Workloads

14/04/2026

Spec sheets, leaderboards, and vendor numbers cannot substitute for empirical measurement under your own workload and stack. Defensible performance conclusions require representative execution — not estimates, not extrapolations.

Low GPU Utilization: Where the Real Bottlenecks Hide

14/04/2026

When GPU utilization drops below expectations, the cause usually isn't the GPU itself. This article traces common bottleneck patterns — host-side stalls, memory-bandwidth limits, pipeline bubbles — that create the illusion of idle hardware.

Why GPU Performance Is Not a Single Number — and What to Evaluate Instead of 'Best GPU for AI'

14/04/2026

AI GPU performance is multi-dimensional and workload-dependent. This article explains why scalar rankings collapse incompatible objectives and why 'best GPU' questions are structurally underspecified.

Are GPU Benchmarks Accurate? What They Actually Measure vs Real-World Performance

14/04/2026

A benchmark result is not a hardware measurement — it is an execution measurement. The GPU, the software stack, and the workload all contribute to the number. Reading it correctly requires knowing which parts of the system shaped the outcome.

Why Spec-Sheet Benchmarking Fails for AI — How GPU Benchmarks Actually Work

14/04/2026

GPU spec sheets describe theoretical limits. This article explains why real AI performance is an execution property shaped by workload, software, and sustained system behavior.

NVIDIA Data Centre GPUs: what they are and why they matter

19/03/2026

NVIDIA data centre GPUs explained: architecture differences, when to choose them over consumer GPUs, and how workload type determines the right GPU configuration in a data centre.

CUDA vs OpenCL: Which to Use for GPU Programming

16/03/2026

CUDA and OpenCL compared for GPU programming: programming models, memory management, tooling, ecosystem fit, portability trade-offs, and a practical decision framework.

Planning GPU Memory for Deep Learning Training

16/02/2026

GPU memory estimation for deep learning: calculating weight, activation, and gradient buffers so you can predict whether a training run fits before it crashes.

CUDA AI for the Era of AI Reasoning

11/02/2026

How CUDA underpins AI inference: kernel execution, memory hierarchy, and the software decisions that determine whether a model uses the GPU efficiently or wastes it.

Choosing Vulkan, OpenCL, SYCL or CUDA for GPU Compute

28/01/2026

A practical comparison of Vulkan, OpenCL, SYCL and CUDA, covering portability, performance, tooling, and how to pick the right path for GPU compute across different hardware vendors.

GPU vs TPU vs CPU: Performance and Efficiency Explained

10/01/2026

CPU, GPU, and TPU compared for AI workloads: architecture differences, energy trade-offs, practical pros and cons, and a decision framework for choosing the right accelerator.

GPU Computing for Faster Drug Discovery

7/01/2026

GPU computing in drug discovery: how parallel workloads accelerate molecular simulation, docking calculations, and deep learning models for compound property prediction.

Back See Blogs
arrow icon