CPUExecutionProvider selects CPU-backed execution for an ONNX Runtime model when downloading or running it through Optimum. section 7.2.1
It appears in a CPU benchmarking workflow that compares PyTorch, ONNX conversion, and quantized ONNX versions on the same prompt and metrics. section 7.2.1
Typical use here centers on exporting and benchmarking a causal language model on CPU:
- Pass provider="CPUExecutionProvider" when creating an ORT model from pretrained weights. section 7.2.1
- Save the converted model, quantize it dynamically, and compare latency and throughput against the vanilla model. section 7.2.1
- Swap the pipeline model and provider tags to reuse the same inference benchmark code. section 7.2.1
CPU provider in model export
ORTModelForCausalLM.from_pretrained(model_id, export=True, provider="CPUExecutionProvider") loads the model for ONNX export on CPU before saving and quantization. section 7.2.1
