How would you evaluate model compression for an autonomous-vehicle workload?

Instruction: Compare pruning, quantization and distillation, and explain how you would decide whether a compressed model meets the workload requirements on its target hardware.

Context: This question probes the candidate's ability to balance computational efficiency with the demands of high-performance, real-time systems in autonomous vehicles.

Updated

Example answer

Define the baseline model, target hardware, workload and acceptance criteria before selecting a compression method. Measure complete response time, peak memory and energy alongside task quality in relevant conditions; a smaller file is not enough.

Pruning removes selected parameters or structures. Unstructured zeros do not automatically produce runtime savings without suitable storage and kernels. Quantization reduces precision for supported weights or activations and needs representative calibration or training as appropriate. Distillation trains a student using teacher information, often with task labels; the student is not guaranteed to match the teacher or correct its errors.

Compare candidate artifacts with the same preprocessing, inputs and measurement boundary. Include conversion, memory transfers, unsupported operators and fallback kernels. Warm averages can hide startup cost, tail delays or thermal throttling.

Use independent task evaluation, including rare consequential conditions, calibration and downstream behavior. An acceptable aggregate score can conceal a severe regression in one slice. Retain the original model and version all artifacts so a rejected candidate does not silently replace it.

The decision is an evidenced tradeoff under explicit limits. No compression method guarantees unchanged accuracy, lower latency and lower energy on every platform.

Source: PyTorch quantization methods and tradeoffs.

Related Questions