Get logits from Inference API Classification Model (for Regression)

I have a RobertaForSequenceClassification model fine-tuned for a regression task on the model hub. The inference api currently outputs the sigmoid of the model outputs, as for classification tasks. However, the model is trained for regression, so I actually need the logits themselves.

Is there any way I can configure the inference api to output the logits?

Thank you!

I was able to solve this by adding the following to the README.md:

---
inference:
  parameters:
    function_to_apply: "none"
---

Some relevant sources:

Hi @pfr

I also want to do inference with a regression model I fine-tuned. Could you please show me how to extract the probability from the logits?

Thanks