lightonai / pylate

Late Interaction Models Training & Retrieval
https://lightonai.github.io/pylate/
MIT License
175 stars 7 forks source link

[Draft] Setting normalize_scores default to False #66

Open NohTow opened 1 month ago

NohTow commented 1 month ago

This PR change the default of normalize_scores to False and add documentation about the parameters. The rationale behind this change is two-fold:

  1. The setup is not really common for the large audience and the user can be surprised by the loss magnitude. Also, if the user use his own dataset without normalizing the teacher scores, it could be hurting the performance.
  2. JinaColBERT-v2 had mitigated results using normalization, so I am not sure it is worth it to make it the default.

Before merging, there is two things that needs to be discussed:

  1. The datasets we have released have normalized scores, which could make the boilerplate a bit off.
  2. When building the functionality, I decoupled the normalization of the output scores and the teachers' to offload part of the computation pre-training as it would be re-usable. But now that I think about it again, it might be more painful for the user and we could add the normalization of the teacher scores during the training aswell.

Related issue: https://github.com/lightonai/pylate/issues/59