How do I get logits from an Inference API Wav2Vec2 model?
I’m trying to use a finetuned Wav2Vec2 model that I uploaded to hugging face through Inference API / Inference Endpoints, but it seems to be using Pipeline to call the model, meaning it will only return the final prediction of the model, not the logits from the model. Is there any way to make Inference API return the logits and not the final prediction?I saw in a previous post that you can addinference:
   parameters:
     function_to_apply: noneto the README.md to make it not apply a function to the logits to return the prediction, but that didn’t do anything
2024-08-06T19:57:47Z
I was able to changefunction_to_applytononefor my ImageClassification endpoint calls by passing it in as a parameter:parameters = {
    "function_to_apply": "none",
    "top_k": None
}

response = requests.post(API_URL, headers=headers, params=parameters, data=img_byte_arr)