§ ONNX Runtime for Engineers
9 lessons · every lesson has a Colab notebook

Deployment checklist

Nine lessons on running trained models with ONNX Runtime. Each lesson links to a Colab notebook for hands-on practice. The core exercises use a CPU; GPU work is optional.

Before you begin

You should be comfortable with Python functions and arrays. Inference means using a trained model to calculate an answer. A graph describes the operations used in that calculation. An operator is one kind of operation, such as addition or matrix multiplication.

Read the plain-language introduction, try its question, then open the notebook. Keep your measured results separate from the illustrative simulations on this page.

Technical references: ONNX Runtime Python API and quantization guidance.

Where It Earns Its Place

Introduction

The best deployment tool depends on the constraint, not on one universal ranking. Portable inference and CPU integer models often suit ONNX Runtime, while large NVIDIA language models or training may need other systems.

Learning goal

Choose when ONNX Runtime fits a deployment and identify cases where another tool is more appropriate.

Before you start

The earlier runtime lessons and a deployment target with known hardware and model requirements.

Lesson plan

  1. Match portability, hardware, model type, and optimization needs to runtime strengths.
  2. Recognize training and specialized large-language-model cases that favor other tools.
  3. Use the notebook set and checklist to plan a measured deployment experiment.
ScenarioWhat to reach for
One artifact across CPU, GPU, mobile, browserONNX Runtime — this is the whole point
C++ / C# / Java service with no Python in productionONNX Runtime
Edge or NPU deployment (QNN, CoreML, OpenVINO)ONNX Runtime — the EP abstraction earns its keep
Small-to-mid models on CPUONNX Runtime + dynamic INT8
LLM serving on NVIDIA at scalevLLM / TensorRT-LLM beat it for throughput; ORT GenAI is the ORT-stack alternative
Max perf, single GPU SKU, static shapesBare TensorRT may win slightly; the ORT TensorRT EP is close with far less work
TrainingPyTorch / JAX. ORT Training exists but is not the main story
The two sentences to remember

The runtime is the deployment contract — version-pin it and verify the artifact.
Every performance claim is a measurement, not a folklore rule — profile, dump the optimized graph, and check which provider actually ran your nodes.

The full notebook set

  1. What ONNX Runtime Actually Is — hand-built graph, session lifecycle
  2. The ONNX Format Up Close — protobuf, shape inference, IR/opset skew
  3. Exporting from PyTorch — dynamic axes, verification
  4. Graph Optimizations — levels, fusion, constant folding
  5. Execution Providers — selection, fallback, proof via profiler
  6. Sessions, IOBinding and Memory — threads, arenas, zero-copy
  7. Quantization — dynamic vs static QDQ, measured
  8. Dynamic Shapes and ORT Format — shape inference, TRT profiles, .ort
  9. Profiling and Debugging — traces, severity, error field guide