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

Beam search w/ Flashlight Text #2017

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

joecummings
Copy link
Contributor

No description provided.

encoder_output = model_kwargs["encoder_outputs"][encoder_output_key]

def update_func(emissions, N, T, prev_step_token_idxs, prev_step_model_states, timestep):
# `emissions` and `N` are unused in this current implementation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could change this around to take in emissions, but AFAIK there is no easy way to get the actual tensor from the data_ptr.


return final_tokens_as_tensors

if num_python_workers > 1:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyTorch has a MP module (essentially a clone of Python's MP); however, this relies on pickle, which means all of these functions would have to be at a global level. Very open to suggestions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants