BCEmbedding  by netease-youdao

Open-source embedding/reranker models for RAG

created 1 year ago
1,812 stars

Top 24.4% on sourcepulse

GitHubView on GitHub
Project Summary

BCEmbedding provides open-source bilingual and crosslingual embedding and reranker models specifically designed for Retrieval Augmented Generation (RAG) applications. Developed by Netease Youdao, it targets developers and researchers building RAG systems that require robust performance across Chinese and English languages, offering a two-stage retrieval solution.

How It Works

BCEmbedding utilizes a two-stage retrieval process. The EmbeddingModel acts as a dual-encoder for efficient first-stage retrieval, generating semantic vectors. The RerankerModel then employs a cross-encoder for a second-stage refinement, re-ranking retrieved passages for enhanced precision and relevance. This approach leverages Youdao's translation engine for strong bilingual and crosslingual capabilities, aiming for out-of-the-box usability without fine-tuning.

Quick Start & Requirements

  • Installation: pip install BCEmbedding or install from source.
  • Prerequisites: PyTorch (ensure CUDA compatibility), transformers, sentence-transformers, langchain, llama-index (for integrations). GPU recommended for optimal performance.
  • Resources: Models are available on Hugging Face. Specific resource requirements depend on model size and usage.
  • Docs: Manual, Quick Start, Langchain Integration, LlamaIndex Integration.

Highlighted Details

  • Achieves State-of-the-Art (SOTA) performance on MTEB and LlamaIndex RAG evaluations, outperforming comparable open-source models in bilingual and crosslingual scenarios.
  • RerankerModel supports long passages (up to 32k tokens) and provides meaningful relevance scores.
  • Instruction-free design for EmbeddingModel, simplifying integration.
  • Models are proven in production within Youdao's products.

Maintenance & Community

  • Actively maintained by Netease Youdao.
  • Community engagement via WeChat group.
  • Related Links include QAnything, FlagEmbedding, MTEB, and LlamaIndex.

Licensing & Compatibility

  • Licensed under Apache 2.0 License.
  • Permissive license suitable for commercial use and integration into closed-source projects.

Limitations & Caveats

  • While supporting Chinese and English, broader language support for EmbeddingModel is noted as "coming soon."
  • RAG evaluation scripts recommend at least two GPUs for optimal execution.
Health Check
Last commit

3 weeks ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
98 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Didier Lopes Didier Lopes(Founder of OpenBB), and
11 more.

sentence-transformers by UKPLab

0.2%
17k
Framework for text embeddings, retrieval, and reranking
created 6 years ago
updated 3 days ago
Feedback? Help us improve.