Skip to content

Whisper finetuning#1717

Merged
TParcollet merged 109 commits intospeechbrain:developfrom
Adel-Moumen:whisper-finetuning
Dec 7, 2022
Merged

Whisper finetuning#1717
TParcollet merged 109 commits intospeechbrain:developfrom
Adel-Moumen:whisper-finetuning

Conversation

@Adel-Moumen
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread speechbrain/lobes/models/huggingface_whisper.py Outdated
Comment thread speechbrain/decoders/seq2seq.py Outdated
enc_states, memory
) # TODO: switch args
log_probs = self.softmax(dec_out[:, -1])
return log_probs, memory, None
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.

Are we adding an argument here?

Comment thread speechbrain/decoders/seq2seq.py Outdated
dec_out = self.model.forward_decoder(enc_states, memory)
dec_out, attn, = self.module.forward_decoder(enc_states, memory)
log_probs = self.softmax(dec_out[:, -1])
return log_probs, memory, None
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.

We should make sure that this won't break any model

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I just followed what we did for the S2STransformerBeamSearch. The beam search algorithm expects to get the attn weights if provided. In our case, we have attn weights, so it makes sense to return them. One note: I think the return of attn from the decoder should be mandatory (and not optional).

I did some tests with and without attn in the beam search and did not see any changes. (might be related to how I initialized the beam search. I will investigate later tomorrow).

TParcollet and others added 2 commits November 27, 2022 21:57
Avoid the inefficient conversion of input tensors to CPU NumPy arrays
Copy link
Copy Markdown
Collaborator

@TParcollet TParcollet left a comment

Choose a reason for hiding this comment

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

Once the requested changes will be done and results added, the PR will be ready to be merger.

@Adel-Moumen Adel-Moumen marked this pull request as ready for review December 7, 2022 08:13
@Adel-Moumen Adel-Moumen changed the title [WIP] Whisper finetuning Whisper finetuning Dec 7, 2022
Copy link
Copy Markdown
Collaborator

@TParcollet TParcollet left a comment

Choose a reason for hiding this comment

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

LGTM!

@TParcollet TParcollet merged commit a7901a3 into speechbrain:develop Dec 7, 2022
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.

7 participants