Views
No views yet
1# Launch the server, listening on port 8000 by default
2furiosa-llm serve furiosa-ai/Qwen3-Reranker-4B1INFO: Started server process [27507]
2INFO: Waiting for application startup.
3INFO: Application startup complete.
4INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)/v1/rerank endpoint (compatible with the Cohere/Jina
rerank API, also used by vLLM). Send a query and the candidate documents with
curl; the server returns the documents reordered by relevance_score:1curl http://localhost:8000/v1/rerank \
2 -H "Content-Type: application/json" \
3 -d '{
4 "model": "furiosa-ai/Qwen3-Reranker-4B",
5 "query": "What is deep learning?",
6 "documents": [
7 "Deep learning is a subset of machine learning using neural networks.",
8 "Python is a popular programming language for data science.",
9 "Neural networks are inspired by biological neural networks."
10 ]
11 }' \
12 | python -m json.toolrequests library, and pass top_n to
keep only the most relevant documents:1import requests
2
3response = requests.post(
4 "http://localhost:8000/v1/rerank",
5 json={
6 "model": "furiosa-ai/Qwen3-Reranker-4B",
7 "query": "What is deep learning?",
8 "documents": [
9 "Deep learning is a subset of machine learning using neural networks.",
10 "Python is a popular programming language for data science.",
11 "Neural networks are inspired by biological neural networks.",
12 ],
13 "top_n": 2,
14 },
15)
16
17for result in response.json()["results"]:
18 print(f"score={result['relevance_score']:.4f} {result['document']['text']}")/v1/score endpoint.LLM constructor (the FXB shipped in
the repo is discovered automatically) and call score with a query and the
candidate documents to obtain relevance scores:1from furiosa_llm import LLM
2
3with LLM("furiosa-ai/Qwen3-Reranker-4B") as llm:
4 query = "What is deep learning?"
5 documents = [
6 "Deep learning is a subset of machine learning using neural networks.",
7 "Python is a popular programming language for data science.",
8 ]
9 outputs = llm.score(query, documents)
10 for document, output in zip(documents, outputs):
11 print(f"score={output.outputs.score:.4f} {document}")furiosa-llm serve) — full OpenAI-compatible API reference, including the Rerank and Score APIs