OCI Search with OpenSearch provides built in support for
OpenSearch pretrained models.
This topic describes how to register and deploy any of the pretrained hugging sentence
transformer models to a cluster by only specifying the model name. See Pretrained Models for the list of approved models. For an
end-to-end procedure on how to use an OpenSearch pretrained model for semantic search in OCI Search with OpenSearch, see Semantic Search Walkthrough.
Prerequisites
Before you start, you need to do the following:
Select one of the pretrained
models supported by OCI Search with OpenSearch
Confirm that the OpenSearch cluster is version 2.11 or newer.
Update the cluster settings to perform semantic search. The following example includes the
recommended settings:
Model groups enable you to manage access to specific
models. Registering a model group is optional, however if you don't register a model group,
ML Commons creates registers a new model group for you, so we recommend that you register
the model group.
Register a model group using the register operation in the Model Group APIs, as shown in the following
example:
POST /_plugins/_ml/model_groups/_register
{
"name": "new_model_group",
"description": "A model group for local models"
}
Make note of the model_group_id returned in the response:
Make note of the model_id value returned in the response to use when you
deploy the model.
Step 3: Deploy the Model 🔗
After the register operation is completed for the model, you can deploy the model to the
cluster using the deploy operation of the Model APIs, passing the
model_id from the Get operation response in the previous step, as shown
in the following example:
POST /_plugins/_ml/models/cleMb4kBJ1eYAeTMFFg4/_deploy
Make note of the task_id returned in the response, you can use the
task_id to check the status of the operation.