When TensorRT does not support a model or hardware setup cleanly, ONNX Runtime offers a practical alternative for optimizing and running ONNX models. ONNX is the standardized interchange format; ONNX Runtime is the inference engine. section 6.1.1
Use ONNX Runtime when deployment requires:
- Porting models trained with TensorFlow, PyTorch, Keras, or MXNet into a standardized representation. section 6.1.1
- Running inference across CPUs, GPUs, and specialized accelerators rather than targeting one hardware vendor. section 6.1.1
- Avoiding extensive reengineering when moving models between tools, platforms, and environments. section 6.1.1
Export and optimize with Optimum
Hugging Face Optimum can export a model to ONNX and apply optimization: `optimum-cli export onnx --model WizardLM/WizardCoder-1B-V1.0 ./models_onnx --optimize O1`. The resulting ONNX model can then be optimized and executed with ONNX Runtime. section 6.1.1


