Text Ranking
Transformers
Safetensors
sentence-transformers
qwen2
text-generation
text-embeddings-inference
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:
# pip install -U transformers accelerate # 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", device_map="auto") - 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) - Inference
- Notebooks
- Google Colab
- Kaggle
Commit History
-
Integrate with Sentence Transformers v5.4 (#9)
- Integrate with Sentence Transformers v5.4.0 (062adb650ef980633805fa8f6fbc9481e6559fef) - Add missing </b> (6cb650209ce3f8a3d65162af17b3f1084e15d18e) - Rename CausalScoreHead to LogitScore (462e1b8c1348562525b2096966ee58151e5b352a) - Move 'message_format' into 'modality_config' under 'message' -> 'format' (2f26065a0f46dd5ea2809cb2f93cedb359d77093) - Add missing README changes (6f9c43608d5a9063a85df115b3e40398ce5f6a5e) - Merge branch 'main' of https://huggingface.co/mixedbread-ai/mxbai-rerank-base-v2 (3472e9d1489bb31112962bf8faa59faa855081d6)3ea9d4d
-
initial commit
Create LICENSE Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such ent…5802d12