End-to-end training, inference and distillation code for RAG retrieval models, covering embedding, ColBERT and reranker models.
netease-youdao/BCEmbedding
Bilingual Chinese-English embedding and reranker models from NetEase Youdao, built for retrieval in RAG applications.
- Stars
- 1,878
- Forks
- 129
- Open issues
- 32
- Last commit
- 2 months ago
What is it?
BCEmbedding provides two models for retrieval pipelines: an EmbeddingModel that turns text into semantic vectors for search and question answering, and a RerankerModel that rescores candidate passages so the most relevant results rise to the top. The models target Chinese, English, and cross-lingual retrieval, and the reranker also covers Japanese and Korean.
The project is the retrieval backbone behind Youdao's RAG products, including the open-source QAnything. The models are published on Hugging Face and can be loaded through the BCEmbedding package, transformers, or sentence-transformers. Integration helpers are included for LangChain and LlamaIndex, and the reranker accepts passages longer than 512 tokens.
The repository also contains MTEB and LlamaIndex-based evaluation scripts, along with a multi-domain bilingual RAG evaluation dataset.
Key features
- 01Embedding model for Chinese, English, and cross-lingual semantic retrieval.
- 02Reranker model supporting Chinese, English, Japanese, and Korean.
- 03Reranker handles passages longer than 512 tokens, up to 32k tokens.
- 04Reranker outputs relevance scores that can be used to filter low-quality passages.
- 05Embedding model works without task-specific query instructions.
- 06Integrations for LangChain and LlamaIndex, plus direct use via transformers and sentence-transformers.
Use cases
- Building a bilingual Chinese-English knowledge base or document Q&A system.
- Adding a reranking stage to an existing RAG pipeline to improve retrieved context.
- Running cross-lingual search where queries and documents are in different languages.
- Benchmarking embedding and reranker models on RAG tasks using the provided evaluation scripts.
Quick start
- 1
Create and activate a conda environment
conda create --name bce python=3.10 -y - 2
Activate the conda environment
conda activate bce - 3
Install BCEmbedding from PyPI (install a matching torch first)
pip install BCEmbedding==0.1.5
Things to know
- Installing torch manually for your CUDA version is needed to avoid conflicts.
- The README only lists Chinese and English for embeddings, with the reranker covering Japanese and Korean too.
In collections
Topics
FAQ
- What is BCEmbedding?
- Bilingual Chinese-English embedding and reranker models from NetEase Youdao, built for retrieval in RAG applications. BCEmbedding provides two models for retrieval pipelines: an EmbeddingModel that turns text into semantic vectors for search and question answering, and a RerankerModel that rescores candidate passages so the most relevant results rise to the top. The models target Chinese, English, and cross-lingual retrieval, and the reranker also covers Japanese and Korean.
- Is BCEmbedding free to use? What license does it have?
- BCEmbedding is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is BCEmbedding still maintained?
- Updated within 6 months. The last commit to BCEmbedding was on Sep 3, 2026.
- What can I use BCEmbedding for?
- Building a bilingual Chinese-English knowledge base or document Q&A system. Adding a reranking stage to an existing RAG pipeline to improve retrieved context. Running cross-lingual search where queries and documents are in different languages. Benchmarking embedding and reranker models on RAG tasks using the provided evaluation scripts.
- How do I install BCEmbedding?
- Create and activate a conda environment: conda create --name bce python=3.10 -y Activate the conda environment: conda activate bce Install BCEmbedding from PyPI (install a matching torch first): pip install BCEmbedding==0.1.5
- Where can I get BCEmbedding?
- The source code and installation instructions are on GitHub: https://github.com/netease-youdao/BCEmbedding
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A retrieval toolkit from BAAI providing BGE embedding and reranker models plus training, evaluation and tutorials for search and RAG.
All-in-one Python AI framework for semantic search, RAG, LLM orchestration and language model workflows, built on an embeddings database.
A collection of Jupyter notebook tutorials and demos showing how to build unstructured-data search and AI applications with the Milvus vector database.
A Python library for building LangGraph agents that search a store to retrieve and use hundreds or thousands of tools.
A Rust-based server for deploying and serving open-source text embedding and reranker models over HTTP and gRPC.