Stop keywords#365
Stop keywords#365joshmackwilliams wants to merge 3 commits intoggml-org:masterfrom joshmackwilliams:stop-keywords
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.