ONNX: cross-runtime portability
ONNX Runtime runs the same exported model on Windows, Linux, macOS, mobile, web (via WebAssembly). For deploy targets where you can't bring PyTorch, ONNX is usually the right pick. The optimum.onnxruntime wrappers do the conversion in one method call.
MLX: Apple Silicon native
MLX is Apple's native ML framework: unified memory, Metal kernels, lazy evaluation. mlx-lm wraps Llama-style architectures and runs HF checkpoints natively on Apple Silicon. Throughput often beats PyTorch + MPS by 2-3x at the same memory budget.
The decision
If your deployment surface includes mobile / browser / non-PyTorch servers → ONNX. If you're shipping for Apple Silicon (M-series Macs, iPad/iPhone) → MLX. Both can sit alongside the original PyTorch checkpoint in a single Hub repo.