Skip to content
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

Add grammars module #562

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Add grammars module #562

merged 1 commit into from
Jan 26, 2024

Conversation

lapp0
Copy link
Collaborator

@lapp0 lapp0 commented Jan 19, 2024

Fixes #543

Rendered docs: https://github.com/lapp0/outlines/blob/cfg-examples/docs/quickstart.md#built-in-grammars

Makes it easy to add grammars to the module, define a lark file in outlines/lark, reference it in grammars.py.

Work

Out of scope

@rlouf
Copy link
Member

rlouf commented Jan 23, 2024

I think we could rename outlines.lark to outlines.grammars? Otherwise this requires user to know what lark is and add cognitive overhead.

@rlouf
Copy link
Member

rlouf commented Jan 24, 2024

Now that #544 has been merged you will need to rebase your brain on main and fix the merge conflicts. It would also be nice to have some documentation :) This can go in the "Utiltities" section under "Docs".

@lapp0 lapp0 force-pushed the cfg-examples branch 2 times, most recently from 8d9c1ee to 68b3a4c Compare January 24, 2024 17:36
@lapp0 lapp0 marked this pull request as ready for review January 24, 2024 18:41
outlines/fsm/fsm.py Outdated Show resolved Hide resolved
@rlouf rlouf added the grammar label Jan 26, 2024
@rlouf
Copy link
Member

rlouf commented Jan 26, 2024

Good to merge, thank you!

@rlouf rlouf merged commit c2b0f4f into outlines-dev:main Jan 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add module with grammars
2 participants