Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Usage]: 怎么得到每一个输出token的logits,而不是softmax之后的logprob? #10688

Closed
1 task done
TonyUSTC opened this issue Nov 27, 2024 · 3 comments
Closed
1 task done
Labels
usage How to use vllm

Comments

@TonyUSTC
Copy link

Your current environment

我需要softmax之前的logits,但是目前vllm好像返回不了logits,huggingface transformer是可以的。请问vllm怎么实现呢?

How would you like to use vllm

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
@TonyUSTC TonyUSTC added the usage How to use vllm label Nov 27, 2024
@TonyUSTC
Copy link
Author

我修改了下model_executor/layers/sampler.py,在Sample the next tokens之后,重置logprobs = logits。不够优雅,但是推理结果可以返回logits了
image

@youkaichao
Copy link
Member

cc @DarkLight1337 can you give a usage example and then close the issue?

@DarkLight1337
Copy link
Member

Please refer to the more detailed discussion in #11397.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage How to use vllm
Projects
None yet
Development

No branches or pull requests

3 participants