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

Rerank scorer: опция для выбора источника для расчета вектора вероятностей #115

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Dmitryv-2024
Copy link
Collaborator

Считать вектор на основе данных из kNN или из CrossEncoder.

@Dmitryv-2024 Dmitryv-2024 requested a review from voorhs February 2, 2025 15:37
voorhs
voorhs previously approved these changes Feb 3, 2025
@voorhs voorhs dismissed their stale review February 3, 2025 08:48

не подумал про масштаб скоров из кросс энкодера

Comment on lines +168 to +170
if self.use_crosencoder_scores:
distances.append([rank["score"] for rank in cur_ranks])
else:
Copy link
Collaborator

@voorhs voorhs Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

надо посмотреть на масштаб скоров которые выходят из кросс-энкодера

дело в том что скоры из векторного индекса это значения косинуса (т.е. [-1,+1]), а в кросс-энкодере по-моему выдаются логиты (т.е. (-infty, +infty)) либо вероятности (т.е. [0,1]).

в общем надо в классе Ranker посмотреть на метод rank и сделать так чтобы

  • всегда выдавалось [-1,1]
  • либо чтобы можно было выбирать между [-1,1] и [0,1]

но сырые логиты точно не нужно выдавать

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