You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to get prompt logprobs with chat api by doing a command like this:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "mistralai/Mixtral-8x7B-Instruct-v0.1",
"messages": [
{"role": "user", "content": "Who won the world series in 2020?"},
{"role": "assistant", "content": "The chicago bulls did! Dennis Rodman was named MVP."}
],
"echo": true,
"prompt_logprobs": true,
"top_logprobs": 1,
"max_tokens": 5
}'
(Blatantly wrong answer is on purpose)
However, I do not get any logprobs in the response:
{"id":"cmpl-74746f2daa8542fa92383a0d2f180e2a","object":"chat.completion","created":823018,"model":"mistralai/Mixtral-8x7B-Instruct-v0.1","choices":[{"index":0,"message":{"role":"assistant","content":"The chicago bulls did! Dennis Rodman was named MVP.\n\nOh, wait"},"logprobs":null,"finish_reason":"length"}],"usage":{"prompt_tokens":37,"total_tokens":42,"completion_tokens":5}}%
Sorry I don't think I'm able to get a correct response with this code. The output I got is {"object":"error","message":"[{'type': 'extra_forbidden', 'loc': ('body', 'prompt_logprobs'), 'msg': 'Extra inputs are not permitted', 'input': True}]","type":"BadRequestError","param":null,"code":400}
Is prompt_logprobs supported in ChatCompletion or not?
Sorry I misread the OP. It's technically not a bug since prompt_logprobs is not supported by OpenAI API. Perhaps you can open a feature request (or convert your existing issue into one)?
Your current environment
🐛 Describe the bug
According to the documentation here:
https://github.com/vllm-project/vllm/blob/8f44facdddcf3c704f7d6a2719b6e85efc393449/vllm/entrypoints/openai/protocol.py#L97C1-L98C1
It should be possible to get prompt logprobs with chat api by doing a command like this:
(Blatantly wrong answer is on purpose)
However, I do not get any logprobs in the response:
How come?
According to this commit:
70f3e8e
It should be in v0.3.3, which is what we are using.
The text was updated successfully, but these errors were encountered: