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

Could you tell me where is the code implement of cross-attention in the paper VECO? #14

Closed
GoneZ5 opened this issue Jul 6, 2021 · 1 comment

Comments

@GoneZ5
Copy link

GoneZ5 commented Jul 6, 2021

Could you tell me where is the code implement of cross-attention in the paper VECO?

@luofuli
Copy link
Collaborator

luofuli commented Jul 8, 2021

We only released the fine-tuning code of VECO. In the directory of NLG code which are implemented based on fairseq, we transferred the pre-trained model state_dict keys into the format of fairseq via a mapping when fine-tuning on NLG tasks.
The encoder_attn denotes the cross_attention. The detailed mapping is shown as below:

{'cross_attention.query.weight': 'encoder_attn.q_proj.weight',
'cross_attention.query.bias': 'encoder_attn.q_proj.bias',
'cross_attention.key.weight': 'encoder_attn.k_proj.weight',
'cross_attention.key.bias': 'encoder_attn.k_proj.bias',
'cross_attention.value.weight': 'encoder_attn.v_proj.weight',
'cross_attention.value.bias': 'encoder_attn.v_proj.bias',
'cross_attention.output.dense.weight': 'encoder_attn.out_proj.weight',
'cross_attention.output.dense.bias': 'encoder_attn.out_proj.bias',
'cross_attention.output.LayerNorm.gamma': 'encoder_attn_layer_norm.weight',
'cross_attention.output.LayerNorm.beta': 'encoder_attn_layer_norm.bias'}

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