-
Notifications
You must be signed in to change notification settings - Fork 487
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
ENH: add normalize to rerank model #2509
Conversation
If normalize, what's the result? |
The structure of the result is the same, except that the values are normalized to be between 0 and 1 The corresponding implementation in FlagEmbedding is as follows
|
OK, looks like this will not effect the result, but I don't know if this will cause any side effect. @codingl2k1 What's your opinion? |
This will be a breaking change. Since FlagEmbedding sets normalize to False by default, how about we keep normalize set to False by default and allow users to set normalize in kwargs? |
OK, @hustyichi What's your idea? is it possible to add kwargs to rerank and allow setting normalize to True? |
This is a good idea, but requires more code |
I added the always_normalize option, which is not enabled by default |
I refined the code to pass kwargs instead of the always_normalize option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The current Rerank model return value is not normalized. FlagEmbedding provides a normalization option. It is recommended to return the normalized value.