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

Question about COIL-full #12

Open
kinglai opened this issue Aug 6, 2021 · 1 comment
Open

Question about COIL-full #12

kinglai opened this issue Aug 6, 2021 · 1 comment

Comments

@kinglai
Copy link

kinglai commented Aug 6, 2021

Awesome idea and exiting exp result.
Still, I am confused about the implement of COIL-full, when doing dense retrieval, can we do ANN search to speed up by using FAISS, or brute-force search indeed ? What's the implement in the paper experiment?

@kinglai kinglai changed the title question about COIL-full Question about COIL-full Aug 6, 2021
@kinglai
Copy link
Author

kinglai commented Aug 6, 2021

It seems you're doing brute-force search.

doc_cls_reps = torch.load(os.path.join(args.doc_shard, 'cls_reps.pt')).float()

......

for batch_start in trange(0, len(all_query_offsets), batch_size, desc=shard_name):
        batch_q_reps = query_cls_reps[batch_start: batch_start + batch_size]
        match_scores = torch.matmul(batch_q_reps, doc_cls_reps.transpose(0, 1))  # D * b

        batched_qtok_offsets = defaultdict(list)

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