GithubHelp home page GithubHelp logo

Comments (5)

martindevans avatar martindevans commented on September 22, 2024

LLamaSharp doesn't support negative prompts in an easy to use way.

All the necessary low level components are there, but they haven't been put together into an easy to use high level system that allows you to use it by just supplying a string as a negative prompt.

from llamasharp.

zsogitbe avatar zsogitbe commented on September 22, 2024

I see. This is an important feature since we can control model ethics with it easily. It is probably not a lot of work for someone who knows the code already very well.

from llamasharp.

martindevans avatar martindevans commented on September 22, 2024

Applying the guidance logits is fairly simple (I've actually just put together the code to do that).

The tricky part is that you need a second entire sequence running in parallel to the first to generate those guidance logits. This really needs batched execution to be fast, which is supported in LLamaSharp, but only very recently and it doesn't work with any kind of high level executor yet.

from llamasharp.

martindevans avatar martindevans commented on September 22, 2024

@zsogitbe I've implemented a demo for how to use classifier free guidance using the new batched executor. As I mentioned this is not as high level as the existing executors, but it should at least demo how things work at the lower level for now. If you could pull #536, test it out and leave any feedback on that PR, it would be very appreciated!

from llamasharp.

zsogitbe avatar zsogitbe commented on September 22, 2024

Added a possible bug issue: ggerganov/llama.cpp#5709

from llamasharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.