CoolFace
Modelpublic

zhiqian99/Qwen3-Reranker-0.6B-GGUF-llama_cpp

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
0likes238downloads
Model Card

Qwen3-Reranker-0.6B — GGUF (llama.cpp)

Working GGUF of Qwen/Qwen3-Reranker-0.6B for llama.cpp. Converted 2025-03-09 with the official convert_hf_to_gguf.py.

Other sizes: 0.6B (this) · 4B · 8B

Quantization quality comparison (Qwen3-Reranker-0.6B)

Benchmarked on MTEB AskUbuntuDupQuestions (361 queries) via llama-server /v1/rerank on RTX 3090. All quants produced from the same F16 source using llama-quantize.

QuantSizeNDCG@10MAP@10MRR@10Δ NDCG@10
F161.12 GB0.66880.51430.7317baseline
Q8_00.60 GB0.66770.51430.7329-0.2%
Q6_K0.46 GB0.66910.51560.7353+0.0%
Q5KM0.41 GB0.66710.51380.7377-0.3%
Q5_00.41 GB0.66780.51180.7423-0.2%
Q4KM0.37 GB0.66690.51200.7345-0.3%
Q4_00.36 GB0.65560.50100.7211-2.0%
Q3KM0.32 GB0.65510.50040.7354-2.1%
Q2_K0.28 GB0.47700.31040.5668-28.7%

Takeaway: Q4KM (0.37 GB) is the sweet spot for 0.6B — 3x smaller than F16 with only 0.3% quality loss. Below Q4KM, quality starts to degrade: Q40 and Q3KM drop ~2%, and Q2K is unusable (-28.7%). Smaller models are more sensitive to quantization than larger ones.

Does it work?

Yes. Most community GGUFs of Qwen3-Reranker produce garbage scores (4.5e-23) because they're missing reranker-specific tensors. See llama.cpp #16407. This one works:

Doc 0 (relevant):   relevance_score = 0.98XX
Doc 1 (irrelevant): relevance_score = 0.00XX

Quick start

bash
llama-server -m Qwen3-Reranker-0.6B-f16.gguf --reranking --pooling rank --embedding --port 8081
bash
curl http://localhost:8081/v1/rerank \
  -H "Content-Type: application/json" \
  -d '{
    "query": "employment termination notice period",
    "documents": [
      "The Labour Code requires 30 calendar days written notice.",
      "Corporate tax rates for small enterprises."
    ]
  }'

Use `/v1/rerank`, not /v1/embeddings. The embeddings endpoint returns zeros for reranker models.

What's different about this GGUF?

The official convert_hf_to_gguf.py detects Qwen3-Reranker and does things naive converters skip:

  • Extracts cls.output.weight (the yes/no classifier) from lm_head
  • Sets pooling_type = RANK metadata
  • Bakes in the rerank chat template
  • Sets classifier.output_labels = ["yes", "no"]

Without these, llama-server has nothing to compute scores from.

models.ini example

ini
[Qwen3-Reranker-0.6B-f16]
model = /path/to/Qwen3-Reranker-0.6B-f16.gguf
reranking = true
pooling = rank
embedding = true
ctx-size = 32768

For a full multi-model setup guide (embedding + reranking + chat on one server), see the [llama-server Qwen3 guide](https://gist.github.com/VooDisss/42bce4eb5c76d3c325633886c5e348ee).

Convert it yourself

bash
pip install huggingface_hub gguf torch safetensors sentencepiece
python -c "from huggingface_hub import snapshot_download; snapshot_download('Qwen/Qwen3-Reranker-0.6B', local_dir='Qwen3-Reranker-0.6B-src')"
python convert_hf_to_gguf.py --outtype f16 --outfile Qwen3-Reranker-0.6B-f16.gguf Qwen3-Reranker-0.6B-src/

License

Apache 2.0 — same as the original model.