Qwen_reranker#162
Merged
Merged
Conversation
…d signature - Introduced a new `compute_scores` method in the `Reranker` class to calculate scores for given queries and documents. - Updated the `from_pretrained` method signature to include an optional `path_in_repo` parameter for model loading. - Added a new `qwen3` module for handling specific model computations. - Enhanced the `reranker` module to support dynamic model type handling during score computation. - Updated example usage in `reranker.rs` to demonstrate the new functionality.
- Changed the model in `reranker.rs` to "zhiqing/Qwen3-Reranker-0.6B-ONNX" for improved performance. - Refactored score computation in `model.rs` to simplify handling of Qwen3 model type. - Introduced a check for model type at the beginning of the score computation process to enhance clarity and maintainability. - Updated logic to conditionally format query and document pairs based on the model type, improving code readability.
…improve model type check - Added an optional `path_in_repo` parameter to the `__init__` and `from_pretrained` methods of the `Reranker` class for enhanced model loading flexibility. - Refactored the model type check in `model.rs` to use `is_some_and` for improved clarity and performance.
sonam-pankaj95
approved these changes
Jul 27, 2025
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.
path_in_repoparameter to the__init__andfrom_pretrainedmethods of theRerankerclass for enhanced model loading flexibility.model.rsto useis_some_andfor improved clarity and performance.