Repository navigation
fix(rerank): read ModernBERT classification scores - #390
Merged
jjang-ai merged 1 commit intoNov 21, 2026
Merged
Conversation
Contributor
Author
|
@jjang-ai, Could you review my reranker fix and approve the pending CI workflow when you have time? |
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.
Addresses the reranker failure in #388.
mlx-embeddingsreturns ModernBERT classification scores inpooler_output. The reranker treated the output wrapper as an array and raisedAttributeError. I read the classification output, preserve its activation and the existing score formats, and reject architectures whose backend returns embeddings instead of classification scores.All 17 focused tests pass. The real
hindsight-ai/hs-rerank-1endpoint returns HTTP 200 and ranks the relevant document first; unchanged main returns HTTP 500. The checks cover regression, binary and two-class scores, unsupported architectures, document serialization andtop_n.The full engine suite has 19,367 passes and the same 69 failures as unchanged main (19,355 passes). Both runs have 646 skips and 33 xfails. Full-tree formatting and type-check results match base; the changed code passes formatting.
cc @jjang-ai