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

Introduce build_conformer_conv() and build_sdpa() in wav2vec2 builder. #97

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

kauterry
Copy link
Contributor

What does this PR do? Please describe:

Refactor wav2vec2 builder to have build_conformer_conv() and build_sdpa() methods which can be overriden in the subclasses.

Hence we can remove causal_depthwise_conv, conv_norm_type, shaw_rel_pos_sdpa_config attributes out of the wav2vec2 config into the subclass' config.

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)

@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 Oct 10, 2023
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 two very nit comments.

src/fairseq2/models/wav2vec2/builder.py Outdated Show resolved Hide resolved
src/fairseq2/models/wav2vec2/builder.py Show resolved Hide resolved
@kauterry kauterry merged commit cb6d514 into main Oct 10, 2023
11 checks passed
@kauterry kauterry deleted the wav2vec2_config_refactor branch October 10, 2023 17:59
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.

3 participants