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

Adding the attend_to_expansion_tokens option #9

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

NohTow
Copy link
Collaborator

@NohTow NohTow commented Jun 17, 2024

In the original ColBERT implementation, the tokens added for query expansion are not attend in the attention layers (i.e, their corresponding attention mask is 0).
Hence, original tokens do not attend to them, but they are not statics either as they do attend to original tokens and also have different positional embeddings.

This PR add a property attend_to_expansion_tokens to the ColBERT model to allow replication of the original models results and also explore whether or not it should be set be defaulted to true or false.

@NohTow NohTow requested a review from raphaelsty June 17, 2024 12:02
@raphaelsty raphaelsty merged commit 21437e6 into main Jun 17, 2024
1 check passed
@raphaelsty raphaelsty deleted the attend_expansion_tokens branch August 22, 2024 10:31
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.

2 participants