DeepSpeed-MII icon indicating copy to clipboard operation
DeepSpeed-MII copied to clipboard

How to get the logit tensor of generated text?

Open randomx207 opened this issue 2 years ago • 6 comments

Hi, thank you so much for providing this excellent library.

I can't seem to figure out how to get the logit value of the token at generation time. Actually, I just want to get the logit value of the first token generated for each request (i.e. max_new_tokens=1), Instead of getting sampled tokens. How do you do that?

For example, for "yes" and "no" tokens, how to retrieve the logit values of these specific tokens in each generated sequence?

randomx207 avatar Jan 05 '24 13:01 randomx207

Hi @randomx207, this is not something we expose in MII currently. It is on our roadmap to provide additional features like this. I can provide a PR sometime next week to add this!

mrwyattii avatar Jan 05 '24 19:01 mrwyattii

Thank you for the update and for considering this feature in the roadmap. I appreciate your willingness to provide a PR for it. Looking forward to seeing the enhancements you have in store next week!

randomx207 avatar Jan 06 '24 00:01 randomx207

any update on this?

x66ccff avatar Jan 13 '24 15:01 x66ccff

I encountered the same problem. Has it been resolved?

Abigail61 avatar Jan 26 '24 02:01 Abigail61