Skip to content

Conversation

@yuanjua
Copy link

@yuanjua yuanjua commented May 7, 2025

This commit adds default reranker presets for the following models:

  • bge-reranker-v2-m3 (most frequently downloaded reranker model)
  • jina-reranker-v1-turbo-en (is provided by ggml-org on their huggingface repository)

Example: Running a server with bge-reranker-v2-m3 for reranking:

./build/bin/llama-server --rerank-bge-v2-m3-default

Inputing this example from jina-reranker-v2-base-multilingual returns a JSON response with the scores

curl -X POST http://127.0.0.1:8080/v1/rerank \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Organic skincare products for sensitive skin",
    "documents": [
    "Organic skincare for sensitive skin with aloe vera and chamomile.",
    "New makeup trends focus on bold colors and innovative techniques",
    "Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille",
    "Neue Make-up-Trends setzen auf kräftige Farben und innovative Techniken",
    "Cuidado de la piel orgánico para piel sensible con aloe vera y manzanilla",
    "Las nuevas tendencias de maquillaje se centran en colores vivos y técnicas innovadoras",
    "针对敏感肌专门设计的天然有机护肤产品",
    "新的化妆趋势注重鲜艳的颜色和创新的技巧",
    "敏感肌のために特別に設計された天然有機スキンケア製品",
    "新しいメイクのトレンドは鮮やかな色と革新的な技術に焦点を当てています"
  ]
  }'
{"model":"gpt-3.5-turbo","object":"list","usage":{"prompt_tokens":265,"total_tokens":265},"results":
[{"index":0,"relevance_score":4.414063453674316},{"index":1,"relevance_score":-11.041223526000977},
{"index":2,"relevance_score":1.0591806173324585},{"index":3,"relevance_score":-11.04470157623291},
{"index":4,"relevance_score":3.870026111602783},{"index":5,"relevance_score":-11.040743827819824},
{"index":6,"relevance_score":5.819011688232422},{"index":7,"relevance_score":-11.039907455444336},
{"index":8,"relevance_score":6.67466926574707},{"index":9,"relevance_score":-11.036961555480957}]}%

Refs: #10932

{"--rerank-bge-v2-m3-default"},
string_format("use default bge-reranker-v2-m3 (note: can download weights from the internet)"),
[](common_params & params) {
params.model.hf_repo = "gpustack/bge-reranker-v2-m3-GGUF";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should host this model in ggml-org. I'll make a copy when GGUF My Repo is back online.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should host this model in ggml-org. I'll make a copy when GGUF My Repo is back online.

it is now back online

srogmann added a commit to srogmann/llama.cpp that referenced this pull request Sep 11, 2025
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.

2 participants