-
Notifications
You must be signed in to change notification settings - Fork 16
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
Include prompt blending #75
Comments
You might want to know that there is a new prompt blending extension that makes possible to do custom blends with a more intuitive syntax: This seems to match your description, but please let me know if it's different and I can start looking for a hole in the syntax where this would go. |
I've used that extension for a long time as well but the prompt blending script does a much better job at actually blending stuff together for some reason. I'm not really familiar with the internal logic so can't say why that would be. |
I'll look into this then. The worst case scenario is that we are introducing feature redundancy I guess. I'm thinking of using something like this:
Where You'd be able to infer equal weights summing up to 1 like this:
Having to put the right number of commas can be annoying. I'll update you on whether I sucessfully make the parser work with this:
|
Looks good. Being able to omit the commas when possible would be a life saver. Are the weights relative to each other? I assume Other keyword alternatives could be the shortened |
That's a good question. It would come in handy for most cases, but at the same time it would prevent using a weight combination that sums to i.e. 1.1 or 0.9, which may or may not be interesting to play with. I'll think about this, there may be a way to allow both rescaled weighting and absolute weighting. |
I could try to change the parser so that we can put many words in the last |
Allowing both could be achieved in a few ways: Another option could be to add the total weight as an extra after the keyword |
I like your approach. |
Before anything, thanks for the suggestions! I think option 1 would introduce behavior that is a bit surprizing. The syntax looks the same as builtin token weighting but has a completely different behavior. Option 2 could work I think, however it is hard to know from a glance whether or not there is an extra number in the list. Option 3 unfortunately can't work, because the parser has to see a word in the last Thanks for these though, I really appreciate your input and the intention to make this feature as good as it can be. |
An alternative to 3 could be to use something like
which might be more useful than absolute weighting. |
I intend to use it so I'm fully driving my own benefit here 😎 |
I think after all using |
We can have both simultaneously. I can make the parentheses optional, so that both In any case, I'll start with the base case of normalized average with the keyword |
I've implemented the basic version of weighted average. It should work exactly as we described it earlier here. Let me know if you have any issue with the implementation and I'll look into it. I'm not closing this yet because |
It seems like using weights does not work yet. Neither
|
Unfortunately I cannot reproduce the issue. All prompts generate exactly the same output.
|
Interesting, I'll try to investigate a bit more. |
Maybe it's caused by an interaction with another extension? |
Most likely that would be it. |
Found the offending extension. After disabling it the feature seems to work great. |
Awesome. Which one is it? Maybe there's a way to make them compatible. |
Forgot to respond to this. The extension was this. It replaces spaces and commas, so the syntax of this extension was replaced. I simply disabled the other extension as it's not certain if it is even effective or just placebo. It would be difficult to make then compatible and not worth the effort. |
Huge thank you btw for implementing this! I'm convinced that techniques for representation/activation engineering like prompt blending are being massively undervalued by the AI community. |
seems like I forgot to close this |
This issue is still open because absolute weighting and arbitrary weight normalization have not yet been implemented. |
Thank you for not abandoning support for techniques like this, including "obscure" ones. Control over one's model using techniques like this is extremely useful, and folks like you (and SirVeggie) should be at NeurIPS if you aren't already attending. |
Hey there, I was wondering if it would be a good idea to include prompt blending into this extension? The old script is no longer being developed and it no longer works with the newest version of auto1111, but I did get it working with a small tweak.
I thought it is a very similar functionality to this extension and it would be convenient to have both in one extension. It might need a bit of tweaking for the syntax to not clash with dynamic prompts, and to fit well with the existing syntax of this extension.
What do you think?
The text was updated successfully, but these errors were encountered: