-
Notifications
You must be signed in to change notification settings - Fork 579
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
Update logits array in-place #859
Closed
brandonwillard opened this issue
May 2, 2024
· 6 comments
· Fixed by #1192 · May be fixed by lapp0/outlines#92
Closed
Update logits array in-place #859
brandonwillard opened this issue
May 2, 2024
· 6 comments
· Fixed by #1192 · May be fixed by lapp0/outlines#92
Labels
enhancement
help wanted
optimization
Related to performance optimizations
structured generation
Linked to structured generation
Comments
This is dead code which should be cleaned up after |
No, that is a problem, thanks for pointing it out. I'll look at it once my current task is complete. |
This was referenced Oct 5, 2024
#1192 does not appear to update the logits arrays in place, at least not without creating another array the size of the logits. |
Looks like this might need to be moved after #1206. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
help wanted
optimization
Related to performance optimizations
structured generation
Linked to structured generation
What behavior of the library made you think about the improvement?
The current structured generation code is creating a
-inf
copy of the logits array and setting the allowed token ID indices to the corresponding values in the original logits array. See here.How would you like it to behave?
When possible, the original logits array should be updated in-place and completely avoid creating a new array. This change would likely require the set of disallowed token IDs instead of the allowed ones.
The text was updated successfully, but these errors were encountered: