Language Models
Roberta

RoBERTa is a transformers model pretrained on a large corpus of English data in a self-supervised fashion. It was trained on English language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository. This model is case-sensitive: it makes a difference between english and English. We currently have the following Roberta models available below however if you would like any others contact support, and we can quickly add it for you. In order to deploy it you can use the identifier below:

  • Roberta Large: roberta-large

Once you’ve deployed a Roberta model, you can supply the endpoint with a prompt. Here’s an example of how to call the deployed endpoint:

Request Parameters

  curl --location --request POST 'https://run.cerebrium.ai/roberta-large-webhook/predict' \
      --header 'Authorization: <API_KEY>' \
      --header 'Content-Type: application/json' \
      --data-raw '{
        "prompt": "<mask> is the capital of France"
    }'
Authorizationrequired
string

This is the Cerebrium API key used to authenticate your request. You can get it from your Cerebrium dashboard.

promptrequired
string

The prompt you would like Roberta to process. Please make sure that you include the <mask> keyword.

  "run_id": "<UUID_STRING>",
  "run_time_ms": 251,
  "message": "Successfully generated text",
  "result": [{'sequence': "<s>Paris</s>",
    'score': 0.3317350447177887,
    'token': 2943,
    'token_str': 'Paris'},
  {'sequence': "<s>Nice</s>",
    'score': 0.14171843230724335,
    'token': 2734,
    'token_str': 'Nice'},
    ...
  ]`

Response Parameters

run_idrequired
string

A unique identifier for the run that you can use to associate prompts with webhook endpoints.

run_time_msrequired
string

The amount of time in millisecond it took to run your function. This is what you will be billed for.

messagerequired
string

Whether of not the response was successful

resultrequired
string

The result generated from Roberta