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

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support