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 -
update bib
Verified signature7c3c865
-
Update README.md
Verified signaturec238eac
-
Update config.json (#8)
Verified signature- Update config.json (3af50f365e163002ae4d3b6277d4cf2782204273) Co-authored-by: Aaron Chibb <aari1995@users.noreply.huggingface.co>3334116
-
update url
Verified signature2cae013 -
update citation
Verified signature5f77787
-
Update README.md
Verified signature8d7cb37
-
Update model metadata to set pipeline tag to the new `text-ranking` (#7)
Verified signature- Update model metadata to set pipeline tag to the new `text-ranking` (f20afaa3970b3e7a54c3fee337cd6d8447b29933) Co-authored-by: Tom Aarsen <tomaarsen@users.noreply.huggingface.co>eeaabfb
-
Fix nan
Verified signaturef2c421b
-
Update citation (#1)
Verified signature- Update citation (f14aa18fbb2bf421f41800ecb314d7f847190b10)14af734
-
Update README.md
Verified signaturea0244e6 -
Update README.md
Verified signaturecb3c2b3 -
Update README.md
Verified signaturec0b5034 -
Update README.md
Verified signatured86d3f7
-
add emojis
Verified signature1b2178d -
Update README.md
Verified signature298226b -
Update README.md
Verified signature4af733e -
rename model name
Verified signature41ae200
-
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