Sentence Similarity
sentence-transformers
Safetensors
English
apex_retriever
rag
retrieval
semantic-search
faiss
bm25
cross-encoder
hybrid-search
dense-retrieval
ai
search
Instructions to use QuantaSparkLabs/ApexRetriever with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use QuantaSparkLabs/ApexRetriever with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("QuantaSparkLabs/ApexRetriever") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
ApexRetriever
A lightweight hybrid retrieval system designed for fast semantic search and RAG pipelines.
Built for:
- semantic search
- lightweight RAG
- AI assistants
- retrieval systems
- local document QA
Architecture
Stage β β BM25 Sparse Retrieval
Keyword-based retrieval for fast lexical matching.
Stage β‘ β Dense Semantic Search
Powered by:
BAAI/bge-small-en-v1.5
Uses FAISS vector indexing.
Stage β’ β CrossEncoder Reranking
Final neural reranking using:
cross-encoder/ms-marco-MiniLM-L-6-v2
Features
- Hybrid retrieval
- Fast indexing
- Dense semantic search
- Neural reranking
- Lightweight deployment
- GPU acceleration
- FAISS support
- Easy integration
Repository Structure
ApexRetriever/
β
βββ bi_encoder/
βββ reranker/
βββ pipeline.py
βββ README.md
Installation
pip install -U \
sentence-transformers \
transformers \
faiss-cpu \
rank-bm25 \
torch
Quick Start
from pipeline import ApexRetriever
retriever = ApexRetriever(model_dir=".")
# Example documents
docs = [
"Python was created by Guido van Rossum.",
"Paris is the capital of France."
]
retriever.index_documents(docs)
results = retriever.retrieve(
"Who created Python?",
top_k=3
)
print(results)
Use Cases
- RAG systems
- Semantic search
- AI chatbots
- Knowledge retrieval
- Local search engines
- Memory systems
Performance
Recommended:
- CUDA GPU
- 8GB+ RAM
- Python 3.10+
Components
| Component | Model |
|---|---|
| Dense Encoder | BAAI/bge-small-en-v1.5 |
| Reranker | cross-encoder/ms-marco-MiniLM-L-6-v2 |
| Vector Engine | FAISS |
| Sparse Search | BM25 |
License
Apache 2.0
QuantaSparkLabs
- Downloads last month
- 21