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 adjustment #394

Merged
merged 2 commits into from
May 30, 2023
Merged

Conversation

katalinic-gc
Copy link
Collaborator

What does this PR do?

Main change is to move the termination check to the beginning of on device beam search, matching the flow of a while loop. I've numerically compared it against FlaxWhisperForConditionalGeneration and internal state yields identical outputs on CPU. Unfortunately, the flax implementation still appears to have some tiny deviations in logic from eager, so some differences might have to be accepted.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 21, 2023

The documentation is not available anymore as the PR was closed or merged.

@jimypbr jimypbr merged commit f6aa65f into huggingface:main May 30, 2023
@jimypbr jimypbr deleted the beam_search_adjustment branch May 30, 2023 15:08
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.

3 participants