ONNX Support

Support for ONNX-Format Models as First-Class Database Objects

The Open Neural Network Exchange (ONNX) is an open format to represent machine learning models. It faciliates the exchange of models between systems and is supported by an ONNX runtime environment that enables using models for scoring/inference. 

You can import ONNX-format models to Oracle AI Database for the machine learning techniques classification, regression, clustering, and embeddings.

The models will be imported as first-class MINING MODEL objects in your schema. Inference can be done using the family of OML scoring operators, including PREDICTION, CLUSTER, and VECTOR_EMBEDDING.

You can import and use third-party ML models, possibly built in other environments or from other sources, to leverage the database as an ML scoring platform. 

Users can invoke these models from SQL queries using the same scoring operators as native in-database models. 

While ONNX format models can already be imported to OML Services on Oracle Autonomous AI Database Serverless, you can now use ONNX-format models from Oracle AI Database. 

View Documentation

Enable Larger ONNX-Format Models

This feature enables importing Open Neural Network Exchange (ONNX) format models larger than 1 GB for use with the in-database ONNX Runtime. Models include transformers (embedding models) that take text and images as input and produce vectors. This is enabled using "external initializers," which allow referencing model weights (constants) separate from the ONNX graph representation. OML4Py facilitates converting models from Hugging Face or from a local directory, which may contain fine-tuned models.

The ability to use larger models can offer greater accuracy and capture subtle relationships between concepts. It also allows users to leverage a broader set of readily available models and fine-tuned models. External initializers will also enable sharing initializers across database processes for greater memory efficiency. OML4Py automates and simplifies the production of ONNX-format models with external initializers.

View Documentation

Support for Image Transformer Models with AI Vector Search Using the In-Database ONNX Runtime

This feature enables importing and using image transformer models with the in-database ONNX Runtime engine available in Oracle AI Database 26ai. Image transformer models must be in ONNX format and include the required image decoding and preprocessing as part of the ONNX pipeline.

The in-database ONNX Runtime engine with imported transformers enables you to vectorize text and image data directly in the database, eliminating the need to provision, configure, and maintain a separate environment to generate embeddings. Further, it eliminates the need to move data from the database to a separate environment and return vectors to the database. This enhancement expands the set of use cases that you can develop using Oracle AI Database to include image data. This feature is integrated for use with Oracle AI Vector Search for semantic similarity search. 

View Documentation