Qwen3 Reranker 4B

QWEN3_RERANKER_4B

Multilingual reranker that scores how well each of up to 100 documents answers a query, in over 100 languages and code.

Embeddingsrerankermultilingualcodesearchragqwenapache-2.0Fine-tunable
Qwen3 Reranker 4B: Embeddings model on Kainguru

About Qwen3 Reranker 4B

Capabilities

  • 100+ languages and code — ranks documents in many languages, Azerbaijani included, and source code
  • Long documents — a query and document together of up to 8,192 tokens
  • Scores from 0 to 1 — the model's confidence that each document answers the query

Good to know

  • Each document is judged against the instruction "Given a web search query, retrieve relevant passages that answer the query".
  • A query and document together longer than 8,192 tokens are truncated. Fine-tuning trains a LoRA adapter on the first 2,048 tokens of each pair.
  • The query and documents may not contain the model's control tokens, such as <|im_start|> or <|im_end|>.

Qwen3 Reranker 4B inputs and output

NameTypeRequiredDefaultDetails
documentstextYes—A JSON array of 1 to 100 texts to rank, each at most 8192 characters; the whole JSON text at most 120000 characters.
2–120000 characters
querytextYes—The search query or question.
1–8192 characters
top_nintegerNo—Return only the best N documents (default: all of them).
1–100

Output. JSON, best first: [{"index": i, "score": s}, ...]; index is the document's position in the input, score its relevance from 0 to 1.

Run Qwen3 Reranker 4B with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=QWEN3_RERANKER_4B" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "documents": "example",
    "query": "example"
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "QWEN3_RERANKER_4B",
        {
          "documents": "example",
          "query": "example"
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune Qwen3 Reranker 4B

You can fine-tune Qwen3 Reranker 4B on your own data and run the tuned model through the same API. Dataset: Up to 10 JSONL files, 200 MiB in total, one object per line: {"query": "...", "positive": "...", "negative": "..."} ("negative" optional), or {"query": "...", "document": "...", "label": 0 to 1}. 8 to 50000 examples, both relevant and irrelevant.

The steps are in the docs.

Qwen3 Reranker 4B pricing

Price per 1M tokens: 13.8 credits ($0.138). The price is shown again before every run; all prices are on the pricing page.

Licence and source

Qwen3 Embedding 0.6B: Embeddings model on Kainguru
Embeddings

Qwen3 Embedding 0.6B

Multilingual text and code embeddings for search, retrieval and clustering in over 100 languages, Azerbaijani included.

Fine-tunable
Qwen3 Embedding 8B: Embeddings model on Kainguru
Embeddings

Qwen3 Embedding 8B

High-accuracy multilingual text and code embeddings for search and retrieval in over 100 languages, Azerbaijani…

Fine-tunable
BGE Reranker v2 M3: Embeddings model on Kainguru
Embeddings

BGE Reranker v2 M3

Ranks up to 100 documents by how relevant each one is to a search query, in many languages.

Fine-tunable
MS MARCO MiniLM L6 v2: Embeddings model on Kainguru
Embeddings

MS MARCO MiniLM L6 v2

Small, fast English reranker that scores how well each of up to 100 passages answers a search query.

Fine-tunable
Qwen3-VL Embedding 2B: Embeddings model on Kainguru
Embeddings

Qwen3-VL Embedding 2B

Qwen3-VL Embedding 2B turns text, pictures and a text with its picture into vectors in one space, to search pages and…

Fine-tunable