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

Adding support for wav2vec2 large models. #498

Merged
merged 3 commits into from
May 22, 2024
Merged

Adding support for wav2vec2 large models. #498

merged 3 commits into from
May 22, 2024

Conversation

kauterry
Copy link
Contributor

@kauterry kauterry commented May 4, 2024

What does this PR do? Please describe:
Adds support for wav2vec2 large models trained on Librispeech 960h (ls960) and LibriVox 60k (lv60k).

Tested with this simple code snippet:
lv60k

from fairseq2.models.wav2vec2.setup import load_wav2vec2_model
import torch

model = load_wav2vec2_model("wav2vec2_large_lv60k", device=torch.device("cuda:0"), dtype=torch.float32)
print(model)

Output: P1230849615

ls960:

from fairseq2.models.wav2vec2.setup import load_wav2vec2_model
import torch

model = load_wav2vec2_model("wav2vec2_large_ls960", device=torch.device("cuda:0"), dtype=torch.float32)
print(model)

Output: P1230849916

Fixes #{issue number}

Does your PR introduce any breaking changes? If yes, please list them:
List of all backwards-incompatible changes.

Check list:

  • Was the content of this PR discussed and approved via a GitHub issue? (no need for typos or documentation improvements)
  • Did you read the contributor guideline?
  • Did you make sure that your PR does only one thing instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (no need for typos, documentation, or minor internal changes)

@kauterry kauterry requested a review from cbalioglu as a code owner May 4, 2024 21:48
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 4, 2024
Copy link
Contributor

@cbalioglu cbalioglu left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the new configs! Just left two nit comments.

src/fairseq2/models/wav2vec2/factory.py Outdated Show resolved Hide resolved
src/fairseq2/models/wav2vec2/factory.py Outdated Show resolved Hide resolved
@kauterry kauterry force-pushed the wav2vec2_large branch 2 times, most recently from 760f5ae to 370de4e Compare May 15, 2024 19:31
@kauterry kauterry marked this pull request as draft May 16, 2024 06:12
@kauterry kauterry changed the title Adding support for wav2vec2 large models. [Deprecated] Adding support for wav2vec2 large models. May 16, 2024
@kauterry kauterry closed this May 16, 2024
@kauterry kauterry changed the title [Deprecated] Adding support for wav2vec2 large models. Adding support for wav2vec2 large models. May 16, 2024
@kauterry kauterry reopened this May 16, 2024
@kauterry kauterry marked this pull request as ready for review May 17, 2024 06:27
Copy link
Contributor

@cbalioglu cbalioglu left a comment

Choose a reason for hiding this comment

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

Just left a few nit comments about naming. Otherwise, looks good. Once you address them, we can merge it.

src/fairseq2/assets/cards/models/wav2vec2.yaml Outdated Show resolved Hide resolved
src/fairseq2/models/wav2vec2/asr/factory.py Outdated Show resolved Hide resolved
src/fairseq2/models/wav2vec2/asr/factory.py Outdated Show resolved Hide resolved
src/fairseq2/models/wav2vec2/asr/factory.py Outdated Show resolved Hide resolved
src/fairseq2/models/wav2vec2/asr/factory.py Outdated Show resolved Hide resolved
Copy link
Contributor

@cbalioglu cbalioglu 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 the contribution! :)

@cbalioglu cbalioglu merged commit 0be2602 into main May 22, 2024
10 checks passed
@cbalioglu cbalioglu deleted the wav2vec2_large branch May 22, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants