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

Improve controlled generation support #28

Open
ealmloff opened this issue Jul 23, 2023 · 0 comments
Open

Improve controlled generation support #28

ealmloff opened this issue Jul 23, 2023 · 0 comments
Labels
enhancement New feature or request plugin-engine

Comments

@ealmloff
Copy link
Collaborator

Currently, Floneum allows you to set a grammar that text generation should conform to. This is useful, but we could take it farther:

Text generation could be represented as a tree of words. The current position in that text is like a cursor in that tree.

In the rust API, we could allow users to either work with the raw cursor API, or use a validation callback:

let session = ModelInstance::new(ModelType::LlamaSevenB);
session.generate_validated(|text| text.len() < 5 && text.chars().all(|c| c == '*');
@ealmloff ealmloff added enhancement New feature or request plugin-engine labels Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin-engine
Projects
None yet
Development

No branches or pull requests

1 participant