Handler file for choosing the correct version of ONNX Runtime, based on the environment:
ONNX
Handler file for choosing the correct version of ONNX Runtime, based on the environment:
- When running in node, we use
onnxruntime-node(onnxruntime-webis not bundled). - When running in the browser, we use
onnxruntime-web(onnxruntime-nodeis not bundled).
This module is not directly exported, but can be accessed through the environment variables:
import { env } from '@huggingface/transformers';
console.log(env.backends.onnx);
Type Definitions
ONNXExecutionProviders
Type: InferenceSession.ExecutionProviderConfig
Source and license
Source: Transformers.js documentation, adapted for this site. Licensing and attribution follow the terms of the upstream project.