Qwen
Qwen3-Reranker-4B
4B parameters · reasoning · Base · Qwen3 family
Recommended download
Which version should I download?
Default pick: safetensors · BF16 — Full-precision BF16 source weights — the reference reranker (sentence-transformers / vLLM / TEI / llama.cpp).
Set your rig to confirm it fits and to see if a higher-quality quant runs fully on your hardware.
| Format | Level | Size | Verdict | Est. speed | Quality note | Swarm | Download |
|---|---|---|---|---|---|---|---|
| safetensors | BF16 | 7.49 GB | Set your rig | — | Full-precision BF16 source weights — the reference reranker (sentence-transformers / vLLM / TEI / llama.cpp). | 2S / 0L webseed OK |
safetensors · BF16
7.49 GB
- Est. speed
- —
- Swarm
- 2S / 0L webseed OK
Full-precision BF16 source weights — the reference reranker (sentence-transformers / vLLM / TEI / llama.cpp).
Want a different quant? Request it on the board →
Runs fully on
Green = the model's best quant fits fully in GPU/unified memory at 8K context. Tap a card for its full "what runs on it" page.
Context
Advertised 40k · no independent evidence yet
No independent long-context evidence has been graded for this model yet — the advertised window above is the maintainer's number, not a usable-context claim.
Run it
Runtime completeness (BF16 torrent): llama.cpp – Ollama – vision sidecar –
- – llama.cpp — no GGUF artifact for this torrent
- – Ollama — not an Ollama-native artifact
- – vision sidecar — not a vision model
Context / KV 8,192 tokens · FP16 set above the quant table
Generic commands (no rig set). GPU-offload values assume the model fits on your GPU — set your rig for values tuned to your hardware.
llama.cpp loads GGUF files only; this quant is a safetensors build.
Safetensors weights run under vLLM or transformers; a GGUF conversion, if one exists, is a separate quant row.
Ollama runs GGUF builds only; this quant is a safetensors build.
Safetensors weights run under vLLM or transformers; a GGUF conversion, if one exists, is a separate quant row.
vllm serve Qwen/Qwen3-Reranker-4B --max-model-len 8192
Serves on http://localhost:8000/v1 by default.
pip install transformers accelerate torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Qwen/Qwen3-Reranker-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype="auto",
device_map="auto",
)
Loads the weights straight from the repo; point model_id at a local directory to use your downloaded copy.
LM Studio loads GGUF (and MLX on Apple Silicon) only; this quant is a safetensors build.
Safetensors weights run under vLLM or transformers; a GGUF conversion, if one exists, is a separate quant row.
MLX runs MLX-format weights only (Apple Silicon). This quant is a safetensors build.
Safetensors weights run under vLLM or transformers; a GGUF conversion, if one exists, is a separate quant row.
Technical details
Chat template
{%- if tools %}
{{- '<|im_start|>system\n' }}
{%- if messages[0].role == 'system' %}
{{- messages[0].content + '\n\n' }}
{%- endif %}
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
{%- for tool in tools %}
{{- "\n" }}
{{- tool | tojson }}
{%- endfor %}
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
{%- else %}
{%- if messages[0].role == 'system' %}
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
{%- for message in messages[::-1] %}
{%- set index = (messages|length - 1) - loop.index0 %}
{%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
{%- set ns.multi_step_tool = false %}
{%- set ns.last_query_index = index %}
{%- endif %}
{%- endfor %}
{%- for message in messages %}
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{%- set content = message.content %}
{%- set reasoning_content = '' %}
{%- if message.reasoning_content is defined and message.reasoning_content is not none %}
{%- set reasoning_content = message.reasoning_content %}
{%- else %}
{%- if '</think>' in message.content %}
{%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
{%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
{%- endif %}
{%- endif %}
{%- if loop.index0 > ns.last_query_index %}
{%- if loop.last or (not loop.last and reasoning_content) %}
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
{%- else %}
{{- '<|im_start|>' + message.role + '\n' + content }}
{%- endif %}
{%- else %}
{{- '<|im_start|>' + message.role + '\n' + content }}
{%- endif %}
{%- if message.tool_calls %}
{%- for tool_call in message.tool_calls %}
{%- if (loop.first and content) or (not loop.first) %}
{{- '\n' }}
{%- endif %}
{%- if tool_call.function %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{%- if tool_call.arguments is string %}
{{- tool_call.arguments }}
{%- else %}
{{- tool_call.arguments | tojson }}
{%- endif %}
{{- '}\n</tool_call>' }}
{%- endfor %}
{%- endif %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- message.content }}
{{- '\n</tool_response>' }}
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
{{- '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- if enable_thinking is defined and enable_thinking is false %}
{{- '<think>\n\n</think>\n\n' }}
{%- endif %}
{%- endif %}
Sampling defaults
- top_k
- 20
- top_p
- 0.95
- temperature
- 0.6
Stop strings
<|im_end|>
<|endoftext|>
Evidence & provenance
Source
- Revision pin
-
22e683669bc0f0bd69640a1354a6d0aebcfeede5 - Manifest
- Present
License
- Name
- apache-2.0
- Commercial use
- yes
- Access
- Open
File hashes (SHA-256)
-
qwen3-reranker-4b/1_LogitScore/config.json
73e3156450564d8a98b7e47bcf5aace0f29600828b51937da545571e84db3ff3 -
qwen3-reranker-4b/LICENSE
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 -
qwen3-reranker-4b/README.md
b7cf82b30d5e38cd1a02ca7cfd60c26c0e3664cb31b2c4b661550a93c9281bee -
qwen3-reranker-4b/chat_template.jinja
6f682162495ec5b39fd9005c01b6aa2a74669379fe967039f1e2cbbe8752369d -
qwen3-reranker-4b/config.json
38bff5eac700032a185745e4076eccad7aa453473cafc2a27de412cdb7b79e19 -
qwen3-reranker-4b/config_sentence_transformers.json
6a153d6696f78fd588c1c728967f0b773ea869d3c6028f151ce71ebe49140762 -
qwen3-reranker-4b/generation_config.json
81051cd3f6e77013827148d0b8a6ead93f8ac390d5ab805f849199f0af6a08db -
qwen3-reranker-4b/merges.txt
8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5 -
qwen3-reranker-4b/model-00001-of-00002.safetensors
cf2e87cbf71fa628961532232e04dd6c19702a0a057f5e2aff95ea1aca4fd488 -
qwen3-reranker-4b/model-00002-of-00002.safetensors
78946d22b7f6456ea7a5358dbdf3982de36c5bac1f166a5fd58e18e31db8048a -
qwen3-reranker-4b/model.safetensors.index.json
18a783f197360068da36d2ff9ecffce0121542a87598fd1fef3079ead1c3cc08 -
qwen3-reranker-4b/modules.json
6f13b6b4a89e577b591b2077bca40c67c26541a6740a8809267cb474f90806a9 -
qwen3-reranker-4b/sentence_bert_config.json
3234ebd224d492cbe8d55d5ec80a3f408451c4db3005bafb64fe1c51c763e01e -
qwen3-reranker-4b/special_tokens_map.json
76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd -
qwen3-reranker-4b/tokenizer.json
aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4 -
qwen3-reranker-4b/tokenizer_config.json
253153d0738ceb4c668d2eff957714dd2bea0b56de772a9fdccd96cbf517e6a0 -
qwen3-reranker-4b/vocab.json
ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910
Explore further
Appears in
Get an email when a better quant fits your rig.
Set your rig once; we'll alert you when a new or better-fitting build lands.
Performance reports
Real-world throughput reported by the community (and scraped sources).
Community
Reviews, sampler presets and community runtime reports. Be the first to contribute.
Community runtime reports
Unofficial, community-submitted "it loads for me" reports. These are not the official verified-working badge — an admin reviews reports before anything is marked officially verified.
Log in to report whether a quant loads in your runtime.
No community reports yet.