-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: Added grammar generator for function calling. #796
feat: Added grammar generator for function calling. #796
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Maximilian-Winter could you run black on the files to make sure it passes the formatting integration test? I think my git UI merge of main into the fork messed up some black formatting lines.
https://github.com/cpacker/MemGPT/blob/main/CONTRIBUTING.md#check-formatting
Alternatively you can also just add me as a contributor to your fork repo and I can do it for you. I think there's a way for me to do it via git tools (if you selected "allow edits from maintainer") but I'm too much of a git noob to understand how to do it.
…imilian-Winter/MemGPT into Intergrate-Grammar-Generator
Here is the test to roll a d20 with openhermes 7B the inner thoughts at the function call are very long, I think it has forgotten how to end the string:
|
@cpacker After changing to outer inner thoughts it works much better!
|
…n the wrapper name (TODO move to a flag)
… to select the placement of the inner thoughts dynamically (check for 'noforce' in the wrapper name)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
…nts of all the chatml wrappers (no need for special init flags since that's handled via setattr)
… to have documentation since it's already in the schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright @Maximilian-Winter this seems to be working for me - can you test it on a few things like D20 on your end as a final check before we merge?
Maybe try with both chatml-noforce
and chatml
. You'll have to run memgpt configure
instead of passing --model-wrapper
to memgpt run
to swap wrappers because this bugfix isn't merged yet: #833
Sure, will test right now. @cpacker |
Co-authored-by: Charles Packer <[email protected]>
Co-authored-by: Charles Packer <[email protected]>
It adds a grammar generator usable for function calling for llama.cpp based backends.