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

How to train a transformer model with multi-source encoders ? #822

Open
penny9287 opened this issue Jun 19, 2019 · 3 comments
Open

How to train a transformer model with multi-source encoders ? #822

penny9287 opened this issue Jun 19, 2019 · 3 comments

Comments

@penny9287
Copy link

I wonder how to modify the configuration file to train a multi-source based transformer model with different attention types.

@jindrahelcl
Copy link
Member

Hi, currently, the Transformer decoder only supports the multi-head scaled dot-product attention from the "Attention is All You Need" paper. If you provide multiple encoders, you can choose which attention combination strategy you want to use, one of serial, parallel, hierarchical, and flat.

@wyjllm
Copy link

wyjllm commented Jun 20, 2019

I wonder how to specify the combination strategy for multiple encoders in the configuration file, have any examples?

@jindrahelcl
Copy link
Member

just specify the attention_combination_strategy parameter in the transformer decoder configuration. It can be one of serial, parallel, hierarchical, and flat.

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

No branches or pull requests

3 participants