Instructions to use mixedbread-ai/mxbai-edge-colbert-v0-17m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mixedbread-ai/mxbai-edge-colbert-v0-17m with sentence-transformers:
from pylate import models queries = [ "Which planet is known as the Red Planet?", "What is the largest planet in our solar system?", ] documents = [ ["Mars is the Red Planet.", "Venus is Earth's twin."], ["Jupiter is the largest planet.", "Saturn has rings."], ] model = models.ColBERT(model_name_or_path="mixedbread-ai/mxbai-edge-colbert-v0-17m") queries_emb = model.encode(queries, is_query=True) docs_emb = model.encode(documents, is_query=False) - Transformers
How to use mixedbread-ai/mxbai-edge-colbert-v0-17m with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("mixedbread-ai/mxbai-edge-colbert-v0-17m") model = AutoModel.from_pretrained("mixedbread-ai/mxbai-edge-colbert-v0-17m", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Remove cased tokens from vocabulary
Hello!
Since the model is lower-cased, you can remove all cased tokens from the vocabulary. This would save about 720k params (15000 tokens are cased tokens). What you can also try, and which should improve performance, is uncasing the vocabulary.
If you want I can do a PR with the cased tokens removed or the vocabulary uncased.
Stéphan
Hello Stéphan
That would be awesome. We would appreciate a PR for that!!
Both options sound good. Feel free to go with whichever you think works better! Thank you.
Rikiya
I asked some questions on the mixedbread discord about it, I can also ask them here. What do you prefer?