Creating Your Own Tailored GPT-3 Powered Chatbot on Windows - A Comprehensive Guide
Creating Your Own Tailored GPT-3 Powered Chatbot on Windows - A Comprehensive Guide
Quick Links
- Why Would You Want Your Own Local AI Chatbot?
- How to Host Your Own Local GPT Chatbot on Windows
- Step 1: Install Docker and the Windows Terminal App
- Step 2: Download the Text Generation Web UI GitHub Repository
- Step 3: Launch the Text Generation Web UI
- Step 4: Install the GPT-2 Model From OpenAI
- Step 5: Start Using Your Custom GPT AI Chatbot
Key Takeaways
- Running your own local GPT chatbot on Windows is free from online restrictions and censorship.
- Install text-generation-web-ui using Docker on a Windows PC with WSL support and a compatible GPU.
- Customize and train your GPT chatbot for your own specific use cases, like querying and summarizing your own documents, helping you write programs, or imitating your own characters.
There are a number of advantages to running a GPT/AI chatbot on your own computer rather than accessing one on the Internet. We’ll show why you might want to, and the easiest way to get it set up on Windows.
Why Would You Want Your Own Local AI Chatbot?
While online AI chatbots like ChatGPT are dominant, with access to huge amounts of training data and up-to-date information, there are a few reasons you might want to run your own local chatbot on your Windows computer.
Running your own AI tools locally is free, and comes without the restrictions of online tools: There’s no censorship, and you can load whatever machine-learning models, tailor their responses and behavior, and provide any prompt, all without restriction (and in total privacy). It’s also a good way to get an understanding of how modern large language model (LLM) AI tools work under the hood, especially if you are looking to get into the AI or tech industry.
You can find models for just about anything, from fictional character interactions, to programming, to general knowledge, and many other use cases that more general online models may not cover.
How to Host Your Own Local GPT Chatbot on Windows
This tutorial will use text-generation-web-ui-docker , an open-source interface for large language models, that simplifies installing and using LLMs.
text-generation-web-ui-docker bundles the text-generation-web-ui project using Docker , which removes the need for installing and managing all the complex dependencies that local AI tools usually require by storing everything in a container separate to your system. The only thing you need to run your local chatbot is a Windows PC that supports Docker running using the Windows Subsystem for Linux (WSL) . You’ll also need a fairly recent GPU, ideally one from NVIDIA, for maximum compatibility.
Key features:
• Import from any devices and cams, including GoPro and drones. All formats supported. Сurrently the only free video editor that allows users to export in a new H265/HEVC codec, something essential for those working with 4K and HD.
• Everything for hassle-free basic editing: cut, crop and merge files, add titles and favorite music
• Visual effects, advanced color correction and trendy Instagram-like filters
• All multimedia processing done from one app: video editing capabilities reinforced by a video converter, a screen capture, a video capture, a disc burner and a YouTube uploader
• Non-linear editing: edit several files with simultaneously
• Easy export to social networks: special profiles for YouTube, Facebook, Vimeo, Twitter and Instagram
• High quality export – no conversion quality loss, double export speed even of HD files due to hardware acceleration
• Stabilization tool will turn shaky or jittery footage into a more stable video automatically.
• Essential toolset for professional video editing: blending modes, Mask tool, advanced multiple-color Chroma Key
Step 1: Install Docker and the Windows Terminal App
Docker containers are similar to virtual machines in that they contain a whole running system, but they are much more lightweight, and perfect for distributing applications and all of their requirements in a single, easy-to-install bundle. To run text-generation-web-ui-docker in Docker, download and install Docker on your Windows system .
Docker can run on Windows in one of two ways: WSL or Hyper-V mode. WSL is recommended for most users, so you may need to enable it before installing Docker.
It’s also recommended to install the Windows Terminal app , as it provides a convenient interface for WSL, PowerShell, and the Windows command line.
Step 2: Download the Text Generation Web UI GitHub Repository
To download text-generation-web-ui-docker, visit its GitHub page . You can download a “.zip” file containing all the files you need by clicking on the green “Code” button and then clicking on “Download Zip” from the drop-down menu.
The screenshot below shows you where to find this on the GitHub page.
Brad Morton / How-To Geek
Extract the downloaded ZIP file into its own folder, and then open the folder containing the unzipped files. Don’t worry too much about the contents of this folder: it’s all the moving parts for your AI chatbot, but Docker will take care of setting everything up for you.
Step 3: Launch the Text Generation Web UI
Before you launch text-generation-web-ui-docker, you need to make sure it’s configured for your PC hardware. Edit the file docker-compose.yml to specify the variant that matches your hardware: default-nvidia or default-cpu (if you don’t have a compatible GPU).
Brad Morton / How-To Geek
Then, still in the folder containing the downloaded and extracted files, right-click on an empty space and click “Open in Terminal” to open the directory in a new PowerShell window.
Brad Morton / How-To Geek
Make sure Docker Desktop is running before typing in the following Docker command into the Terminal window:
docker compose up -d
This command will do the following:
- Executes docker compose, the program that manages Docker applications
- Start the container using the up command
- Runs the container in the background (called detached mode, which is specified by the -d)
SwifDoo PDF Perpetual (1 PC) Free upgrade. No monthly fees ever.
Brad Morton / How-To Geek
If you haven’t run this command before and the application needs to be downloaded (pulled), you might need to go and make a cup of tea, as it could take a while. Once the command has completed running successfully, you’ll see that the text-generation-web-ui-docker Docker container has been created and started.
Brad Morton / How-To Geek
The running container will also appear in Docker Desktop, where you can stop, start, and manage it.
Brad Morton / How-To Geek
Step 4: Install the GPT-2 Model From OpenAI
Once text-generation-web-ui-docker is up and running in Docker, you can access it by typing the address http://localhost:7860 into your browser’s address bar. Localhost is the address your computer uses to access services it is running itself, each of which is assigned a unique port number (in this case 7860). You can see what ports a running Docker container has made available on localhost by opening it in Docker desktop.
This is an older version of GPT than you get when you use ChatGPT on the internet. Consequently, it won’t be as smart or as intuitive as what you might expect, but it is customizable and private.
Navigate to the Model tab in the web interface and enter openai-community/gpt2 into the “Download model or LoRA” box, and then click the Download button. This might take a few minutes.
Brad Morton / How-To Geek
Click the Refresh icon in the top-left, then select the newly downloaded openai-community/gpt2 from the adjacent Model drop-down menu. Finally, click the “Load” button, and wait a few minutes until you see a success message.
Brad Morton / How-To Geek
This model works out of the box, and doesn’t require any signup. As you get into AI and want to experiment with different models and AI tools, you can find more on HuggingFace .
Step 5: Start Using Your Custom GPT AI Chatbot
This isn’t quite like the AI chatbots you’re used to using online, which are already set up for general use that cover a lot of situations. You’ll need to tell the model how to behave before interacting with it, otherwise its output will be a bit… unhinged.
Brad Morton / How-To Geek
Hoo boy, while it got the right answer, this AI chatbot needs a bit of fine-tuning.
There’s a lot you can tweak, and it can be a bit clunky at first, but with practice and experience, you can build a chatbot that is specific to your own usage, and that keeps your data 100% on your own computer, which is great for business and other confidential use-cases. To learn how to configure and train your local GPT chatbot, check out the text-generation-web-ui documentation and the OpenAI GP2 docs on HuggingFace .
If you want to generate images using AI from your Windows PC, you can use Fooocus to get easier and more immediate results.
- Title: Creating Your Own Tailored GPT-3 Powered Chatbot on Windows - A Comprehensive Guide
- Author: John
- Created at : 2024-08-30 13:09:16
- Updated at : 2024-08-31 13:09:16
- Link: https://techno-recovery.techidaily.com/creating-your-own-tailored-gpt-3-powered-chatbot-on-windows-a-comprehensive-guide/
- License: This work is licensed under CC BY-NC-SA 4.0.