Use Models

TIP

An inference is a prediction to a question or task. In the concept of Machine Learning (ML) and Artificial Intelligence (AI), the term inference is often compared with training. To put it simple, inference is where capabilities learnt during training are put to analyze data to "infer" a result. Inference can be found and are applied everywhere across industries from photo tagging to autonomous driving.

Instill Model provides an automated model inference server.

#Inference with Dedicated Model API Endpoint

After importing a model from a supported source, such as GitHub or Hugging Face, and deploying it online, it dynamically generates a dedicated API endpoint for model inference /users/<user-id>/models/<model-id>/trigger.

You can send multiple images of popular formats (PNG and JPEG) in one request to the generated model API endpoint. Check the examples below. The API accepts batched images

  • sent by remote URL and Base64 or
  • uploaded by multipart.
cURL(url)
cURL(base64)
cURL(multipart)
Copy

curl -X POST http://localhost:8080/v1alpha/users/<user-id>/models/<model-id>/trigger \
--header 'Authorization: Bearer instill_sk_***' \
--data '{
"task_inputs": [
{
"classification": {
"image_url": "https://artifacts.instill.tech/imgs/dog.jpg"
}
},
{
"classification": {
"image_url": "https://artifacts.instill.tech/imgs/bear.jpg"
}
}
]
}'

in which <user-id> and <model-id> corresponds to the namespace and ID of a model.

#Using Models in VDP

To build VDP pipelines for your AI workflows with models served on Instill Model platform, you can utilize the Instill Model AI Connector.

Last updated: 4/30/2024, 7:31:30 AM