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

[BugFix] Fix extract_features method for WavLM models #3350

Closed
wants to merge 2 commits into from

Conversation

nateanl
Copy link
Member

@nateanl nateanl commented May 19, 2023

resolve #3347

position_bias is ignored in extract_features method, this doesn't affect Wav2Vec2 or HuBERT models, but it changes the output of transformer layers (except the first layer) in WavLM model. This PR fixes it by adding position_bias to the method.

@pytorch-bot
Copy link

pytorch-bot bot commented May 19, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/3350

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 3 Unrelated Failures

As of commit e8fa75a:

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base f046f7e:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
Contributor

@sgrigory sgrigory left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this! When verifying against HF results https://github.com/pytorch/audio/blob/f9b4f74fd5e8a3ec92d77b20102d187090a8ad15/test/torchaudio_unittest/models/wav2vec2/huggingface_intergration_test.py#LL310C9-L310C28 we never call model.extract_features or transformer.get_intermediate_outputs, that's probably why this went unnoticed

@facebook-github-bot
Copy link
Contributor

@nateanl has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@nateanl merged this pull request in 7d0f336.

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.

WAVLM_BASE pipeline shows different hidden states when compared to the HuggingFace model.
4 participants