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
I have a really simple logit processor implementation here but it's not behaving the way I would expect and I'm having trouble finding docs on how it's supposed to behave.
Here's my logit processor I'm passing to the SamplingParams which then goes to generate_async. I'm using a pytorch backend and the executor API is enabled.
When generating here's the sequence I'm seeing:
This does not behave how I expected, I thought the logit processor is called once per forward pass and whatever the "chosen" token was after the forward pass would show up in the token_ids array during the next forward pass. (I'm sorry if this contains any misunderstandings, would love to be pointed in the right direction)
This makes it hard to implement something like: If the model just output the token "blue" force the next token to be "berry" As there's no easy way to know the current state of the generation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a really simple logit processor implementation here but it's not behaving the way I would expect and I'm having trouble finding docs on how it's supposed to behave.
Here's my logit processor I'm passing to the SamplingParams which then goes to generate_async. I'm using a pytorch backend and the executor API is enabled.
When generating here's the sequence I'm seeing:

This does not behave how I expected, I thought the logit processor is called once per forward pass and whatever the "chosen" token was after the forward pass would show up in the token_ids array during the next forward pass. (I'm sorry if this contains any misunderstandings, would love to be pointed in the right direction)
This makes it hard to implement something like: If the model just output the token "blue" force the next token to be "berry" As there's no easy way to know the current state of the generation.
Anyone have thoughts or pointers?
Beta Was this translation helpful? Give feedback.
All reactions