Skip to content

Conversation

@mkhludnev
Copy link
Contributor

Description

This PR fixes #6700

Notes for Reviewers

Signed commits

  • [v] Yes, I signed my commits.

@netlify
Copy link

netlify bot commented Nov 2, 2025

Deploy Preview for localai ready!

Name Link
🔨 Latest commit f638a2c
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/690c5cac56835b0009f40194
😎 Deploy Preview https://deploy-preview-7025--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mkhludnev mkhludnev force-pushed the rerank-ignores-top_n branch from 61ee6b4 to 51d6347 Compare November 3, 2025 10:35
@mkhludnev mkhludnev changed the title reranker: reproduce ignoring top_n fix(reranker): reproduce ignoring top_n Nov 3, 2025
Signed-off-by: Mikhail Khludnev <[email protected]>
@mkhludnev mkhludnev marked this pull request as ready for review November 5, 2025 08:54
@mkhludnev
Copy link
Contributor Author

presumably it might be fixed for llama_cpp rerank as well, if @mudler consider it necessary.

@mudler
Copy link
Owner

mudler commented Nov 6, 2025

Hey, thanks for looking at this!

presumably it might be fixed for llama_cpp rerank as well, if @mudler consider it necessary.

I think for llama.cpp we should be covered already, as top_k/top_p settings are already propagated for the chat (and rerankers follows along the same reasoning):

data["top_k"] = predict->topk();

Unless you noticed something off!

@mudler mudler enabled auto-merge (squash) November 6, 2025 08:30
@mudler mudler changed the title fix(reranker): reproduce ignoring top_n fix(reranker): respect top_n in the request Nov 6, 2025
@mudler mudler merged commit 122e4c7 into mudler:master Nov 6, 2025
32 checks passed
@mkhludnev
Copy link
Contributor Author

I just realized that the most users don't pass top_n at all. So, this PR cause a trouble for them. Here's the fix #7199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python Reranker ignores top_n

2 participants