Skip to content

Stateless Refactoring of Core Interpreter / Postprocessing Semantics / noscore rewrite mode #24

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

Merged
merged 28 commits into from
Apr 17, 2023

Conversation

lbeurerkellner
Copy link
Collaborator

@lbeurerkellner lbeurerkellner commented Apr 16, 2023

This is a bit of a messy PR with a complete reimplementation of the PromptInterpreter, relying entirely on storing interpreter state in the decoder tree nodes. This fixes a few issues, that could occur with branching decoders and state tracking.

Other changes include:

  • Improved @lmql.query support (no need to doubly-escape newlines anymore)
  • noscore option for rewrite() for decoders that do not need the logprobs of deterministic prompt parts. This leads to a ~30% speedup for argmax/sample with the example queries in the playground.

I will do a PyPI release after merging these changes.

@lbeurerkellner lbeurerkellner merged commit c434ceb into main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant