Skip to content

Improve efficiency in factual correctness for precision mode #1578

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

Conversation

Jeff-67
Copy link
Contributor

@Jeff-67 Jeff-67 commented Oct 25, 2024

Description

This pull request optimizes the _single_turn_ascore function by conditionally skipping unnecessary computations when the mode is set to "precision." Previously, the function calculated response_reference regardless of the scoring mode, which consumed resources and potentially increased processing costs. By avoiding the response_reference calculation in "precision" mode, this update aims to enhance speed and reduce computational expenses.

Changes Made

  • Modified _single_turn_ascore function:
    • Conditionally calculated response_reference: The response_reference is now computed only when the mode is not "precision."

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 25, 2024
@jjmachan jjmachan requested a review from shahules786 October 25, 2024 09:56
Copy link
Member

@shahules786 shahules786 left a comment

Choose a reason for hiding this comment

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

Nice catch, thanks for the contribution.

@shahules786 shahules786 merged commit fd5e805 into explodinggradients:main Oct 25, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants