-
Notifications
You must be signed in to change notification settings - Fork 174
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
Stop Sequence #109
Comments
Hi @volkerha this is not currently possible in MII. In general, any extra kwargs passed to pipeline_kwargs = {"max_new_tokens": 50, "batch_size": 2}
result = generator.query({'query': ["DeepSpeed is the", "Seattle is"]}, **pipeline_kwargs) The problem is that our current deployment types utilize a grpc server and those
In your current usage of MII, do you require the GRPC server capabilities? or would a non-GRPC deployment work for you? I believe (1) will be the most likely to be implemented in the near future. |
Looks like there is a I'm thinking to add a PR to hugging face to add an argument to the generation pipeline to specify stop tokens (so we don't have to pass objects around). |
As you mentioned, 🤗transformers simply set the In my case, I would like to specify a sequence of several tokens as stopping criteria, e.g. only if the model generates something like "User:", generation should be stopped. Also, it would be good to keep the original |
This PR is merged: huggingface/transformers#20727 Once released, we should be able to do It's not using |
Hi Deepspeed-MII team,
I was wondering if there is a way to implement a stop sequence or stop token in ds-mii to stop generation early.
In the current implementation, the model mostly generates
max_new_tokens
number of tokens. In huggingface transformers, it's possible to implement custom stopping criteria but I did not find this option here.I tried setting the
eos_token_id
to the desired stop token but somehow the model keeps generating even after producing the stop token.Cheers, V
The text was updated successfully, but these errors were encountered: