-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adds guidance extension #2554
Adds guidance extension #2554
Conversation
EDIT: Okay, nvm, it's late here. Turns out I just wasn't loading the guidance extension 🤦. I'm going to leave this up for posterity. Small suggestion though, the description Thanks again for your work! Can't wait to try it out when I've had some sleep 😄 When running your fork with
results in the following error:
Reinstalling dependencies, loading the model before the extensions, accessing from different ports, etc., all didn't solve the issue. Not sure what the problem is, here, and sadly my coding knowledge doesn't reach far enough to tackle this. Hopefully, you can shine a light on it. Thanks for the work with the repo, btw! I'd love to get guidance running without having to (re)load the model in my notebooks all the time. I'm running on WSL2 (Ubuntu 22.04.2 LTS), installed packages are as follows: accelerate 0.20.3 |
Hi, @bilwis, thanks for trying it out and finding this issue. I was going to point the argument looked weird, but you found it yourself first :) It used the api extension code as a base, so I forgot to update the description, sorry about the confusion. I’ll fix this description hopefully tomorrow or during the week. Let me know how it goes for you. |
Here we are again, well rested but still stupid. I've got a question about passing input variables. You've got the
Again, thanks for your work, I hope it'll be merged soon, and that more people get to play around with guidance. |
My fault that the documentation is not clear. You should pass a dictionary of values for the variables that are not generated. You have already it defined as {“word”: “Howdy”} in the example. |
Could you please submit the extension to https://github.com/oobabooga/text-generation-webui-extensions? I am not familiar enough with guidance to properly maintain the extension in the future, and would prefer to have something integrated with the UI rather than an additional API. |
What is this
Adds a small API wrapper to the guidance library (https://github.com/microsoft/guidance), using the model loaded by oobabooga's UI.
Use cases in mind
Implementation of chain of thought flows (and more complex flows) with guidance, using oobabooga as the model loader, so people can have an easy time loading GPTQ and other types of models.
Why
I've tried adding support to oobabooga's existing API to the guidance library (https://github.com/paolorechia/local-guidance), however not all features were possible to support, since guidance depends on
logprobs
and other data fields from the Hugging Face API for certain features.Limitations
Only works for HuggingFace and GPTQ models so far. Someone already opened a PR in guidance to add supported llama cpp Python bindings: guidance-ai/guidance#70 - with this, we'll be able to support LLaMA GGML models.
How to use
The exposed API endpoint can easily be used with the thin wrapper (andromeda-chain):
pip install andromeda-chain
Repository: https://github.com/ChuloAI/andromeda-chain
Example code:
Alternatively, the extension can be used by just implementing a simple HTTP client.