Instructions to use BAAI/bge-m3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BAAI/bge-m3 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BAAI/bge-m3") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Inference
- Notebooks
- Google Colab
- Kaggle
serving the model
Hi there! is there any way to serve your great model considering all the model fetures, embeddings, scores for rerank purposes, open source options or paid options for serving ?
you might consider using vespa: https://github.com/vespa-engine/pyvespa/blob/master/docs/sphinx/source/examples/mother-of-all-embedding-models-cloud.ipynb
thanks, Vespa is overkilling for now for my use cases and testing purposes, I (with the help of the gpt) build a simple but robust usable server for FAST local testing / developing purposes, this is the link:
https://github.com/puppetm4st3r/baai_m3_simple_server
feel free to share or comment
sugestions are welcome.
regards, and congrats for the great job and model :)
If you mainly need the embedding server layer, I open-sourced m3serve, a small BGE-M3 server exposing dense + sparse embeddings, with dynamic batching https://github.com/MauroCE/m3serve