Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

mixedbread-ai
/
mxbai-rerank-base-v2

Text Ranking
Transformers
Safetensors
sentence-transformers
qwen2
text-generation
text-embeddings-inference
Model card Files Files and versions
xet
Community
9

Instructions to use mixedbread-ai/mxbai-rerank-base-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use mixedbread-ai/mxbai-rerank-base-v2 with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("mixedbread-ai/mxbai-rerank-base-v2")
    model = AutoModelForCausalLM.from_pretrained("mixedbread-ai/mxbai-rerank-base-v2")
  • sentence-transformers

    How to use mixedbread-ai/mxbai-rerank-base-v2 with sentence-transformers:

    from sentence_transformers import CrossEncoder
    
    model = CrossEncoder("mixedbread-ai/mxbai-rerank-base-v2")
    
    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
mxbai-rerank-base-v2
1 GB
Ctrl+K
Ctrl+K
  • 7 contributors
History: 16 commits
aari1995's picture
aari1995
Update config.json
3af50f3 verified 10 months ago
  • .gitattributes
    1.57 kB
    initial commit about 1 year ago
  • LICENSE
    10.8 kB
    initial commit about 1 year ago
  • README.md
    44.7 kB
    update url 11 months ago
  • added_tokens.json
    605 Bytes
    initial commit about 1 year ago
  • config.json
    766 Bytes
    Update config.json 10 months ago
  • generation_config.json
    242 Bytes
    initial commit about 1 year ago
  • merges.txt
    1.67 MB
    initial commit about 1 year ago
  • model.safetensors
    988 MB
    xet
    initial commit about 1 year ago
  • special_tokens_map.json
    613 Bytes
    initial commit about 1 year ago
  • tokenizer.json
    11.4 MB
    xet
    initial commit about 1 year ago
  • tokenizer_config.json
    7.34 kB
    initial commit about 1 year ago
  • vocab.json
    2.78 MB
    initial commit about 1 year ago