DeepSpeed-MII
DeepSpeed-MII copied to clipboard
how to set stop tokens?
Is there a way to implement a stopping_criteria
in DeepSpeed MII for text generation, to stop at a newline or custom token?
Hi @PawanOsman! I added this feature in #280, but I was observing unexpected behavior in some cases so I did not add to our official documentation. I plan to debug the problem I was seeing and update the docs when I'm sure it's working correctly this week.
In the meantime, you can test it yourself and report any issues that arise:
client.generate(prompt, stop="\n")
(The input can either be a token_id
or string)
Thank you so much, is it possible to give it a list of tokens? or it can be only a single token?
Currently we support just a single token, but I can expand this feature to support multiple.