Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

Qwen
/
Qwen3-Reranker-4B

Text Ranking
Transformers
Safetensors
sentence-transformers
qwen3
text-generation
Model card Files Files and versions
xet
Community
12

Instructions to use Qwen/Qwen3-Reranker-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Qwen/Qwen3-Reranker-4B with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-Reranker-4B")
    model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-Reranker-4B")
  • sentence-transformers

    How to use Qwen/Qwen3-Reranker-4B with sentence-transformers:

    from sentence_transformers import CrossEncoder
    
    model = CrossEncoder("Qwen/Qwen3-Reranker-4B")
    
    query = "Which planet is known as the Red Planet?"
    passages = [
    	"Venus is often called Earth's twin because of its similar size and proximity.",
    	"Mars, known for its reddish appearance, is often referred to as the Red Planet.",
    	"Jupiter, the largest planet in our solar system, has a prominent red spot.",
    	"Saturn, famous for its rings, is sometimes mistaken for the Red Planet."
    ]
    
    scores = model.predict([(query, passage) for passage in passages])
    print(scores)
  • Notebooks
  • Google Colab
  • Kaggle
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Not able to Reproduce results in MTEB

👍➕ 2
1
#12 opened 17 days ago by
AyushM6

Add `id2label` and `label2id` configs

#10 opened about 2 months ago by
kozistr

Working GGUF for llama.cpp (native Windows/Linux, no WSL needed)

#9 opened 2 months ago by
Voodisss

QWEN instruct vs qwen reranker

#8 opened 5 months ago by
kalle07

Training supported

#7 opened 11 months ago by
russwest404

qwen3-reranker系列对于相同文本的分数,表现非常差

2
#6 opened 11 months ago by
bobliu2020

does the tokenizer need to be updated for this model?

1
#5 opened 11 months ago by
electroglyph

Amazing work! Any plans to release the fine-tuning toolkit for Qwen3-Reranker?

#4 opened 11 months ago by
wynne-mw

Add pipeline tag and link to paper and project page

#2 opened 11 months ago by
nielsr

typo report

👀 1
#1 opened 11 months ago by
wsp
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs