{"data":{"slug":"startrail-org-leann","name":"LEANN","tagline":"RAG on Everything with LEANN","github_url":"https://github.com/StarTrail-org/LEANN","owner":"StarTrail-org","repo":"LEANN","owner_avatar_url":"https://avatars.githubusercontent.com/u/288858980?v=4","primary_language":"Python","stars":12785,"forks":1145,"topics":["ai","faiss","gpt-oss","langchain","llama-index","llm","localstorage","offline-first","ollama","privacy","python","rag","retrieval-augmented-generation","vector-database","vector-search","vectors"],"archived":false,"github_pushed_at":"2026-07-31T18:53:24+00:00","maintenance_label":"Active","stars_delta_30d":81,"url":"https://www.graphcanon.com/tools/startrail-org-leann","markdown_url":"https://www.graphcanon.com/tools/startrail-org-leann.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/startrail-org-leann","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=startrail-org-leann","description":"[MLsys2026]: RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.","homepage_url":"https://arxiv.org/abs/2506.08276","license":"MIT","open_issues":45,"watchers":76,"ai_summary":"LEANN offers retrieval-augmented generation (RAG) applications with significant storage savings and privacy.","readme_excerpt":"### 📦 Prerequisites: Install uv\n\n[Install uv](https://docs.astral.sh/uv/getting-started/installation/#installation-methods) first if you don't have it. Typically, you can install it with:\n\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n---\n\n### 🚀 Quick Install\n\nClone the repository to access all examples and try amazing applications,\n\n```bash\ngit clone https://github.com/yichuan-w/LEANN.git leann\ncd leann\n```\n\nand install LEANN from [PyPI](https://pypi.org/project/leann/) to run them immediately:\n\n```bash\nuv venv\nsource .venv/bin/activate\nuv pip install leann\n\n---\n\n# Install toolchain (if not already present)\nchoco install cmake swig pkgconfiglite nuget.commandline -y\n\n---\n\n# Install C++ dependencies via vcpkg\nvcpkg install zeromq:x64-windows openblas:x64-windows lapack:x64-windows `\n  boost-program-options:x64-windows protobuf:x64-windows\n\n---\n\n## Quick Start\n\nOur declarative API makes RAG as easy as writing a config file.\n\nCheck out [demo.ipynb](demo.ipynb) or \n\n```python\nfrom leann import LeannBuilder, LeannSearcher, LeannChat\nfrom pathlib import Path\nINDEX_PATH = str(Path(\"./\").resolve() / \"demo.leann\")\n\n---\n\n# Pull a lightweight model (recommended for consumer hardware)\nollama pull llama3.2:1b\n```\n\n**Linux:**\n\n```bash\n\n---\n\n# Install Ollama\ncurl -fsSL https://ollama.ai/install.sh | sh\n\n---\n\n# Pull a lightweight model (recommended for consumer hardware)\nollama pull llama3.2:1b\n```\n\n</details>\n\n---\n\n# Install dependencies\nuv pip install colpali_engine pdf2image pillow matplotlib qwen_vl_utils einops seaborn\nbrew install poppler  # macOS only, for PDF processing\n```\n\n#### Build Index\n```bash\npython -m apps.colqwen_rag build \\\n  --pdfs ./pdf_directory/ \\\n  --index my_index \\\n  --model colqwen2  # or colpali\n```\n\n#### Search\n```bash\npython -m apps.colqwen_rag search my_index \"your question here\" --top-k 5\n```\n\n#### Models\n- **ColQwen2** (`colqwen2`): Latest vision-language model with improved performance\n- **ColPali** (`colpali`): Proven multimodal retriever\n\nFor detailed usage, see the [ColQwen Guide](docs/COLQWEN_GUIDE.md).\n\n</details>\n\n---\n\n# Search for travel plans discussed in group chats\npython -m apps.wechat_rag --query \"travel plans\" --max-items 10000\n\n---\n\n# Install LEANN globally for MCP integration\nuv tool install leann-core --with leann\nclaude mcp add --scope user leann-server -- leann_mcp\n\n---\n\n### Installation\n\nIf you followed the Quick Start, `leann` is already installed in your virtual environment:\n```bash\nsource .venv/bin/activate\nleann --help\n```\n\n**To make it globally available:**\n```bash\n\n---\n\n# Install the LEANN CLI globally using uv tool\nuv tool install leann-core --with leann\n\n---\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) for details.","github_created_at":"2025-06-09T06:52:59+00:00","created_at":"2026-07-07T17:36:59.235186+00:00","updated_at":"2026-08-18T06:02:23.454239+00:00","categories":[{"slug":"data-retrieval","name":"Data & Retrieval","url":"https://www.graphcanon.com/categories/data-retrieval","markdown_url":"https://www.graphcanon.com/categories/data-retrieval.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/data-retrieval"},{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"}],"tags":[{"slug":"ai","name":"ai"},{"slug":"faiss","name":"faiss"},{"slug":"gpt-oss","name":"gpt-oss"},{"slug":"langchain","name":"langchain"},{"slug":"llama-index","name":"llama-index"},{"slug":"llm","name":"llm"},{"slug":"localstorage","name":"localstorage"},{"slug":"offline-first","name":"offline-first"}],"trust":{"provenance":{"is_fork":false,"github_id":998732712,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-18T06:02:22.645Z","maintenance":{"label":"Active","score":82,"methodology":"github_public_v1","releases_90d":0,"days_since_push":17,"last_release_at":"2026-03-08T21:37:22Z","stars_delta_30d":81,"open_issues_delta_30d":0},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T11:08:32.111Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-18T06:02:23.096Z"},"has_cli":{"value":true,"source":"pyproject.toml:[project.scripts]","observed_at":"2026-08-18T06:02:23.096Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-08-18T06:02:23.096Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-18T06:02:23.096Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["When you need significant storage savings, LEANN offers up to 97% reduction compared to other solutions.","If privacy is a top concern, use LEANN for fully private RAG applications directly on your device without relying on cloud services."],"when_not_to_use":["Avoid using LEANN if you have strict hardware limitations since it requires the installation of both Python and C++ dependencies.","LEANN may not be suitable for users who prefer tools that do not demand manual setup of vector databases or models like Ollama and ColQwen2."],"source":"enrich:decision_facts","observed_at":"2026-07-11T15:20:51.123Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"LEANN is a retrieval-augmented generation (RAG) application that provides substantial storage savings and ensures privacy. It supports various models such as ColQwen2 and ColPali, making it easy to integrate into Python,"}]}}