Qwen3-Reranker-4B-W8A8

INT8 weight + INT8 activation (W8A8) quantization of Qwen/Qwen3-Reranker-4B in the compressed-tensors format for vLLM.

Why: an 8-bit checkpoint that runs on both Ampere (RTX 3090) and Turing (RTX 2080 Ti). Marlin and FP8 kernels need sm80+/sm89+, while vLLM's CUTLASS INT8 W8A8 kernels work from sm75.

Quantization

  • llm-compressor 0.14.0: SmoothQuant (strength 0.8) + GPTQ, scheme W8A8: weights int8 symmetric per-channel (static), activations int8 symmetric per-token (dynamic).
  • lm_head is not quantized โ€” vLLM builds the classifier from its yes/no rows. The last 4 decoder layers (32โ€“35) are kept in bf16 (max |ฮ”P(yes)| to bf16: 0.022 โ†’ 0.008).
  • Calibration: 256 samples, max 1024 tokens, formatted with the original reranker prompt โ€” Russian-language texts of a services marketplace, half relevant (title โ†’ own document) and half random queryโ€“document pairs.

Check against bf16 (held-out pairs, not used for calibration)

Metric Value
|P(yes) โˆ’ P_bf16(yes)|, mean / max (80 pairs) 0.0003 / 0.0081
Nonsense query, max P(yes): W8A8 / bf16 0.0002 / 0.0002

The numbers come from the quantized model in transformers (simulated quantization) right after calibration.

Usage (vLLM)

vllm serve megafetis/Qwen3-Reranker-4B-W8A8 --runner pooling --served-model-name rr4 \
  --hf-overrides '{"architectures":["Qwen3ForSequenceClassification"],"classifier_from_token":["no","yes"],"is_original_qwen3_reranker":true}' \
  --chat-template qwen3_reranker.jinja --max-model-len 8192 --enable-prefix-caching
# RTX 2080 Ti (no bf16): add --dtype half

qwen3_reranker.jinja โ€” from vLLM examples/pooling/score/template/. Without the template scores are meaningless. Endpoint โ€” /v1/rerank (Jina format) or /score.

Recipe โ€” recipe.yaml; the scripts โ€” ai-models/ of the project that produced it. License โ€” Apache 2.0, as the base model.

Downloads last month
64
Safetensors
Model size
4B params
Tensor type
BF16
ยท
I8
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for megafetis/Qwen3-Reranker-4B-W8A8

Quantized
(67)
this model