-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add min_tokens
argument
#240
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
Conversation
Signed-off-by: Antoni Baum <[email protected]>
@abetlen, could you review when you have a moment? Thank you! |
Hey @Yard1 sorry to take so long on this reply. The issue I see with this at the moment is that the stop token is still being generated and appended to the eval_logits and eval_tokens internally. This will probably cause some kind of issue in generation, what you really want is a min_tokens inside of generate or something that essentially ignores / sets the eos token probability to 0 until a certain number of tokens are generated. Also, it should probably be noted that fewer than min_tokens may be returned if e.g. another stop criteria like a stop sequence is encountered. |
The proposed change would be:
|
Got it, thanks! Let me take a look at this. |
Hmm, now that I think about it, this can be easily implemented through a |
Also start adding prompts in "./prompts"
any updates on this? |
8c93cf8
to
cc0fe43
Compare
@Yard1 we've added the parameter to the server and it's available in the python API via a new |
This PR adds a
min_tokens
argument to complementmax_tokens
. When set, the EOS token will be discarded untilmin_tokens
have been generated.