Skip to content

Negative prompt confusion #5709

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

Closed
zsogitbe opened this issue Feb 25, 2024 · 4 comments
Closed

Negative prompt confusion #5709

zsogitbe opened this issue Feb 25, 2024 · 4 comments

Comments

@zsogitbe
Copy link

I have the strong feeling that the negative prompt (cfg_negative_prompt) is confused in the implementation with a positive prompt (guidance). Could you please check this in the code? Thank you.

A negative prompt is an instruction to exclude elements from generated content. That could be bad ethical content, objects, styles, colors, effects, etc.

@Solido
Copy link

Solido commented Feb 25, 2024

The way to support negative prompts is not evident.

You need to first convert words to logits and then pass and negative weight to remove them from completion.

Server but not main benefits from a simpler solution that was not back ported by passing directly the words.

@zsogitbe
Copy link
Author

The way to support negative prompts is not evident.

Yes, but it is an important feature, for example, to control model ethics.

You need to first convert words to logits and then pass and negative weight to remove them from completion.

Is this implemented somewhere?

Server but not main benefits from a simpler solution that was not back ported by passing directly the words.

I am sorry, but I do not understand what you try to say here.

@Jeximo
Copy link
Contributor

Jeximo commented Feb 25, 2024

I have the strong feeling that the negative prompt (cfg_negative_prompt) is confused in the implementation with a positive prompt (guidance).

More information is necessary.. Do you have an example? What's your command line arguments?

@zsogitbe
Copy link
Author

Thank you all. We managed to invert the weight and get a negative prompt instead of the positive one outside of llama.cpp.
A comprehensive example about how to use a negative prompt would be here very useful. I am not sure that the current "negative prompt" implementation in llama.cpp with 'cfg_negative_prompt' is really a negative prompt, it is more probable that it is a positive prompt...
I will close this issue.

@zsogitbe zsogitbe closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants