feat: add stopword checker + iterable generate function#106
feat: add stopword checker + iterable generate function#106Nintorac wants to merge 1 commit intoBlinkDL:mainfrom
Conversation
|
Nice :) Actually a better method is to "recover" the state when you see Bob: / Alice:, as in #87 I use \n\n for now, because I replace all \n\n in ChatGPT generations by \n, so whenever you see \n\n it must be endoftext |
|
hmm, can't really grasp what the PR is doing after reviewing, the out state doesn't get used? eg here and I don't think it's solving the same problem. Also looks to use some global state The target use case here supports arbitrary custom stopwords, this can be used in langchain to stop the LLM when it needs to. eg in such a chain you might put
yes! are you thinking of including an |
6a58e66 to
f905496
Compare
Sometimes the text generation stop even it doesn’t finish the text because it creates \n\n for example if i ask the bot to write code, it starts with the sentence “here is the python code to write X algorithm” and then “\n\n”. Actually it will write the code, but the chatrwkv will stop the generation because it sees “\n\n” |
|
Oh actually I did notice something, based on this section of the HF article; do you use Big GZ on the HF release by the way! |
This PR adds two sets of functionality.
bob:could be used to yield control when the model outputs bob which would indicate it is the user turn to speak.Let me know what you think :)
eg. usage