Views
No views yet
mmproj provides
the vision tower). The HF pipeline_tag is set to text-ranking only because
that is the closest value in HF's fixed pipeline vocabulary — there is no
dedicated multimodal-ranking tag — and it matches the upstream model's tag.yes vs no at the final position. The
official convert_hf_to_gguf.py bakes that behaviour into a 2-class
rank-pooling head, so at inference llama.cpp softmaxes the [yes, no] logits
and returns relevance_score = P("yes") ∈ [0, 1].cls.output.weight),
the pooling_type = RANK metadata, and the baked rerank chat template. Loaded
with --pooling rank they don't error; they silently emit meaningless,
near-constant scores.| Marker | Value |
|---|---|
qwen3vl.pooling_type | 4 (RANK) |
qwen3vl.classifier.output_labels | ["yes", "no"] |
cls.output.weight tensor | shape (2048, 2) |
tokenizer.chat_template.rerank | baked {query}/{document} template |
| File | Size | Purpose |
|---|---|---|
Qwen3-VL-Reranker-2B.f16.gguf | 3.4 GB | Language model + rank head (f16). Required. |
Qwen3-VL-Reranker-2B.mmproj-f16.gguf | 822 MB | Vision projector (f16). Optional — only for image / multimodal document reranking. |
llama-server in reranking mode and call the /v1/rerank endpoint:1llama-server -m Qwen3-VL-Reranker-2B.f16.gguf \
2 --reranking --pooling rank -ngl 99 --port 80801curl http://localhost:8080/v1/rerank -H 'Content-Type: application/json' -d '{
2 "query": "What is the capital of France?",
3 "documents": [
4 "Paris is the capital and most populous city of France.",
5 "Bananas are a yellow tropical fruit rich in potassium.",
6 "The Eiffel Tower is a famous landmark located in Paris, France."
7 ]
8}'relevance_score (descending). All three
of --reranking, --pooling rank, and a GPU offload (-ngl) are recommended;
without --reranking the server replies "This server does not support
reranking".Multimodal note: themmprojfile enables reranking documents that contain images, via mtmd-aware runtimes. llama.cpp's stock/v1/rerankendpoint is text-only today; image-document reranking requires an mtmd pipeline that feeds the projector and reads the rank score from the pooled output.
Given a web search query, retrieve relevant passages that answer the query
llama-server --reranking --pooling rank:Query: "What is the capital of France?"
0.733 Paris is the capital ... of France (relevant)
0.514 The Eiffel Tower ... in Paris, France (related)
0.270 Bananas are a yellow ... fruit (irrelevant)
Query: "How do I reverse a string in Python?"
0.706 ... my_string[::-1] ... reverse order (relevant)
0.691 Use slicing with a step of -1 ... (relevant)
0.233 The mitochondria is the powerhouse ... (irrelevant)convert_hf_to_gguf.py,
which auto-detects the Qwen3-VL reranker and extracts the yes/no rows of the
LM head into cls.output.weight:1python convert_hf_to_gguf.py Qwen3-VL-Reranker-2B --outtype f16 \
2 --outfile Qwen3-VL-Reranker-2B.f16.gguf
3python convert_hf_to_gguf.py Qwen3-VL-Reranker-2B --mmproj \
4 --outfile Qwen3-VL-Reranker-2B.mmproj-f16.gguf