IBM / kgi-slot-filling

This is the code for our KILT leaderboard submissions (KGI + Re2G models).
Apache License 2.0
147 stars 14 forks source link

sub-batch in re2g model. #9

Open pirunita opened 9 months ago

pirunita commented 9 months ago

Hello, I really impressed by the Re2G: Retrive, Rerank, Generate paper. I'm grateful for these good paper.

I have some question about this paper and code.

In this Re2G paper appendix, table4(Re2G hyperparameters) , batch size for DPR and Generation is fixed at 128. However, batch size for reranker is 32.

Why is the batch size different for the reranker?

Also, in re2g code, there is sub-batch forwarding for generation model. According to hypers.retrieve_batch_factor==8 in re2g_hypers.py, there is assertion code like below

assert ret_batch_size // get_batch_size == hypers.retrieve_batch_factor

which means it is not the same with each batch size for DPR and generation.

Therefore, is there a specific reason for setting sub-batch for the generation ?

Thank for reading my question.