FlagOpen / FlagEmbedding

Retrieval and Retrieval-augmented LLMs
MIT License
6.81k stars 490 forks source link

How to choose value for train_group_size in finetuning? #1071

Open chansonzhang opened 3 weeks ago

chansonzhang commented 3 weeks ago

Q1: What does the description below from README mean specifically?

train_group_size: the number of positive and negatives for a query in training. There are always one positive, so this argument will control the number of negatives (#negatives=train_group_size-1). Noted that the number of negatives should not be larger than the numbers of negatives in data "neg":List[str]. Besides the negatives in this group, the in-batch negatives also will be used in fine-tuning. e.g.

  • How will the negatives been choosen from "neg":List[str]?
  • How will the negatives been choosen from in-batch negatives?
  • What are the specific strategies here?

Q2: How does train_group_size affect the finetuning performance and how to choose the optimal value?

staoxiao commented 3 weeks ago

Hi, @chansonzhang Q1:

Q2: A larger train_group_size usually improves the performance.