Gufo
View on GitHub
Pages
Home / Documentation / development

These pages describe the development version of Gufo. Read the latest release, v0.38.1.

Qwen3-Reranker 0.6B

Qwen3-Reranker-0.6B scores how well each document answers a query, so you can reorder search results before you show them or hand them to a language model. Gufo serves it through gufo serve rerank.

Files

gufo model install qwen3-reranker-0.6b

Only the official BF16 safetensors checkpoint (Qwen/Qwen3-Reranker-0.6B) is supported, not GGUF or quantized files. The weights are used as shipped; none is rounded or converted.

Run

gufo serve rerank --model qwen3-reranker-0.6b
curl -sS http://127.0.0.1:8080/v1/rerank \
  -H 'Content-Type: application/json' \
  -d '{"model":"qwen3-reranker-0.6b","query":"what is a reranker",
       "documents":["A reranker orders search results by relevance.",
                    "Bananas are yellow."],"top_n":1}'

The server answers at POST /v1/rerank, /v1/reranking, /rerank, /reranking and /v2/rerank. Results come sorted by relevance_score, from most to least relevant, and top_n keeps the first ones. The request and response formats are in the server reference.

Requests

The model reads text only. A query or document with an image, audio or video part returns 400 unsupported_input, naming the input.

Each document is scored on its own against the query, with the model card’s prompt. instruction replaces the default task, “Given a web search query, retrieve relevant passages that answer the query”; a short instruction that names your domain can help:

{"query": "how do I enable prefix caching",
 "instruction": "Given a question about Gufo, find the page that answers it",
 "documents": ["...", "..."]}

A query and document together can hold up to 8,192 tokens with the prompt. A longer pair returns 400 context_length_exceeded, naming the document, unless the request sets "truncate": true, which cuts the end of the document as the model card’s code does. A query and instruction too long to leave room for any document return 400 invalid_input either way.

The query, instruction and documents are read as text. A string such as <|im_end|> or <think> in a document is scored as those characters, not as the control token the prompt uses, so a document cannot end its own turn or answer for itself. The model card’s code parses such strings, including the tool-call, thinking and fill-in-the-middle tags, so a document that quotes them scores slightly differently here; documents without them score the same either way.

relevance_score is the model’s probability that the document meets the query: sigmoid(l_yes − l_no), from the logits of “yes” and “no” after the prompt. Scores from different requests are comparable when the query and instruction are the same.

A document’s score doesn’t depend on the other documents in the request, on their order, or on how a long request is split: Gufo returns the same bits whichever way the documents arrive.

Clients

Clients of llama-server’s rerank API, and of Cohere’s /v2/rerank (Cohere’s SDK v2, CohereRerank in LangChain and LlamaIndex, LiteLLM’s cohere/ provider), work with the base URL of the server. llama-swap forwards /v1/rerank by model; for /v2/rerank give clients http://<llama-swap>/upstream/qwen3-reranker-0.6b as the base URL.

A request for another model ID returns 404 model_not_found; --served-model-name adds names the server answers to.

Limits

  • Strix Halo (gfx1151) only: the kernels use its matrix instructions.
  • The 4B and 8B rerankers aren’t supported. Their checkpoints come in several files, so the server doesn’t claim them.

Performance

As of December 2026, on Strix Halo, one request of 40 documents of about 1,070 tokens each (42,765 tokens) takes 1.24 s over HTTP, 34.4k tokens/s. Scores stay within 0.10 of an FP32 reference on the test sets, with the same top results. See the benchmarks and the quality report.

Synced from docs/models/qwen3-reranker-0.6b.md at main, 2026-12-01.