ONNX (Open Neural Network Exchange)
An open format for representing machine learning models, enabling interoperability between different AI frameworks and deployment platforms.
Why It Exists
Models trained in PyTorch can't directly run on TensorFlow-based infrastructure (and vice versa). ONNX provides a common format that any framework can export to and any runtime can execute.
How It Works
Export a trained model to ONNX format (a computation graph). The ONNX Runtime then executes the model with optimized kernels for different hardware (CPU, GPU, mobile devices). This often improves inference speed by 2-3x.
Use Cases
Deploying PyTorch models in production environments, running models on edge devices, converting between frameworks, and leveraging hardware-specific optimizations without rewriting model code.