Instructions to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0 # Run inference directly in the terminal: llama cli -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0 # Run inference directly in the terminal: llama cli -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Use Docker
docker model run hf.co/cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
- LM Studio
- Jan
- Ollama
How to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with Ollama:
ollama run hf.co/cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
- Unsloth Studio
How to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed to start chatting
- Pi
How to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with Docker Model Runner:
docker model run hf.co/cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
- Lemonade
How to use cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cicaba/Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed:Q8_0
Run and chat with the model
lemonade run user.Qwen3-Reranker-0.6B-GGUF-llamacpp-fixed-Q8_0
List all available models
lemonade list
Qwen3-Reranker-0.6B GGUF — llama.cpp Reranking Fix
这是从官方 Qwen/Qwen3-Reranker-0.6B 重新转换的 llama.cpp GGUF。
本仓库解决了部分早期或通用 GGUF 转换在 llama.cpp /v1/rerank 中无法正确评分的问题:接口虽然能够调用,但所有文档的分数都接近零,显示为 0.0000,甚至产生错误排序。
This repository contains freshly converted llama.cpp GGUF files for Qwen/Qwen3-Reranker-0.6B. It fixes a failure found in some older or generic conversions where /v1/rerank returned near-zero scores and incorrect rankings.
文件 / Files
| 文件 | 格式 | 大小 | SHA-256 |
|---|---|---|---|
Qwen3-Reranker-0.6B-fixed-f16.gguf |
F16 | 1,197,634,272 bytes | 15e38d12462f56791bed44d97bad3880028d6fccebe99db0498c9e613f4aaf1f |
Qwen3-Reranker-0.6B-fixed-Q8_0.gguf |
Q8_0 | 639,153,312 bytes | 99bcc225f0a38b73059b31627d28131cbea9c11b7ca894e56b95621aac878d65 |
Q8_0 由本仓库的 F16 GGUF 使用同一份 llama.cpp 构建中的 llama-quantize 生成。
为什么需要重新转换
Qwen3-Reranker 不是普通的文本生成模型。它需要把 Query 与 Document 按 reranker 格式组成输入,并在最后位置比较 yes / no 分类输出,得到 0~1 的相关性分数。
部分较早的 GGUF 或通用转换没有正确保留或生成 llama.cpp reranking 所需的分类输出头与元数据。典型症状包括:
/v1/rerank可以返回 HTTP 200,但全部分数接近0;- 客户端保留四位小数后,所有文档都显示为
0.0000; - 相关文档不能排在第一位;
- GGUF 加载后表现得像普通 Qwen3 对话模型,而不是 reranker。
旧转换的实际测试示例:
| 文档 | 原始分数 | 排名 |
|---|---|---|
| 显卡用于图形和并行计算(不相关) | 2.5976477777611348e-14 |
1 |
| 熊猫生活在中国并以竹子为食(相关) | 1.755434294906939e-19 |
2 |
| 法国首都是巴黎(不相关) | 5.623200945999332e-20 |
3 |
虽然这些值并非数学意义上的精确零,但对实际检索完全失效,而且排序错误。
重新转换的目的,是使用较新的 llama.cpp 转换逻辑,正确处理 reranker 所需的分类输出和 rank pooling 元数据,包括 llama.cpp 用于计算相关性分数的分类头。
修复后实测
测试环境:
- GPU:NVIDIA Tesla P100 PCIe 16GB
- llama.cpp:build
b9879/ commit72874f559 - 模型:
Qwen3-Reranker-0.6B-fixed-Q8_0.gguf - API:llama-server
/v1/rerank
测试 Query:
什么是熊猫?
结果:
| 文档 | relevance_score | 排名 |
|---|---|---|
| 熊猫是一种生活在中国、主要吃竹子的熊科动物。 | 0.9938316345 |
1 |
| 显卡用于计算机图形和并行计算。 | 0.0017781574 |
2 |
| 法国的首都是巴黎。 | 0.0003044957 |
3 |
修复后的模型能够给相关文档高分、给不相关文档低分,并产生正确排序。
llama-server 启动示例
llama-server \
-m ./Qwen3-Reranker-0.6B-fixed-Q8_0.gguf \
--alias Qwen3-Reranker-0.6B \
--host 0.0.0.0 \
--port 8092 \
-ngl 999 \
-c 20480 \
-np 1 \
-b 2048 \
-ub 1024 \
--embedding \
--pooling rank \
--reranking \
--flash-attn on
三个关键参数:
--reranking:启用/rerank、/v1/rerank等 reranking API;--embedding:启用内部特征输出,而不是普通文本生成;--pooling rank:使用分类输出计算每个 Query/Document 对的相关性分数。
API 调用示例
curl http://127.0.0.1:8092/v1/rerank \
-H 'Content-Type: application/json' \
-d '{
"model": "Qwen3-Reranker-0.6B",
"query": "什么是熊猫?",
"top_n": 3,
"documents": [
"熊猫是一种生活在中国、主要吃竹子的熊科动物。",
"法国的首都是巴黎。",
"显卡用于计算机图形和并行计算。"
]
}'
请使用 /v1/rerank,不要把该模型当作普通 embedding 模型调用 /v1/embeddings。
转换来源与过程
原始 Transformers 权重来自:
- ModelScope: Qwen/Qwen3-Reranker-0.6B
- Hugging Face: Qwen/Qwen3-Reranker-0.6B
转换过程:
python3 convert_hf_to_gguf.py \
/path/to/Qwen3-Reranker-0.6B \
--outtype f16 \
--outfile Qwen3-Reranker-0.6B-fixed-f16.gguf
llama-quantize \
Qwen3-Reranker-0.6B-fixed-f16.gguf \
Qwen3-Reranker-0.6B-fixed-Q8_0.gguf \
Q8_0
兼容性与限制
- 建议使用较新的 llama.cpp;
- 这是 cross-encoder reranker,不是向量 embedding 模型;
- Q8_0 更节省磁盘和显存,F16 适合作为高精度参考或继续量化;
- 最长输入受 llama-server
--ctx-size和模型上下文限制; - 实际效果仍取决于检索任务、Query、Document 切分方式与指令。
License and attribution
The original model is released under the Apache License 2.0. This conversion keeps the same license and is not an official release by the Qwen team.
感谢 Qwen 团队与 llama.cpp 社区。本仓库仅发布格式转换与验证结果,不修改原模型训练权重所表达的能力。
- Downloads last month
- 99
8-bit
16-bit