Supported Tasks

Supported Transformers & Diffusers Tasks

Inference Endpoints offers out-of-the-box support for Machine Learning tasks from the Transformers, Sentence-Transformers and Diffusers libraries. Below is a table of BOINC AI managed supported tasks for Inference Endpoint. These tasks don’t require any form of code or “custom container” to deploy an Endpoint. If you want to customize any of the tasks below, or want to write your own custom task, check out the “Create your own inference handler” section for more information.

Task
Framework
Out of the box Support

Text To Image

Diffusers

âś…

Text Classification

Transformers

âś…

Zero Shot Classification

Transformers

âś…

Token Classifiation

Transformers

âś…

Question Answering

Transformers

âś…

Fill Mask

Transformers

âś…

Summarization

Transformers

âś…

Translation

Transformers

âś…

Text to Text Generation

Transformers

âś…

Text Generation

Transformers

âś…

Feature Extraction

Transformers

âś…

Sentence Embeddings

Sentence Transformers

âś…

Sentence similarity

Sentence Transformers

âś…

Ranking

Sentence Transformers

âś…

Image Classification

Transformers

âś…

Automatic Speech Recognition

Transformers

âś…

Audio Classification

Transformers

âś…

Object Detection

Transformers

âś…

Image Segmentation

Transformers

âś…

Table Question Answering

Transformers

âś…

Conversational

Transformers

âś…

Custom

Custom

âś…

Visual Question Answering

Transformers

❌

Zero Shot Image Classification

Transformers

❌

Example Request payloads

See the following request examples for some of the tasks:

Custom Handler

Copied

{
  "inputs": "This is a sample input",
  "moreData": 1,
  "customTask": true
}

Text Classification

Copied

{
  "inputs": "This sound track was beautiful! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Zero Shot Classification

Copied

{
  "inputs": "Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!",
  "parameters": {
    "candidate_labels": ["refund", "legal", "faq"]
  }
}

Token Classifiation

Copied

{
  "inputs": "This sound track was beautiful! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Question Answering

Copied

{
  "inputs": {
    "question": "What is used for inference?",
    "context": "My Name is Philipp and I live in Nuremberg. This model is used with sagemaker for inference."
  }
}

Fill Mask

Copied

{
  "inputs": "This sound track was <mask>! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Summarization

Copied

{
  "inputs": "This sound track was beautiful! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Translation

Copied

{
  "inputs": "This sound track was beautiful! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Text to Text Generation

Copied

{
  "inputs": "This sound track was beautiful! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Text Generation

Copied

{
  "inputs": "This sound track was beautiful! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Feature Extraction

Copied

{
  "inputs": "This sound track was beautiful! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Sentence Embeddings

Copied

{
  "inputs": "This sound track was beautiful! It paints the senery in your mind so well I would recomend it
  even to people who hate vid. game music!"
}

Sentence similarity

Copied

{
  "inputs": ["This sound track was beautiful!", "It paints the senery in your mind so well"]
}

Ranking

Copied

{
  "inputs": ["This sound track was beautiful!", "It paints the senery in your mind so well"]
}

Image Classification

Image Classification can receive json payloads or binary data from a image directly.

JSON

Copied

{
  "inputs": "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgI"
}

Binary

Copied

curl --request POST \
  --url https://{ENDPOINT}/ \
  --header 'Content-Type: image/jpg' \
  --header 'Authorization: Bearer {BA_TOKEN}' \
  --data-binary '@test.jpg'

Automatic Speech Recognition

Automatic Speech Recognition can receive json payloads or binary data from a audio directly.

JSON

Copied

{
  "inputs": "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgI"
}

Binary

Copied

curl --request POST \
  --url https://{ENDPOINT}/ \
  --header 'Content-Type: audio/x-flac' \
  --header 'Authorization: Bearer {BA_TOKEN}' \
  --data-binary '@sample.flac'

Audio Classification

Audio Classification can receive json payloads or binary data from a audio directly.

JSON

Copied

{
  "inputs": "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgI"
}

Binary

Copied

curl --request POST \
  --url https://{ENDPOINT}/ \
  --header 'Content-Type: audio/x-flac' \
  --header 'Authorization: Bearer {BA_TOKEN}' \
  --data-binary '@sample.flac'

Object Detection

Object Detection can receive json payloads or binary data from a image directly.

JSON

Copied

{
  "inputs": "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgI"
}

Binary

Copied

curl --request POST \
  --url https://{ENDPOINT}/ \
  --header 'Content-Type: image/jpg' \
  --header 'Authorization: Bearer {BA_TOKEN}' \
  --data-binary '@test.jpg'

Image Segmentation

Image Segmentation can receive json payloads or binary data from a image directly.

JSON

Copied

{
  "inputs": "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgI"
}

Binary

Copied

curl --request POST \
  --url https://{ENDPOINT}/ \
  --header 'Content-Type: image/jpg' \
  --header 'Authorization: Bearer {BA_TOKEN}' \
  --data-binary '@test.jpg'

Table Question Answering

Copied

{
  "inputs": {
    "query": "How many stars does the transformers repository have?",
    "table": {
      "Repository": ["Transformers", "Datasets", "Tokenizers"],
      "Stars": ["36542", "4512", "3934"],
      "Contributors": ["651", "77", "34"],
      "Programming language": ["Python", "Python", "Rust, Python and NodeJS"]
    }
  }
}

Conversational

Copied

{        
  "inputs": {
    "past_user_inputs": ["Which movie is the best ?"],
    "generated_responses": ["It's Die Hard for sure."],
    "text": "Can you explain why?",
  }
}

Text To Image

Copied

{        
  "inputs": "realistic render portrait realistic render portrait of group of flying blue whales towards the moon, intricate, toy, sci - fi, extremely detailed, digital painting, sculpted in zbrush, artstation, concept art, smooth, sharp focus, illustration, chiaroscuro lighting, golden ratio, incredible art by artgerm and greg rutkowski and alphonse mucha and simon stalenhag",
}

Additional parameters

You can add additional parameters, which are supported by the pipelines api from transformers.

For Example if you have a text-generation pipeline you can provide generation_kwargs for repetition_penalty or max_length

Copied

{
  "inputs": "BOINC AI, the winner of VentureBeat’s Innovation in Natural Language Process/Understanding Award for 2021, is looking to level the playing field. The team, launched by Clément Delangue and Julien Chaumond in 2016, was recognized for its work in democratizing NLP, the global market value for which is expected to hit $35.1 billion by 2026. This week, Google’s former head of Ethical AI Margaret Mitchell joined the team.",
  "parameters": {
    "repetition_penalty": 4.0,
    "max_length": 128
  }
}

Last updated