Use PL/SQL Packages to Import Models

Use the DBMS_DATA_MINING.IMPORT_ONNX_MODEL procedure or the DBMS_VECTOR.LOAD_ONNX_MODEL procedure to import ONNX format models. You can then use the imported ONNX format models through a scoring function run by the in-database ONNX Runtime.

Note:

In-database embedding models must include tokenization and postprocessing. Providing only the core ONNX model is insufficient, as users would need to handle tokenization externally, pass tensors into the SQL operator, and convert output tensors into vectors.

The DBMS_DATA_MINING.RENAME_MODEL procedure is also supported.

Most of the existing Oracle Machine Learning for SQL APIs are available to the ONNX models. As partitioning is not applicable for external pretrained models, ONNX models do not support the following procedures:

  • ADD_PARTITION
  • DROP_PARTITION
  • ADD_COST_MATRIX
  • REMOVE_COST_MATRIX