[PR #11328] Add reranking in new engine (ollamarunner) #13508

Open
opened 2026-04-13 00:29:08 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/11328

State: open
Merged: No


Implements reranking: https://github.com/ollama/ollama/issues/3368
Implemented reranking in the new engine (ollamarunner), based on https://github.com/ollama/ollama/pull/11156

I tested it with this model: fanyx/Qwen3-Reranker-0.6B-Q8_0
With Modelfile:

FROM fanyx/Qwen3-Reranker-0.6B-Q8_0

TEMPLATE """[BOS]{{ .Query }}[EOS][SEP]{{ .Document }}[EOS]"""

And environment variable OLLAMA_NEW_ENGINE=1

However, it did not work with dengcao/Qwen3-Reranker-0.6B:Q8_0 (I got all zero output logits), maybe there are differences between the models that I'm not aware of, as mentioned by @halfcrazy..

I also did not find any other reranking models supported by the new engine (most seem based on bert which is not yet supported)

Looking forward to receive feedback.

**Original Pull Request:** https://github.com/ollama/ollama/pull/11328 **State:** open **Merged:** No --- Implements reranking: https://github.com/ollama/ollama/issues/3368 Implemented reranking in the new engine (ollamarunner), based on https://github.com/ollama/ollama/pull/11156 I tested it with this model: `fanyx/Qwen3-Reranker-0.6B-Q8_0` With Modelfile: ``` FROM fanyx/Qwen3-Reranker-0.6B-Q8_0 TEMPLATE """[BOS]{{ .Query }}[EOS][SEP]{{ .Document }}[EOS]""" ``` And environment variable `OLLAMA_NEW_ENGINE=1` However, it did not work with `dengcao/Qwen3-Reranker-0.6B:Q8_0 ` (I got all zero output logits), maybe there are differences between the models that I'm not aware of, as mentioned by [@halfcrazy.](https://github.com/ollama/ollama/pull/11156#issuecomment-3018589644). I also did not find any other reranking models supported by the new engine (most seem based on bert which is not yet supported) Looking forward to receive feedback.
GiteaMirror added the pull-request label 2026-04-13 00:29:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13508