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.

Edge AI Applications: Deployment Tradeoffs for Autonomous Systems and Industrial Use Cases

Edge AI Applications: Deployment Tradeoffs for Autonomous Systems and Industrial Use Cases

7/05/2026

Edge AI applications in autonomous vehicles, industrial inspection, and smart cameras — deployment tradeoffs for model size, latency, and connectivity.

NVIDIA vs AMD GPU Performance: Why Software Stack Matters More Than Spec Sheets

NVIDIA vs AMD GPU Performance: Why Software Stack Matters More Than Spec Sheets

7/05/2026

NVIDIA's AI lead is primarily a software ecosystem advantage. Why hardware specs alone can't predict GPU performance when comparing NVIDIA and AMD.

Data Center GPU for AI Workloads: Own vs Rent, TCO, and NVLink Architecture

Data Center GPU for AI Workloads: Own vs Rent, TCO, and NVLink Architecture

7/05/2026

Data center GPUs vs cloud GPU rentals for AI workloads: TCO analysis, NVLink multi-GPU, and when owning hardware beats renting it.

How to Benchmark Your PC for AI: A Methodology That Goes Beyond Single Scores

How to Benchmark Your PC for AI: A Methodology That Goes Beyond Single Scores

7/05/2026

The three dimensions of meaningful AI benchmarking and why leaderboard numbers don't predict your performance. A practical AI benchmarking methodology.

CUDA vs OpenCL Performance Comparison: Portability, Optimization, and When to Choose Each

CUDA vs OpenCL Performance Comparison: Portability, Optimization, and When to Choose Each

7/05/2026

CUDA vs OpenCL: performance tradeoffs, portability constraints, and a practical decision framework for GPU compute API selection.

AI TOPS and GPU Utilization: When TOPS Is the Wrong Metric for Your Workload

AI TOPS and GPU Utilization: When TOPS Is the Wrong Metric for Your Workload

7/05/2026

TOPS and GPU utilization both mislead AI capacity planning. When to measure compute vs memory bandwidth vs throughput, and how to pick the right metric.

AI Benchmark Testing: What Makes a Benchmark Meaningful

AI Benchmark Testing: What Makes a Benchmark Meaningful

7/05/2026

A meaningful AI benchmark tests what your workload actually does. The gap between standardized tests and production performance, and how to close it.

AMD vs NVIDIA for AI Inference: When the Cost-Per-Inference Calculus Shifts

AMD vs NVIDIA for AI Inference: When the Cost-Per-Inference Calculus Shifts

6/05/2026

When AMD beats NVIDIA on inference cost-per-dollar and when NVIDIA's TensorRT advantage reverses the equation.

CUDA Kernel Explained: Thread Hierarchy, Execution, and When to Write Your Own

CUDA Kernel Explained: Thread Hierarchy, Execution, and When to Write Your Own

6/05/2026

What a CUDA kernel is, how threads and blocks map to GPU hardware, and when custom kernels beat library calls.

GPU Stress Testing for AI: What Sustained Load Reveals That Benchmarks Hide

GPU Stress Testing for AI: What Sustained Load Reveals That Benchmarks Hide

6/05/2026

GPUs scoring identically on short benchmarks can differ by 15-30% under sustained load. How stress testing exposes the limits that benchmarks miss.

CUDA GPU Architecture and Programming: What Makes a GPU CUDA-Capable

CUDA GPU Architecture and Programming: What Makes a GPU CUDA-Capable

6/05/2026

What makes a GPU CUDA-capable, how CUDA compute capability tiers work, and what the architecture enables for parallel compute workloads.

GPU Benchmark Software for AI: What Each Tool Measures and What It Misses

GPU Benchmark Software for AI: What Each Tool Measures and What It Misses

6/05/2026

Consumer benchmarks measure the wrong thing for AI. AI benchmarks test the wrong workloads. What each GPU benchmark tool measures and what to use instead.

How to Check TensorFlow GPU Detection and Diagnose Common Failures

6/05/2026

How to verify TensorFlow GPU detection with tf.config.list_physical_devices, diagnose CUDA version mismatches, driver issues, and common failure modes.

Benchmark Testing: What It Measures, What It Misses, and How to Do It Right for AI

6/05/2026

Benchmark scores and real AI performance differ by 20-50%. How to test in a way that predicts actual workload behaviour rather than lab conditions.

AMD vs Intel for AI: Why Spec-Sheet Comparisons Mislead and What to Measure Instead

6/05/2026

AMD vs Intel CPU performance for AI workloads varies by up to 3x depending on model architecture and software stack. No single 'better' answer exists.

AI Inference Infrastructure: Best Practices That Go Beyond Vendor Benchmark Claims

5/05/2026

Inference infrastructure decisions should be driven by measured performance under your actual workload — vendor benchmarks rarely match production conditions.

Tensor Parallelism vs Pipeline Parallelism: Choosing the Right Strategy for Your GPU Cluster

5/05/2026

Tensor parallelism splits operations across GPUs (low latency, high bandwidth need). Pipeline parallelism splits layers (tolerates lower bandwidth, adds bubble overhead).

Choosing Efficient AI Inference Infrastructure: What to Measure Beyond Raw GPU Speed

5/05/2026

Inference efficiency is performance-per-watt and cost-per-inference, not raw FLOPS. Batch size, precision, and memory bandwidth determine throughput.

CUDA Cores vs Tensor Cores: What Actually Determines AI Performance

5/05/2026

AI inference throughput depends primarily on tensor core utilisation, not CUDA core count. Tensor core generation determines supported precision formats.

CUDA Compute Capability Explained: What the Version Number Means for AI Workloads

5/05/2026

CUDA compute capability determines which tensor core operations and precision formats a GPU supports — not just whether CUDA runs.

How to Improve GPU Performance: A Profiling-First Approach to Compute Optimization

5/05/2026

Profiling must precede GPU optimisation. Memory bandwidth fixes typically deliver 2–5× more impact than compute-bound fixes for AI workloads.

BF16 vs FP16: When Dynamic Range Beats Precision and Vice Versa

5/05/2026

BF16 trades mantissa precision for dynamic range. The choice depends on whether your workload is gradient-dominated or activation-precision-dominated.

GPU Parallel Computing Explained: How Thousands of Cores Solve Problems Differently

5/05/2026

GPU parallelism exploits thousands of simple cores for data-parallel workloads. The execution model differs fundamentally from CPU thread-level parallelism.

AI TOPS Explained: Why This Popular Spec Tells You Almost Nothing About Real Performance

4/05/2026

TOPS measures theoretical throughput at one precision. It ignores memory bandwidth, software overhead, and workload fit — making it a poor performance predictor.

A100 GPU Rental Options: What Availability and Pricing Look Like in 2026

4/05/2026

A100 rental pricing varies 2–5× between providers depending on commitment length, region, and availability. Here is what the market looks like.

Agent Framework Selection for Edge-Constrained Inference Targets

2/05/2026

Selecting an agent framework for partial on-device inference: four axes that decide whether a desktop-class framework survives the edge-target boundary.

Cross-Platform TTS Inference Under Real-Time Constraints: ONNX and CoreML

1/05/2026

Cross-platform TTS to iOS, Android and browser stays consistent only if compression is decided at training time — distill once, export to ONNX.

Why Client-Side ML Projects Miss Latency Targets Before Deployment

29/04/2026

Client-side ML misses latency targets when the device capability baseline is set after architecture selection rather than before. Sequence matters.

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

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

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

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

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

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

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

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

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

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

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

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.

Back See Blogs
arrow icon