Skip to content

This tool uses LEANN (Lightweight Embedding & Neural Network) for highly efficient vector search. It compresses the index by 97% compared to traditional DBs, running entirely on this CPU-based HF Space.

Notifications You must be signed in to change notification settings

AlexPi44/Open-Source-RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

title emoji colorFrom colorTo sdk sdk_version app_file pinned license short_description
LEANN RAG • Qwen3 0.6B
🧠
blue
indigo
gradio
5.49.1
app.py
false
mit
97% smaller vector search running on CPU

🧠 LEANN RAG: The "Impossible" Vector Search

This Space demonstrates LEANN (Lightweight Embedding & Neural Network), a revolutionary vector search engine that runs highly efficient RAG (Retrieval Augmented Generation) on consumer hardware.

Unlike traditional vector databases that store heavy embedding vectors for every document (bloating storage), LEANN stores only the graph structure and re-computes embeddings on-the-fly during search. This reduces index size by 97%, allowing us to run a powerful semantic search engine entirely on the Hugging Face Free Tier (2 vCPU).


🏗️ Architecture: How it Works

This application is a complete RAG pipeline optimized for low-resource environments.

graph LR
    A[User PDF/Text] -->|Chunking| B(Text Chunks)
    B -->|LEANN Indexer| C{HNSW Graph Construction}
    C -->|Compress| D[Sparse Graph Index]
    
    D -->|User Query| E[Graph Traversal]
    E -->|On-Demand Compute| F[Embedding Re-calculation]
    F -->|Top-K Results| G[Qwen3-0.6B LLM]
    G -->|Response| H[User Chat]
    
    style D fill:#f96,stroke:#333,stroke-width:2px
    style F fill:#f9f,stroke:#333,stroke-width:2px
Loading

About

This tool uses LEANN (Lightweight Embedding & Neural Network) for highly efficient vector search. It compresses the index by 97% compared to traditional DBs, running entirely on this CPU-based HF Space.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages