PrivateGPT — Use “ChatGPT” offline on local files.

Lio ♾️☁️
2 min readJun 6, 2023

--

PrivateGPT is a Python tool that uses GPT4ALL, an open source big language model, to query local files. It is relatively simple to set up:

Step I

  1. Clone the repository: The first step we will be taking is to clone the repo to you local computer.

git clone https://github.com/imartinez/privateGPT.git

2. Download the LLM [Large Language Model] — (about 10GB) and save it in a new folder called models.

Step II

3. Next step, go ahead and put the documents you want to examine in the source_documents folder; by default, there is a text of the final US state of the union in there.

4. Run the ingest.py script — this may take a while. However, it took 2 minutes on this MacBook M1.

Step III

5. Next run the privateGPT.py script. When you do, you will get a prompt in your Terminal:

Let’s do a test-run

I asked it — What does the US president has to say about the future of the Ukraine, and it offered me a synopsis as well as the location in the document where the information is found. 👇

Awesome!

That’s all for today. 👋

Thank you for reading to the end!

> Career tip! I’m not sure how you do it, but please click the Green Follow Button on the top right side.😅

If you found my article useful, please SHARE it with your colleagues and CLAP (up to 50!), follow me on Medium, and connect with me on LinkedIn to remain up to speed on my new articles.

--

--

Lio ♾️☁️

Binge 🥰 Jesus | Code 🧑‍💻 | Teach 🧑‍🏫| Build 🗼 | Ship 🚢 | Repeat ♻️