GPT

How to Run Local GPT on Your Windows PC

In this guide, we’ll show you how to run Local GPT on your Windows PC while ensuring 100% data privacy. We’ll cover the steps to install necessary software, set up a virtual environment, and overcome any errors that might occur. Let’s get started!

Table of Contents

  1. Introduction
  2. Installing Miniconda
  3. Setting Up the Local GPT Repository
  4. Creating a Virtual Environment
  5. Installing Required Packages
  6. Running the Ingestion Process
  7. Running Local GPT
  8. Conclusion

Introduction

Today, we will walk you through the process of running Local GPT on your Windows PC. This ensures that all your data stays on your local system, guaranteeing complete privacy.

Installing Miniconda

First, we need to install Miniconda, which helps us create a virtual environment and manage packages.

  1. Search for Miniconda: Open your browser and search for “Miniconda.” Here is the link for Miniconda.
  2. Download Miniconda: Choose the Windows installer and click on “Download the installer.” Then, scroll down and click on “Miniconda 3 Windows 64-bit.”
  3. Install Miniconda:
  • Go to your Downloads folder and double-click the Miniconda file to start the installation.
  • Follow the prompts by clicking “Next,” then “I Agree.”
  • Choose the installation location and click “Next.”
  • Check all the boxes and click “Install.”
  • Once installed, click “Finish.”

To verify the installation, open your Windows search, type “Anaconda,” and pin it to your taskbar. Open it and type conda list to check if everything is installed correctly.

Setting Up the Local GPT Repository

Next, we will download the Local GPT repository from GitHub.

  1. Search for Local GPT: In your browser, type “Local GPT” and open the link related to Prompt Engineer. Here is the link for Local GPT.
  2. Download the Repository: Click the “Code” button and select “Download ZIP.” The file is around 3.5 MB.
  3. Extract the ZIP File: Locate the downloaded ZIP file, right-click it, and select “Extract All.” Click “Extract.”

Rename the extracted folder for easy access and place it on your desktop.

Creating a Virtual Environment

Now, let’s set up a virtual environment to install all dependencies.

  1. Open Conda Terminal
  2. Create Virtual Environment: Type the following command and press Enter:
   conda create -n your_env_name python=3.10

Replace your_env_name with a name of your choice. Type y to proceed.

  1. Activate Virtual Environment: Type the following command and press Enter:
   conda activate your_env_name

Installing Required Packages

Navigate to your Local GPT folder using the following commands:

  1. Navigate to Desktop:
   cd Desktop
  1. Navigate to Local GPT Folder:
   cd Local-GPT
  1. Install Packages: Install all required packages with the following command:
   pip install -r requirements.txt

If you encounter an error related to C++ compilation, download and install the Microsoft C++ Build Tools.

Running the Ingestion Process

The ingestion process involves importing data from documents.

  1. Run Ingestion Command: Type the following command and press Enter:
   python ingest.py

This command processes your documents and stores their embeddings in a vector database (Chroma DB).

Running Local GPT

Finally, we will run Local GPT.

  1. Modify Constants File: Open the constants.py file in your Local GPT folder. Comment out the Llama 3 model and uncomment the Llama 2 model (7 billion parameters).
  2. Run Local GPT: Type the following command and press Enter:
   python run_local_gpt.py

If you see an error about the Llama CPP python library, install it and re-run the command.

Conclusion

You have now successfully set up and run Local GPT on your Windows PC. This ensures your data remains private while utilizing powerful GPT capabilities. If you have any questions or need further assistance, feel free to leave a comment.

Enjoy your Local GPT experience!

Leave a Reply

Your email address will not be published. Required fields are marked *