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

When selecting, ensure the last token is the option encoded #78

Closed
wants to merge 6 commits into from

Conversation

Mihaiii
Copy link
Contributor

@Mihaiii Mihaiii commented May 20, 2023

This prevents the case when we would have a token that represents a text that only ends with the option (ex: both " True" and "True" are in vocab).

Fixes #67

This feels like the right solution, but I'm only trying to learn the codebase. The codebase seem to assume that options can only be 1 token long (for example, the call to the LLM has max_tokens=1) - any plans to support more tokens?

@slundberg
Copy link
Collaborator

Thanks! Will take a look. The code does not assume a single token, but it does make single token generation calls to branch the decision tree that is implied by a select statement.

@Mihaiii
Copy link
Contributor Author

Mihaiii commented May 22, 2023

Closing as the issue can't be replicated in the latest release.

@Mihaiii Mihaiii closed this May 22, 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.

JSON Former Example: "No valid option generated in #select!"
2 participants