Skip to content

Use Falcon 7B L.L.M. to privately query your documents. No data leaks

License

Notifications You must be signed in to change notification settings

pompos02/PrivateFalcon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦅 PrivateFalcon

PrivateFalcon is a Python script that allows you to locally query documents using the Falcon-7b Language Model (L.L.M) from HuggingFace. This script is designed to work with documents that have been ingested into a VectorStore using the ingest.py file. With PrivateFalcon, you can perform efficient and accurate document retrieval and similarity searches.

🔧 Prerequisites

Before you begin, make sure you have the following prerequisites in place:

  • Python 3.x
  • A pre-trained Falcon-7b model (Will be installed by the script)
  • Documents Placed in the data/ directory
  • .env file containing:
DB_DIRECTORY=vectors
EMBEDDINGS_MODEL=all-MiniLM-L6-v2
SOURCE_CHUNKS=<Number of chunks used to create an answer, if lost - put 4>
MAX_NEW_TOKENS=200
CHUNK_SIZE=<The size of each chunk, if lost - put 1000>
CHUNK_OVERLAP=<The overlapping of different chunks, if lost - put 100>

You can put any other embeddings model into that variable.

📥 Installation

  1. Clone the repository
git repo clone https://github.com/AdiKsOnDev/PrivateFalcon.git
  1. Install the dependencies
pip install -r requirements

📊 Usage

PrivateFalcon is easy to use:

  1. Place your documents into the data/ directory.
  2. Run:
python ingest.py
  1. After creating a VectorStore, run:
python main.py

📂 Directory Structure

PrivateFalcon/
├── main.py             # Ask questions
├── ingest.py           # Script that ingests your documents
├── vectors/            # Directory with ingested documents
├── data/               # Directory with the source documents
├── requirements.txt    # .txt file with all the dependencies

📂 Allowed file extensions

  • .csv
  • .doc
  • .docx
  • .enex
  • .epub
  • .html
  • .md
  • .odt
  • .pdf
  • .ppt
  • .pptx
  • .txt

🤝 Contributing

If you want to contribute to PrivateFalcon, feel free to submit a pull request or make an Issue

📧 Contact

For any questions or issues, please contact me at adilalizade13@gmail.com

Happy querying with PrivateFalcon! 🦅🔍

About

Use Falcon 7B L.L.M. to privately query your documents. No data leaks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%