F*** ChatGPT. Run your private AI / Large Language Model (LLM) on your PC. Know your enemy!
People & Blogs
Introduction
In this article, we’ll guide you through the process of installing your very own artificial intelligence model locally on your PC. Forget about relying on external services like ChatGPT; with this setup, you’ll have your own AI at your fingertips. Let's jump right in!
Step 1: Install Python
The first thing you need to do is install Python, as it’s essential for running our AI models. Here’s how you can do it:
- Download Python: Go to the official Python page and download the installer.
- Install Python: Follow the default installation settings. Simply click through and agree to the terms—installation takes just a couple of minutes.
Once the installation finishes, you need to check if Python is properly installed. Open your command prompt (CMD) and type:
python --version
This should display the version of Python you just installed.
Step 2: Install AI Model Launcher
For the AI models, we’ll use a launcher called Text Generation Web UI. This tool allows you to run various models on your machine. Here’s how to get it:
- Download the Repository: Go to the Text Generation Web UI GitHub page and download the ZIP file of the repository.
- Unpack the Files: Extract the contents of the downloaded ZIP file to a designated directory. For example, create a folder named
AI
on your second drive and unpack the files there.
Step 3: Configure the Application
Open Command Prompt (preferably with administrator rights) and navigate to the directory where you unpacked the files. For instance:
D:
cd AI
Inside the directory, you will find a script named start_windows.bat
. Run this script, and it will begin downloading all the necessary packages for the AI model.
Note:
Currently, the Text Generation Web UI does not support using an GPU on Windows. Select the option that indicates you don’t have a graphics card, meaning the model will run only on the CPU. This part might take a while as it installs PyTorch and other dependencies.
Once the installation is completed, the script will launch a web user interface (UI). It will display a link to your local setup, usually at http://localhost:7860
. Open this address in your web browser to access the UI.
Step 4: Download the Model
Now that you have the UI running, you need to download an AI model. We recommend using Hugging Face, a platform that hosts a diverse collection of AI models.
- Choose a Model: For our setup, we suggest downloading a trimmed version of the newest LLaMA model, which is designed to run efficiently on less powerful hardware.
- Place the Model: When the model finishes downloading, move it to the
models
directory within your unpacked web UI directory.
Step 5: Run the Model
After placing the model file in the designated directory:
- Refresh the Web UI: Go back to the web UI in your browser and refresh the page. You should now see the model listed.
- Configure Parameters: Experiment with the settings provided. Since you’re not using a GPU, ensure that the appropriate settings reflect this.
- Start the Model: Click to load the model and it will begin to initialize.
Once everything is set up, you can start interacting with your personal AI. Type in questions such as “What is 2 plus 2?” and see how it responds!
This setup allows you to ask your local AI to write codes, generate text, or whatever your heart desires—all without needing an internet connection.
Conclusion
Congratulations! You now have your own AI model running locally on your PC. Explore its capabilities and see how it can assist you with various tasks. Enjoy the experience!
Keywords
- Python
- AI Model
- Local Installation
- Text Generation Web UI
- Hugging Face
- LLaMA Model
- CPU
FAQ
Q: Can I run this AI model without an internet connection?
A: Yes, once you have set up and downloaded the necessary files, you can run the AI completely offline.
Q: Do I need a powerful GPU to run this AI model?
A: No, the setup allows you to run models on the CPU, making it accessible without high-end graphics hardware.
Q: What if I encounter errors during installation?
A: Ensure you follow the steps accurately. Check for any error messages in the command prompt as they can guide you on what may have gone wrong.
Q: Where can I find more models?
A: You can explore models hosted on Hugging Face or other AI repositories online.