Get logits from Inference API Classification Model (for Regression)
I have aRobertaForSequenceClassificationmodel 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!
2022-09-23T04:05:30Z
I was able to solve this by adding the following to theREADME.md:---
inference:
  parameters:
    function_to_apply: "none"
---Some relevant sources:how-can-i-control-my-models-widget-inference-api-parametersReturn raw outputs in TextClassificationPipeline
2024-01-24T09:46:16Z
Hi@pfrI 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