{"id":13456018,"url":"https://github.com/IntelLabs/fastRAG","last_synced_at":"2025-03-24T09:31:20.324Z","repository":{"id":88953852,"uuid":"592391289","full_name":"IntelLabs/fastRAG","owner":"IntelLabs","description":"Efficient Retrieval Augmentation and Generation Framework","archived":false,"fork":false,"pushed_at":"2024-05-22T15:13:25.000Z","size":21320,"stargazers_count":945,"open_issues_count":3,"forks_count":75,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-05-22T16:29:22.077Z","etag":null,"topics":["benchmark","colbert","diffusion","generative-ai","information-retrieval","knowledge-graph","llm","multi-modal","nlp","question-answering","semantic-search","sentence-transformers","summarization","transformers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IntelLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T16:25:35.000Z","updated_at":"2024-05-22T16:29:35.932Z","dependencies_parsed_at":"2024-05-22T16:29:30.872Z","dependency_job_id":null,"html_url":"https://github.com/IntelLabs/fastRAG","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2FfastRAG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2FfastRAG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2FfastRAG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2FfastRAG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IntelLabs","download_url":"https://codeload.github.com/IntelLabs/fastRAG/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245243244,"owners_count":20583590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","colbert","diffusion","generative-ai","information-retrieval","knowledge-graph","llm","multi-modal","nlp","question-answering","semantic-search","sentence-transformers","summarization","transformers"],"created_at":"2024-07-31T08:01:14.936Z","updated_at":"2025-03-24T09:31:20.319Z","avatar_url":"https://github.com/IntelLabs.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"assets/fastrag_header.png\" width=\"300\"/\u003e\n\n---\n\n\u003ch4 align=\"center\"\u003e\n    \u003cp\u003eBuild and explore efficient retrieval-augmented generative models and applications\u003c/p\u003e\n\u003c/h4\u003e\n\n![PyPI - Version](https://img.shields.io/pypi/v/fastrag)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/fastrag)\n\n:round_pushpin: \u003ca href=\"#round_pushpin-installation\"\u003eInstallation\u003c/a\u003e • :rocket: \u003ca href=\"components.md\"\u003eComponents\u003c/a\u003e • :books: \u003ca href=\"examples.md\"\u003eExamples\u003c/a\u003e • :red_car: \u003ca href=\"getting_started.md\"\u003eGetting Started\u003c/a\u003e • :pill: \u003ca href=\"Demo.md\"\u003eDemos\u003c/a\u003e • :pencil2: \u003ca href=\"scripts/README.md\"\u003eScripts\u003c/a\u003e • :bar_chart: \u003ca href=\"benchmarks/README.md\"\u003eBenchmarks\u003c/a\u003e\n\n\u003c/div\u003e\n\nfast**RAG** is a research framework for ***efficient*** and ***optimized*** retrieval augmented generative pipelines,\nincorporating state-of-the-art LLMs and Information Retrieval. fastRAG is designed to empower researchers and developers\nwith a comprehensive tool-set for advancing retrieval augmented generation.\n\nComments, suggestions, issues and pull-requests are welcomed! :heart:\n\n\u003e [!IMPORTANT]\n\u003e Now compatible with Haystack v2+. Please report any possible issues you find.\n\n## :mega: Updates\n\n- **2024-05**: fastRAG V3 is Haystack 2.0 compatible :fire:\n- **2023-12**: Gaudi2 and ONNX runtime support; Optimized Embedding models; Multi-modality and Chat demos; [REPLUG](https://arxiv.org/abs/2301.12652) text generation.\n- **2023-06**: ColBERT index modification: adding/removing documents; see [IndexUpdater](libs/colbert/colbert/index_updater.py).\n- **2023-05**: [RAG with LLM and dynamic prompt synthesis example](examples/rag-prompt-hf.ipynb).\n- **2023-04**: Qdrant `DocumentStore` support.\n\n## Key Features\n\n- **Optimized RAG**: Build RAG pipelines with SOTA efficient components for greater compute efficiency.\n- **Optimized for Intel Hardware**: Leverage [Intel extensions for PyTorch (IPEX)](https://github.com/intel/intel-extension-for-pytorch), [🤗 Optimum Intel](https://github.com/huggingface/optimum-intel) and [🤗 Optimum-Habana](https://github.com/huggingface/optimum-habana) for *running as optimal as possible* on Intel® Xeon® Processors and Intel® Gaudi® AI accelerators.\n- **Customizable**: fastRAG is built using [Haystack](https://github.com/deepset-ai/haystack) and HuggingFace. All of fastRAG's components are 100% Haystack compatible.\n\n## :rocket: Components\n\nFor a brief overview of the various unique components in fastRAG refer to the [Components Overview](components.md) page.\n\n\u003cdiv class=\"tg-wrap\" align=\"center\"\u003e\n\u003ctable style=\"undefined;table-layout: fixed; width: 600px; text-align: center;\"\u003e\n\u003ccolgroup\u003e\n\u003c!-- \u003ccol style=\"width: 229px\"\u003e --\u003e\n\u003c!-- \u003ccol style=\"width: 238px\"\u003e --\u003e\n\u003c/colgroup\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e\u003cstrong\u003e\u003cem\u003eLLM Backends\u003c/em\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"components.md#fastrag-running-llms-with-habana-gaudi-(dl1)-and-gaudi-2\"\u003eIntel Gaudi Accelerators\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cem\u003eRunning LLMs on Gaudi 2\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"components.md#fastrag-running-llms-with-onnx-runtime\"\u003eONNX Runtime\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cem\u003eRunning LLMs with optimized ONNX-runtime\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"components.md#fastrag-running-quantized-llms-using-openvino\"\u003eOpenVINO\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cem\u003eRunning quantized LLMs using OpenVINO\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"components.md#fastrag-running-rag-pipelines-with-llms-on-a-llama-cpp-backend\"\u003eLlama-CPP\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cem\u003eRunning RAG Pipelines with LLMs on a Llama CPP backend\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e\u003cstrong\u003e\u003cem\u003eOptimized Components\u003c/em\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"scripts/optimizations/embedders/README.md\"\u003eEmbedders\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003eOptimized int8 bi-encoders\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"scripts/optimizations/reranker_quantization/quantization.md\"\u003eRankers\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003eOptimized/sparse cross-encoders\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e\u003cstrong\u003e\u003cem\u003eRAG-efficient Components\u003c/em\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"components.md#ColBERT-v2-with-PLAID-Engine\"\u003eColBERT\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003eToken-based late interaction\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"components.md#Fusion-In-Decoder\"\u003eFusion-in-Decoder (FiD)\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003eGenerative multi-document encoder-decoder\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"components.md#REPLUG\"\u003eREPLUG\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003eImproved multi-document decoder\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"components.md#ColBERT-v2-with-PLAID-Engine\"\u003ePLAID\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003eIncredibly efficient indexing engine\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/div\u003e\n\n## :round_pushpin: Installation\n\nPreliminary requirements:\n\n- **Python** 3.8 or higher.\n- **PyTorch** 2.0 or higher.\n\nTo set up the software, install from `pip` or clone the project for the bleeding-edge updates. Run the following, preferably in a newly created virtual environment:\n\n```bash\npip install fastrag\n```\n\n### Extra Packages\n\nThere are additional dependencies that you can install based on your specific usage of fastRAG:\n\n```bash\n# Additional engines/components\npip install fastrag[intel]               # Intel optimized backend [Optimum-intel, IPEX]\npip install fastrag[openvino]            # Intel optimized backend using OpenVINO\npip install fastrag[elastic]             # Support for ElasticSearch store\npip install fastrag[qdrant]              # Support for Qdrant store\npip install fastrag[colbert]             # Support for ColBERT+PLAID; requires FAISS\npip install fastrag[faiss-cpu]           # CPU-based Faiss library\npip install fastrag[faiss-gpu]           # GPU-based Faiss library\n```\n\nTo work with the latest version of fastRAG, you can install it using the following command:\n\n```bash\npip install .\n```\n\n### Development tools\n\n```bash\npip install .[dev]\n```\n\n## License\n\nThe code is licensed under the [Apache 2.0 License](LICENSE).\n\n## Disclaimer\n\nThis is not an official Intel product.\n","funding_links":[],"categories":["Python","Table of Contents","\u003cspan id=\"game\"\u003eGame (World Model \u0026 Agent)\u003c/span\u003e","Industry Strength Information Retrieval","A01_文本生成_文本对话","nlp","Libraries/Frameworks","Open Source Tools"],"sub_categories":["AI - Natural Language Processing","\u003cspan id=\"tool\"\u003eLLM (LLM \u0026 Tool)\u003c/span\u003e","大语言对话模型及数据"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIntelLabs%2FfastRAG","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIntelLabs%2FfastRAG","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIntelLabs%2FfastRAG/lists"}