-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Stop keywords #365
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 keywords #365
Conversation
Great feature! Somewhat related to this, but for input : #71 (comment) |
Perfect! |
Why are multiple keywords needed? Isn't just one enough (for example |
Sometimes we want to end before Llama decides to generate Also, it's not too hard to implement since the reverse prompt logic already does the heavy lifting. It doesn't really hurt anything to allow multiple keywords, so it seemed like a worthwhile investment. Unrelated; I've just realized that a lot of conflicts have popped up in this PR. I'll try to correct those over the next few days. |
Closing in favor of #769 |
….97.0 Bump fastapi from 0.96.0 to 0.97.0
Implements #57.
Stop keywords can be specified using the "--stop" parameter. Upon seeing one of these keywords in the generated output, the model will terminate generation immediately. Like reverse prompts, multiple stop keywords can be specified by specifying the --stop argument multiple times.
The implementation is heavily based on the reverse prompt implementation to keep things simple. Tested using 7B (quantized) in both interactive and non-interactive modes.