qwen3-reranker-4b on Tenstorrent p150 and p300 and p300x2 and p150x2 and p150x4
Derived from Qwen/Qwen3-Reranker-4B by the Qwen team, weights unmodified. The TTNN port is models/autoports/qwen_qwen3_reranker_4b on the shared Qwen3 reranker stack in models/autoports/qwen_qwen3_vl_reranker_8b.
Qwen3-Reranker-4B, a text reranker for 100+ languages and code: it scores how well a document answers a query by reading logit("yes") - logit("no") at the end of the model card's prompt, served as a Cohere / Jina / vLLM-style /v1/rerank API. Every chip holds a full copy of the model, so more chips means more documents per second.
Runs on Tenstorrent p150 or p300 or p300x2 or p150x2 or p150x4 β see the serving profiles below.
Packaged and published with tt-model-manager 0.1.0 (manifest schema 5.1).
At a glance
| Hardware | p150, p150x2, p150x4, p300, p300x2 |
| License | apache-2.0 |
Intended use
Second-stage reranking in retrieval and RAG pipelines: reorder the top candidates from an embedding search (for example Qwen3-Embedding) over text and code. Not a generative model.
Prerequisites
- The Tenstorrent CLI,
tt:uv tool install tenstorrent(or use tt-model alone, see the Quickstart) - Docker
- Tenstorrent hardware: p150 or p300 or p300x2 or p150x2 or p150x4
- 1 GB hugepages mounted at
/dev/hugepages-1G - About 10 GB of free disk for the checkpoint and its converted weights
Quickstart
tt serve raahemnabeel/qwen3-reranker-4b
tt serve downloads the Docker image and the Qwen/Qwen3-Reranker-4B at 22e683669bc0f0bd69640a1354a6d0aebcfeede5 weights (into your HF cache; they are not in the image), then starts the model's own HTTP server on port 20000 (or the next free port, if that one is busy). The first start compiles kernels for your device, which takes several minutes; the server is ready when it logs Application startup complete.
Without tt-cli: tt-model serve raahemnabeel/qwen3-reranker-4b.
Rerank
curl -s localhost:20000/v1/rerank -H 'content-type: application/json' -d '{
"query": "What is the capital of China?",
"documents": ["The capital of China is Beijing.", "Gravity is a force that attracts two bodies towards each other."],
"instruction": "Given a web search query, retrieve relevant passages that answer the query", "top_n": 1}'
Pick more chips with --profile p300 (2 chips) or --profile p300x2 (QuietBox 2, 4 chips).
Serving profiles
Select a different serving profile using --profile.
| profile | hardware | mesh | description |
|---|---|---|---|
p150 (default) |
p150 | P150 | One Blackhole chip (a p150, or one chip of a p300). The baseline. |
p300 |
p300 | P300 | Both chips of one p300; one model copy per chip (data parallel), about twice the p150 throughput. |
p300x2 |
p300x2 | P300x2 | QuietBox 2 (two p300 boards, four chips); one model copy per chip, about four times the p150 throughput. |
p150x2 |
p150x2 | P150x2 | Two p150 boards; one model copy per chip. |
p150x4 |
p150x4 | P150x4 | Four p150 boards; one model copy per chip. |
Capabilities
This package exposes the model's own HTTP server on port 20000, not an OpenAI-compatible chat API β its request and response shapes are the model's own. See the author's notes for the payload it expects.
POST /v1/rerank takes the Cohere / Jina / vLLM rerank shape.
| field | meaning | default |
|---|---|---|
query |
a string | required |
documents |
1 to 1000 strings | required |
instruction |
the task instruction (<Instruct>) |
"Given a web search query, retrieve relevant passages that answer the query" |
top_n |
return only the best n | all |
return_documents |
echo each document back | false |
raw_scores |
add the raw score (logit yes - logit no) next to relevance_score |
false |
The response is {"results": [{"index", "relevance_score", "score"?, "document"?}], "usage": {"total_tokens"}},
sorted by relevance, which is sigmoid(score) (the model card's exp(log_softmax([no, yes]))[yes]). POST /v1/score takes the vLLM score shape (text_1, text_2). GET /health reports every chip and returns 503 until
warm or while a chip is down. A pair is truncated to 8192 tokens like the model card's code; images and video are
rejected with 400.
Expected performance
| eval | metric | this package | HF reference | size |
|---|---|---|---|---|
| Fixed pair set, text part: 188 pairs in 33 query groups (English, multilingual, code, 2K-8K-token documents) | Pearson r of the score | 0.9997 | 1 (HF fp32) | 188 pairs |
| mean / max abs. score difference (logits) | 0.140 / 0.64 | 0 | ||
| same top-1 document per group | 33/33 | |||
| same order for pairs HF separates by >= 0.5 | 100.0% | 449 pairs | ||
| MTEB reranking, English (SciDocsRR + AskUbuntuDupQuestions subset) | NDCG@10 | 94.35 | 94.35 | 60 groups, 600 pairs |
| MIRACL reranking, de / ja / ar subset | NDCG@10 | 95.42 | 96.19 | 45 groups, 450 pairs |
The HF reference is the transformers implementation on CPU with the model card's prompt, on exactly the same token ids (fp32 for the fixed pair set, bf16 for the benchmark subsets). Benchmark rows are fixed subsets with short candidate lists (NDCG with exponential gain): they show parity with HF, not leaderboard numbers. On MIRACL one group's top-1 flips (score Pearson 0.9996, mean |d| 0.15).
| one document, warm, p150 | pair tokens | latency (ms) |
|---|---|---|
| text 128 | 135 | 42 |
| text 512 | 515 | 75 |
| text 2048 | 2,025 | 172 |
| text 8192 | 8,075 | 731 |
| profile | request | clients | pairs/s | tokens/s | p50 (ms) | p99 (ms) |
|---|---|---|---|---|---|---|
| p150 | 20 texts (~525 tokens per pair) | 1 | 21.7 | 11,476 | 916 | 1,122 |
| p150 | 20 texts | 4 | 21.8 | 11,518 | 3,708 | 4,072 |
| p300 | 20 texts | 1 | 32.5 | 16,834 | 621 | 787 |
| p300 | 20 texts | 4 | 42.0 | 22,117 | 1,882 | 2,209 |
| p300x2 | 20 texts | 1 | 49.6 | 25,963 | 398 | 521 |
| p300x2 | 20 texts | 4 | 83.0 | 43,868 | 960 | 1,259 |
A real server (server.app with the 4B spec), closed-loop clients sending /v1/rerank requests for 45 s per row, 0
errors, on the chips of a QuietBox 2 (p300c dies; p150 rows on one die, the p150 code path). Single-document latency
is end to end (HTTP, tokenization, device).
Limitations
- Bring-up build, not a Tenstorrent release.
- Scores come from bf16 activations, bfp8 attention and bf16 MLP weights: on average within 0.14 logits of HF fp32 (max 0.64), so candidates scored within about 0.25 of each other can swap places.
- A pair is truncated to 8192 tokens (the model card's limit), the document side first.
- One model copy per chip: more chips add throughput, not single-request speed. A chip that fails is reported by /health and skipped; restart the server to bring it back.
- Validated on the four chips of a QuietBox 2 (p300c), as profiles p150, p300 and p300x2. p150, p150x2 and p150x4 boards run the same per-chip code but were not measured.
- First boot converts the weights and compiles kernels (a few minutes on one chip); later boots take under a minute.
Licensing
Weights under the upstream Apache-2.0 licence (Qwen/Qwen3-Reranker-4B). The TTNN port and the server in code/ are Apache-2.0 (tt-metal).
Feedback
Questions or problems with this package: open a discussion at https://huggingface.co/raahemnabeel/qwen3-reranker-4b/discussions β that is what reaches its author. A problem with the tt tooling itself: tt report issue (collects your environment and opens a prefilled issue against tenstorrent/tt-cli). Product feedback: support@tenstorrent.com.
Provenance
The exact sources the image was built from β code/ in this repo is byte-identical to the model code inside the image:
| component | built from |
|---|---|
| tt-metal | a local checkout β commit not published (dirty tree β the image includes uncommitted changes) |
code/ digest |
c70baef7d3275ccf (sha256, first 16 hex digits) |
| built | 2026-10-31T04:58:25+00:00 by tt-model 0.1.0 |