A scientifically disciplined project: state a hypothesis (such as “quantization loses no more than 1% accuracy”), design the experiment, measure on a held-out test set with repetitions, and report uncertainty.
Classify images and detect objects with real ONNX models in your browser, try quantization and pruning, and compare edge with cloud.
Quantization benchmark study
A small research project measuring the effect of float32, fp16 and int8 on size, latency and accuracy of a classifier.
Educational draft content that needs expert review before it is used as an academic reference. Specifications, versions and licences change; check the official source. No experimental result is shown here unless it was actually run.
Hardware
- A computer or Raspberry Pi
Software
- ONNX Runtime
- Python
Architecture
float32 model → convert to fp16 and int8 (calibration) → evaluate accuracy on a test set → measure latency with warm-up and repetition → table and statistical analysis.
Suggested datasets (check their licences)
- CIFAR-10 or an ImageNet subset (check the licence)
Implementation steps
- State the hypothesis and acceptance criteria in advance
- Prepare a calibration set separate from the test set
- Run the conversions
- Measure accuracy with a confidence interval (bootstrap)
- Measure latency: warm-up then 100 runs, median and p95
- Write the report including the study limits
Expected deliverables
A short report with tables, charts and a reproducible code file.
Evaluation metrics
- Accuracy with a confidence interval
- File size
- Latency (median and p95)
Limits
- Results apply to your device and model
- Operator behaviour may differ between engines
Ideas to extend
- Add pruning
- Compare per-channel and per-layer quantization
- Another model or another task
Related technologies
Image and audio processing in the experiments runs inside your browser. Your images and audio are never uploaded and conversations are not stored. Privacy
