fastrag

Efficient Retrieval Augmentation and Generation Framework

https://github.com/intellabs/fastrag

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary

Keywords

benchmark colbert diffusion generative-ai information-retrieval knowledge-graph llm multi-modal nlp question-answering semantic-search sentence-transformers summarization transformers

Keywords from Contributors

cryptocurrency cryptography jax transformer
Last synced: 6 months ago · JSON representation ·

Repository

Efficient Retrieval Augmentation and Generation Framework

Basic Info
  • Host: GitHub
  • Owner: IntelLabs
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 20.4 MB
Statistics
  • Stars: 1,534
  • Watchers: 16
  • Forks: 142
  • Open Issues: 3
  • Releases: 10
Topics
benchmark colbert diffusion generative-ai information-retrieval knowledge-graph llm multi-modal nlp question-answering semantic-search sentence-transformers summarization transformers
Created about 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing License Citation Security

README.md

---

Build and explore efficient retrieval-augmented generative models and applications

![PyPI - Version](https://img.shields.io/pypi/v/fastrag) ![PyPI - Downloads](https://img.shields.io/pypi/dm/fastrag) :round_pushpin: Installation • :rocket: Components • :books: Examples • :red_car: Getting Started • :pill: Demos • :pencil2: Scripts • :bar_chart: Benchmarks

fastRAG is a research framework for efficient and optimized retrieval augmented generative pipelines, incorporating state-of-the-art LLMs and Information Retrieval. fastRAG is designed to empower researchers and developers with a comprehensive tool-set for advancing retrieval augmented generation.

Comments, suggestions, issues and pull-requests are welcomed! :heart:

[!IMPORTANT] Now compatible with Haystack v2+. Please report any possible issues you find.

:mega: Updates

  • 2024-05: fastRAG V3 is Haystack 2.0 compatible :fire:
  • 2023-12: Gaudi2 and ONNX runtime support; Optimized Embedding models; Multi-modality and Chat demos; REPLUG text generation.
  • 2023-06: ColBERT index modification: adding/removing documents; see IndexUpdater.
  • 2023-05: RAG with LLM and dynamic prompt synthesis example.
  • 2023-04: Qdrant DocumentStore support.

Key Features

  • Optimized RAG: Build RAG pipelines with SOTA efficient components for greater compute efficiency.
  • Optimized for Intel Hardware: Leverage Intel extensions for PyTorch (IPEX), 🤗 Optimum Intel and 🤗 Optimum-Habana for running as optimal as possible on Intel® Xeon® Processors and Intel® Gaudi® AI accelerators.
  • Customizable: fastRAG is built using Haystack and HuggingFace. All of fastRAG's components are 100% Haystack compatible.

:rocket: Components

For a brief overview of the various unique components in fastRAG refer to the Components Overview page.

LLM Backends
Intel Gaudi Accelerators Running LLMs on Gaudi 2
ONNX Runtime Running LLMs with optimized ONNX-runtime
OpenVINO Running quantized LLMs using OpenVINO
Llama-CPP Running RAG Pipelines with LLMs on a Llama CPP backend
Optimized Components
Embedders Optimized int8 bi-encoders
Rankers Optimized/sparse cross-encoders
RAG-efficient Components
ColBERT Token-based late interaction
Fusion-in-Decoder (FiD) Generative multi-document encoder-decoder
REPLUG Improved multi-document decoder
PLAID Incredibly efficient indexing engine

:round_pushpin: Installation

Preliminary requirements:

  • Python 3.8 or higher.
  • PyTorch 2.0 or higher.

To 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:

bash pip install fastrag

Extra Packages

There are additional dependencies that you can install based on your specific usage of fastRAG:

```bash

Additional engines/components

pip install fastrag[intel] # Intel optimized backend [Optimum-intel, IPEX] pip install fastrag[openvino] # Intel optimized backend using OpenVINO pip install fastrag[elastic] # Support for ElasticSearch store pip install fastrag[qdrant] # Support for Qdrant store pip install fastrag[colbert] # Support for ColBERT+PLAID; requires FAISS pip install fastrag[faiss-cpu] # CPU-based Faiss library pip install fastrag[faiss-gpu] # GPU-based Faiss library ```

To work with the latest version of fastRAG, you can install it using the following command:

bash pip install .

Development tools

bash pip install .[dev]

License

The code is licensed under the Apache 2.0 License.

Disclaimer

This is not an official Intel product.

Owner

  • Name: Intel Labs
  • Login: IntelLabs
  • Kind: organization
  • Location: Around the globe

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Izsak"
  given-names: "Peter"
  orcid: "https://orcid.org/0000-0001-8354-6823"
- family-names: "Berchansky"
  given-names: "Moshe"
  orcid: "https://orcid.org/0000-0001-9227-8939"
- family-names: "Fleischer"
  given-names: "Daniel"
  orcid: "https://orcid.org/0000-0003-4031-4410"
- family-names: "Laperdon"
  given-names: "Ronen"
title: "fastRAG: Efficient Retrieval Augmentation and Generation Framework"
version: 1.0
license: Apache-2.0
date-released: 2023-02-16
url: "https://github.com/IntelLabs/fastrag"

GitHub Events

Total
  • Create event: 11
  • Release event: 5
  • Issues event: 10
  • Watch event: 304
  • Delete event: 6
  • Member event: 1
  • Issue comment event: 13
  • Push event: 14
  • Pull request review comment event: 1
  • Pull request review event: 9
  • Pull request event: 13
  • Fork event: 33
Last Year
  • Create event: 11
  • Release event: 5
  • Issues event: 10
  • Watch event: 304
  • Delete event: 6
  • Member event: 1
  • Issue comment event: 13
  • Push event: 14
  • Pull request review comment event: 1
  • Pull request review event: 9
  • Pull request event: 13
  • Fork event: 33

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 73
  • Total Committers: 13
  • Avg Commits per committer: 5.615
  • Development Distribution Score (DDS): 0.699
Past Year
  • Commits: 23
  • Committers: 8
  • Avg Commits per committer: 2.875
  • Development Distribution Score (DDS): 0.696
Top Committers
Name Email Commits
Peter Izsak 2****z 22
Daniel Fleischer d****r@i****m 22
Moshe Berchansky m****y@i****m 13
Peter Izsak p****k@i****m 5
Michael Beale m****e@i****m 3
gadmarkovits g****s@i****m 1
Tuana Çelik t****k@d****i 1
Ofir Zafrir z****o@g****m 1
Nicolas Oliver d****r@i****m 1
Mihai m****u@y****m 1
Bilge Yücel b****l@d****i 1
Appu Shaji a****e@g****m 1
Alok Joshi A****3@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 35
  • Total pull requests: 40
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 30
  • Total pull request authors: 11
  • Average comments per issue: 1.97
  • Average comments per pull request: 0.2
  • Merged pull requests: 39
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 7
  • Pull requests: 9
  • Average time to close issues: 10 days
  • Average time to close pull requests: 1 day
  • Issue authors: 7
  • Pull request authors: 6
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.33
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Matthieu-Tinycoaching (2)
  • richhh520 (2)
  • karrtikiyer-tw (2)
  • abm1499 (2)
  • TuanaCelik (2)
  • satyaloka93 (1)
  • HassamSheikh (1)
  • jon-chuang (1)
  • bdecarne (1)
  • nossu3751 (1)
  • TyTodd (1)
  • Maximiliano-Villanueva (1)
  • szhang42 (1)
  • Lord-Psarris (1)
  • fatpandaria (1)
Pull Request Authors
  • mosheber (20)
  • peteriz (14)
  • danielfleischer (12)
  • appoose (2)
  • dnoliver (2)
  • bilgeyucel (2)
  • Mihaiii (2)
  • ofirzaf (2)
  • gadmarkovits (2)
  • TuanaCelik (1)
  • Alok-Joshi (1)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels
documentation (3) enhancement (3)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 124 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 24
  • Total maintainers: 1
proxy.golang.org: github.com/intellabs/fastrag
  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 7.0%
Last synced: 6 months ago
proxy.golang.org: github.com/IntelLabs/fastRAG
  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 7.0%
Last synced: 6 months ago
pypi.org: fastrag

An Efficient Retrieval Augmentation and Generation Framework for Intel Hardware.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 124 Last month
Rankings
Dependent packages count: 10.7%
Average: 35.5%
Dependent repos count: 60.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
scripts/optimizations/embedders/requirements.txt pypi
  • aim *
  • evaluate *
  • intel-extension-for-transformers *
  • mpi4py *
  • mteb *
  • optimum *