The original model is a
Qwen3ForCausalLM
reranker that scores a (query, document)
pair using the next-token logit of a single relevance token (
true_token_id = 9454
,
from its
1_LogitScore
sentence-transformers head). Because the model uses tied
embeddings, that logit is
hidden_state · embed_tokens.weight[9454]
. This conversion
copies that single embedding row into the
score
head of a standard
Qwen3ForSequenceClassification
model, producing a
num_labels=1
reranker whose
output logit is identical (by construction) to the original relevance score.
This makes the model loadable directly via
AutoModelForSequenceClassification
and
servable as a cross-encoder reranker (e.g. by
infinity
),
without the causal-LM + logit-extraction path.
The original model was trained with a chat template that places the query in a
system
turn and the document in a
user
turn, followed by an assistant generation
prefix. Generic sequence-classification servers tokenize the raw
(query, document)
pair and do
not
apply this template, which can shift scores relative to the native
sentence-transformers usage. For best fidelity, format inputs as:
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
name = "baseten-admin/zerank-2-reranker-seq"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForSequenceClassification.from_pretrained(name, torch_dtype=torch.bfloat16).eval()
query, document = "What is the capital of France?", "The capital of France is Paris."
text = (
f"<|im_start|>system\n{query}<|im_end|>\n"f"<|im_start|>user\n{document}<|im_end|>\n"f"<|im_start|>assistant\n"
)
with torch.no_grad():
logit = model(**tok(text, return_tensors="pt")).logits.reshape(-1)[0]
score = torch.sigmoid(logit)
print(score.item())
Runs of baseten-admin zerank-2-reranker-seq on huggingface.co
905
Total runs
-21
24-hour runs
-42
3-day runs
-805
7-day runs
-124
30-day runs
More Information About zerank-2-reranker-seq huggingface.co Model
zerank-2-reranker-seq huggingface.co is an AI model on huggingface.co that provides zerank-2-reranker-seq's model effect (), which can be used instantly with this baseten-admin zerank-2-reranker-seq model. huggingface.co supports a free trial of the zerank-2-reranker-seq model, and also provides paid use of the zerank-2-reranker-seq. Support call zerank-2-reranker-seq model through api, including Node.js, Python, http.
zerank-2-reranker-seq huggingface.co is an online trial and call api platform, which integrates zerank-2-reranker-seq's modeling effects, including api services, and provides a free online trial of zerank-2-reranker-seq, you can try zerank-2-reranker-seq online for free by clicking the link below.
baseten-admin zerank-2-reranker-seq online free url in huggingface.co:
zerank-2-reranker-seq is an open source model from GitHub that offers a free installation service, and any user can find zerank-2-reranker-seq on GitHub to install. At the same time, huggingface.co provides the effect of zerank-2-reranker-seq install, users can directly use zerank-2-reranker-seq installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
zerank-2-reranker-seq install url in huggingface.co: