-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Add CFG to server #2217
base: master
Are you sure you want to change the base?
Add CFG to server #2217
Conversation
Hmm, are you running in dark mode? I am not that good at the web design, so it may look a bit weird. It also has a lot of debug strings all over the place but I will clean it up when it's more finished. |
@SlyEcho you going to get this merged? whats left ? |
I have to start again because the server changed so much in the meantime |
I wonder if we can just get the feature in with the flag to allow for the inputs, it seems like you did most of the heavy lifting, maybe the ui work can come in a secondary pr |
Yeah, I should have not put the UI stuff in here, it was too much changes at the same time. I hope to have more time over the holidays when I don't have lectures to give any more. |
Having CFG for the server api would be so nice, will this PR get eventually revived? |
@SlyEcho, we wait cfg oportuniy)) |
I would have to redo the entire PR, because so much has changed in the mean time. Originally, I got stuck when trying to merge some of the frontend changes. |
From #2135
TODOs
Adding new API parameters:
cfg_negative_prompt
cfg_scale
cfg_n_keep
cfg_n_keep
is new to server that main.cpp doesn't have, it allows the negative prompt to be managed just like the main prompt.Since the server doesn't have a chat memory itself the client has to now format two prompt strings to use this feature.
repeat_last_n
tokens now are not limited to the context size and can span however long you want, making sampling memory longer than context.Normal:
Random responses
With negative prompt:
Responses, but the first one was with the "smooth factor" that is now gone.