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 important is it to use sentence_output_nheads? #3

Open
hjian42 opened this issue Jul 14, 2022 · 0 comments
Open

How important is it to use sentence_output_nheads? #3

hjian42 opened this issue Jul 14, 2022 · 0 comments

Comments

@hjian42
Copy link

hjian42 commented Jul 14, 2022

From the code

if sentence_output_nheads > 1:
, the way of creating H, the number of sentence heads of the encoder, is to add a linear + norm layer to transform the input of the CLS token from (batch_size, nsents, 1, model_d) into (batch_size, nsents, sentence_output_nheads, new_model_d). I wonder why do we need this extra layer, instead of feeding the original input (batch_size, nsents, 1, model_d) into the quantization layer?

I feel that you probably did experiments with it and chose this design and want to hear more. Thanks for your response in advance.

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

1 participant