Add min_tokens argument#240
Conversation
Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
|
@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_tokensargument to complementmax_tokens. When set, the EOS token will be discarded untilmin_tokenshave been generated.