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
The user can optionally pass a suppressed_tokens arg to GPT-2/BART's generate() function. We will set the probability of these tokens to 0 (i.e., logits to -infinity), so that they aren't generated. This is super-useful in order to avoid generating a special token (like bos token) during generation.
The text was updated successfully, but these errors were encountered:
abheesht17
changed the title
Consider a "suppressed_tokens" args in generate()
Consider a suppressed_tokens args in generate()Apr 8, 2023
abheesht17
changed the title
Consider a suppressed_tokens args in generate()
Consider a suppressed_tokens arg in generate()Apr 8, 2023
I think the general problem we need to think about is how we transform logit outputs. We need to be able to ship default transformations (e.g. for whisper logit supression), and potentially allow users a hook to provide their own.
One option is adding more and more sampler config #978. A few other options to consider...
Users can pass in an arbitrary logit transformation somewhere. logit_transform_fn=None.
Users need to subclass a language model and override a method to do custom logit transformation.
The user can optionally pass a
suppressed_tokens
arg to GPT-2/BART'sgenerate()
function. We will set the probability of these tokens to 0 (i.e., logits to -infinity), so that they aren't generated. This is super-useful in order to avoid generating a special token (like bos token) during generation.The text was updated successfully, but these errors were encountered: