Skip to content

Modular m4t speecht5 sew - #37473

Open
nikosanto13 wants to merge 21 commits into
huggingface:mainfrom
nikosanto13:modular-m4t-speecht5-sew
Open

Modular m4t speecht5 sew#37473
nikosanto13 wants to merge 21 commits into
huggingface:mainfrom
nikosanto13:modular-m4t-speecht5-sew

Conversation

@nikosanto13

@nikosanto13 nikosanto13 commented Apr 13, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Completes the effort of #35902, by adding modular files for SEW, SEW-D, SeamlessM4T, SeamlessM4Tv2, SpeechT5 (as proposed by @eustlb)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@ArthurZucker @eustlb

@github-actions

Copy link
Copy Markdown
Contributor

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@github-actions
github-actions Bot marked this pull request as draft April 13, 2025 15:33
@nikosanto13
nikosanto13 marked this pull request as ready for review April 13, 2025 16:03
@Rocketknight1

Copy link
Copy Markdown
Member

cc @eustlb and maybe @vasqu

@eustlb

eustlb commented Jun 27, 2025

Copy link
Copy Markdown
Collaborator

Again, thanks so much for the good work @nikosanto13 , reviewing ASAP (coming days) 🤗

@eustlb eustlb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Need to fix this before merging (I am looking for a way to circumvent)!

Comment on lines -3141 to +3097
Input audio features. This should be returned by the [`SeamlessM4TFeatureExtractor`] class or the
[`SeamlessM4TProcessor`] class. See [`SeamlessM4TFeatureExtractor.__call__`] for details.
Input audio features. This should be returned by the [`SeamlessM4Tv2FeatureExtractor`] class or the
[`SeamlessM4Tv2Processor`] class. See [`SeamlessM4Tv2FeatureExtractor.__call__`] for details.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This renaming is incorrect. We should stick with SeamlessM4TProcessor.
I am going to find an equivalent trick to:

# Copied from transformers.models.seamless_m4t.modeling_seamless_m4t.SeamlessM4TForTextToText with SeamlessM4T->SeamlessM4Tv2,SeamlessM4Tv2Tokenizer->SeamlessM4TTokenizer, SeamlessM4Tv2Processor->SeamlessM4TProcessor, SEAMLESS_M4T->SEAMLESS_M4T_V2

that renames with v2, then revert SeamlessM4Tv2Tokenizer -> SeamlessM4TTokenizer and SeamlessM4Tv2Processor -> SeamlessM4TProcessor to make sure that in the docstrings we’re correctly referring to the v1 tokenizer and processor (and not v2, which simply reuses those from v1)

Comment on lines -2858 to +2823
Indices can be obtained using [`SeamlessM4TTokenizer`] or [`SeamlessM4TProcessor`]. See
Indices can be obtained using [`SeamlessM4Tv2Tokenizer`] or [`SeamlessM4Tv2Processor`]. See

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

see below comment on preventing renaming

SEAMLESS_M4T_V2_COMMON_CUSTOM_ARGS = r"""
input_features (`torch.FloatTensor` of shape `(batch_size, sequence_length, num_banks)`):
Input audio features. This should be returned by the [`SeamlessM4Tv2FeatureExtractor`] class or the
[`SeamlessM4Tv2Processor`] class. See [`SeamlessM4Tv2FeatureExtractor.__call__`] for details.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

see below comment on preventing renaming

@github-actions

github-actions Bot commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: seamless_m4t, seamless_m4t_v2, sew, sew_d, speecht5, unispeech, unispeech_sat, wav2vec2_bert

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