OpenConceptLab/ocl_issues#2601 | Qwen model logit score and LRU cache#889
Open
snyaggarwal wants to merge 1 commit into
Open
OpenConceptLab/ocl_issues#2601 | Qwen model logit score and LRU cache#889snyaggarwal wants to merge 1 commit into
snyaggarwal wants to merge 1 commit into
Conversation
filiperochalopes
left a comment
Contributor
There was a problem hiding this comment.
RERANKER_SCORE_PROFILES could work as a router for what function to use to normalize the score 0-1. Use Qwen/ looks too specific. But works
| def _get_activation_fn(self): | ||
| """Return the score activation required by the configured reranker model.""" | ||
| model_name = self.model_name or self.default_model | ||
| if isinstance(model_name, str) and model_name.startswith(self.QWEN_RERANKER_PREFIX): |
Contributor
There was a problem hiding this comment.
For me this approach is too hardcoded, maybe its interesting to do somethins like:
RERANKER_SCORE_PROFILES = {
"Qwen/": "logit_sigmoid",
"BAAI/bge-reranker": "logit_sigmoid",
"cross-encoder/ms-marco-": "raw_rank_score",
"ncbi/MedCPT-Cross-Encoder": "logit_sigmoid",
}
But it also could be too YAGNI, so let's hear @paynejd thoughts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Closes OpenConceptLab/ocl_issues#2601