Workflows/Improve local search with Qwen3 Reranker
Text / WORKFLOW
Improve local search with Qwen3 Reranker
Compare the same search candidates before and after reranking. Use a supplied example or upload the results from your private document search, then export the improved order.
EstimatedSource checked 9/29/2026
LOCAL
Freshness 14 out of 100. Repository age: 504 days old, May 29, 2025. Measures age, not quality.14/ 100Freshness504 days oldRepository age · May 29, 2025
Popularity 81 out of 100. 1,608,348 downloads in 30 days; 416 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.81/ 100Popularity1.6M downloads / 30d416 lifetime likes · Checked Oct 15, 2026
What do these scores mean?+
Two ways to compare models. Neither score measures answer quality, benchmark performance, or whether a model fits your machine.
Freshness · release age
A new release starts at 100. The score halves every 180 days: 100 × 2^(−age in days / 180). When the release date is unavailable, a repository date is a fallback—not proof of when the model was released. Missing dates stay unscored.
Downloads over the past 30 days carry 80% of the score; lifetime likes carry 20%. Both use a logarithmic scale, capped at 10 million downloads and 100,000 likes. If likes are unavailable, downloads carry all the weight. Missing download statistics stay unscored.
Scores as of Oct 15, 2026. Statistics checked Oct 15, 2026. Statistics are marked for refresh after 72 hours.Full scoring method →
Before you begin
Hardware
Conservative starting points for this small CPU-first app. GPU memory is not required; the listed memory is system/unified RAM.
Machine
Qwen3 Reranker 0.6B
NVIDIA PC · 8 GB RAM
Runs on CPU; 16 GB RAM gives more room for other apps
AMD PC · 8 GB RAM
Runs on CPU; no ROCm or Vulkan dependency
Intel PC · 8 GB RAM
Runs on CPU; an Arc GPU is not required
Apple Silicon · 8 GB unified memory
Runs on CPU; 16 GB unified memory gives more headroom
CPU only · 8 GB RAM
Suitable for the supplied small collection; larger batches use more memory
These are memory estimates for short passages and one local user, not speed measurements. The guide uses CPU on every OS for a consistent first run.
Context window
Machine
Qwen3 Reranker 0.6B
CPU / Apple Silicon · 8–16 GB RAM
Start at 2,048 tokens per query + passage; batch size 1
Long candidates are truncated at the tokenizer limit. Use the short overlapping passages from the search workflow so the answer stays inside the scored input.
LOCAL SEARCH RERANKINGSOURCE-LINKED SETUP
Improve local search with Qwen3 Reranker
Compare the same search candidates before and after reranking. Use a supplied example or upload the results from your private document search, then export the improved order.
Choose a package Run its commands Check the result
01
BEFORE YOU BEGIN
The documented package
This setup uses the package documented for this task. Review its source and supported platforms before starting.
Save your machine in My Hardware to get an automatic starting choice. You can always choose any package yourself.
CURRENT SETUP
Qwen3 Reranker 0.6B · official
Start at 2,048 tokens per pair and batch 1. More tokens or a larger batch raises RAM use.
Freshness 14 out of 100. Repository age: 504 days old, May 29, 2025. Measures age, not quality.14/ 100Freshness504 days oldRepository age · May 29, 2025
Popularity 81 out of 100. 1,608,348 downloads in 30 days; 416 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.81/ 100Popularity1.6M downloads / 30d416 lifetime likes · Checked Oct 15, 2026
What do these scores mean?+
Two ways to compare models. Neither score measures answer quality, benchmark performance, or whether a model fits your machine.
Freshness · release age
A new release starts at 100. The score halves every 180 days: 100 × 2^(−age in days / 180). When the release date is unavailable, a repository date is a fallback—not proof of when the model was released. Missing dates stay unscored.
Downloads over the past 30 days carry 80% of the score; lifetime likes carry 20%. Both use a logarithmic scale, capped at 10 million downloads and 100,000 likes. If likes are unavailable, downloads carry all the weight. Missing download statistics stay unscored.
Choose where you want to run it. The instructions below update to match your selection.
CHOOSE YOUR SETUPWindows
Native CPU inference. The browser is the same on each OS; project paths and Python executables differ.
01
Install uv · PowerShell
Install uv from its official instructions, then open a new PowerShell window. The commands below create an isolated Python 3.11 environment; there is no need to change your system Python.
Use a new folder named yourunai-rerank in your home directory. These commands run in PowerShell. This starter deliberately uses CPU inference: its small model works with NVIDIA, AMD, Intel, Apple or no GPU. No CUDA installation is needed. Leave this window in the project folder for the remaining commands.
Right-click the download link below and choose Save Link As. Save the .py file directly in the project folder created above; keep its .py extension, not .txt. This complete YouRunAI starter creates the browser interface and output folders. You can inspect it in a text editor. Model weights download separately when the runtime needs them.
Run this in PowerShell, leave it open, and open http://127.0.0.1:7861 after the weights finish downloading. Port 7861 lets this app run beside the document-search example.
.\.venv\Scripts\python.exe rerank-results.py
05
Rerank the supplied example
Leave the upload empty and click Rerank results. The sample asks how to return an item, with shipping, returns and support passages in an intentionally unhelpful initial order. Compare the Before and After tables; the return policy should move above unrelated opening hours.
06
Use your real search candidates
In the document-search app, run a query and download candidates.json. Upload that file here and click Rerank results. The file must contain a query string and 1–20 candidates, each with text and an optional file name. Reranking can reorder those candidates but cannot recover a relevant document the first search never found.
07
Compare and save the ranking
Read the top passage and confirm it answers the query. Check its Before rank against its new position; good candidates may already have been first. Download reranked.json and find the same file in outputs/reranked.json. Scores are relative relevance logits, not percentages. Keep the query with the ranked passages if you pass them to a local assistant.
08
Stop and return to the same project later
Press Ctrl+C in the running PowerShell window to stop the app. Your files stay in yourunai-rerank. Next time run the commands below, then reopen http://127.0.0.1:7861. Dependencies and downloaded weights are reused. Keep this address local; there is no public sharing link.
The after table and saved JSON contain the original filenames/passages, their old ranks, and new relevance scores. You can compare the order rather than trusting an unexplained score.
Keep the Python process open and wait until it prints the local URL. If another app uses that port, stop that app or run these examples one at a time.
The first launch appears slow
The first run downloads the publisher model to the Hugging Face cache. Watch the Terminal/PowerShell progress and allow the download to finish; later starts reuse it.
A dependency is missing
Run the installation command from this guide again in the project folder. Launch with the .venv Python path shown here so you use the same environment.
The model runs out of memory
Close memory-heavy apps and other models. Keep the supplied short input limits and batch size. The small-model CPU route needs system RAM, not GPU VRAM.
Upload rejected
Use candidates.json from the search guide, not vectors.npy or passages.json. It needs a nonempty query and 1–20 candidate objects, each containing a nonempty text field.
The answer is still missing
Improve the initial retrieval query or include more candidate passages first. The reranker only reorders the candidate set you gave it.
REFERENCE LIBRARY
Sources and files
Original instructions, model files, and compatibility notes behind this setup.