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

[New Model]: fastspeech2_conformer (just need a new attention mechanism: RelPositionMultiHeadedAttention) #4736

Open
cillinzhang opened this issue May 10, 2024 · 4 comments · May be fixed by #4956
Labels
new model Requests to new models

Comments

@cillinzhang
Copy link

The model to consider.

https://huggingface.co/espnet/fastspeech2_conformer

A complete model is not required, only need a new attention mechanism FastSpeech2ConformerAttention (following is the code):
https://github.com/huggingface/transformers/blob/47735f5f0f2752500d115d2f6bd57816032599b6/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py#L463

This new attention mechanism also is known as RelPositionMultiHeadedAttention (following is the code):
https://github.com/wenet-e2e/wenet/blob/f2372ae6d97f926688fee821e609e42aaf41571d/wenet/transformer/attention.py#L294

The closest model vllm already supports.

llama

What's your difficulty of supporting the model you want?

a new attention mechanism

@cillinzhang cillinzhang added the new model Requests to new models label May 10, 2024
@cillinzhang cillinzhang changed the title [New Model]: fastspeech2_conformer [New Model]: fastspeech2_conformer (just need a new attention mechanism: RelPositionMultiHeadedAttention) May 10, 2024
@cillinzhang cillinzhang reopened this May 11, 2024
@rajveer43
Copy link

I would like to work on this issue

@cillinzhang
Copy link
Author

I would like to work on this issue

There are two key points to implement while decoding:

  • [ 1] maintaining the pos_emb matrix, its size is changing
  • [ 2] attention always needs attn_bias

@rajveer43
Copy link

Okay, @cillinzhang , Understood

@rajveer43
Copy link

Okay, I will keep thiss in mind

@rajveer43 rajveer43 linked a pull request May 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new model Requests to new models
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants