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

parallel computation of mask in constrained sampling #964

Open
mmoskal opened this issue Dec 2, 2024 · 0 comments
Open

parallel computation of mask in constrained sampling #964

mmoskal opened this issue Dec 2, 2024 · 0 comments
Labels
new feature New feature or request

Comments

@mmoskal
Copy link
Contributor

mmoskal commented Dec 2, 2024

Currently (as per #899) , the masks are always computed in sequence.

Are the logit Tensors typically async? That is not synchronized yet, so logits.to_vec1() in sample() is what takes almost all time?

If so, I guess we could stay with the current interface and just do tokio_rayon::spawn() for the mask as you do for the sampling.

Otherwise, it would be good to kick-off mask computation before starting the forward pass.

This also depends a little on what we do with #963

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant