Instructions to use BAAI/bge-large-zh-v1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BAAI/bge-large-zh-v1.5 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BAAI/bge-large-zh-v1.5") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use BAAI/bge-large-zh-v1.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="BAAI/bge-large-zh-v1.5")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("BAAI/bge-large-zh-v1.5") model = AutoModel.from_pretrained("BAAI/bge-large-zh-v1.5", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Asking an embedding model supporting both English and Chinese
Hi,
I am working on RAG (Retrieval-Augmented Generation) application and my local document includes both English and Chinese.
When I did testing for bge-large-zh-v1.5 and bge-large-en-v1.5, each of them works OK for their according language (Zh / En).
Besides, I tried bge-reranker-large but it doesn't work well for either English or Chinese. However, it works like a charm for re-ranker purpose.
So, do you have any plan to release an embedding model working well for both English and Chinese? If yes, can I know ETA?
Hi, thanks for your interest in our work!
The reranker model directly computes the score of query and passage, and it cannot be used to map text into embedding.
We plan to release a new multilingual model in January.
Thank you for your quick response!
Hope to see the new model in January!