NEW: Find your perfect tool with our matching quiz

Take a quiz

Table of Content

How to run a ChatGPT model locally and offline with GPT4All and train it with your docs

Tutorial
|
Domantas Alosevičius

The GPT4All Chat Client allows easy interaction with any local large language model. You can have access to your artificial intelligence anytime and anywhere. But the best part about this model is that you can give access to a folder or your offline files for GPT4All to give answers based on them without going online. 

run chatgpt local

Additionally, you do not need to worry about the security of your files, as none of them are used to train other OpenAI tools, and the client is not connected to the internet.

GPT4All is optimized to run 7-13B parameter large language models on the CPUs of any computer running OSX/Windows/Linux. It has a very simple user interface much like Open AI’s ChatGPT.

Why should I run this ChatGPT locally (GPT4All)?

There are several reasons why you might want to use ChatGPT locally. One reason is that running ChatGPT on your own computer allows you to have more control over the model and its responses. For example, you could customize the model to generate different kinds of creative text formats, and also it has a user-friendly interface and train it with your local files.

Why should I run this ChatGPT locally?

Another reason to use ChatGPT locally is that it can be faster than using it online. This is especially important if you need to use ChatGPT for numerous tasks or if you need to use it in real-time.

Finally, running ChatGPT locally means that you don’t have to worry about privacy. When you use ChatGPT online, your data is transmitted to ChatGPT’s servers and is subject to their privacy policies. However, if you run ChatGPT locally, your data never leaves your own computer.

How does GPT4All work?

GPT4All is an ecosystem designed to train and deploy powerful and customised large language models. These models can run locally on consumer-grade CPUs without an internet connection.

The developers of this tool have a vision for it to be the best instruction-tuned, assistant-style language model that anyone can freely use, distribute and build upon.

How does GPT4all work?

A GPT4All model is a 3GB – 8GB file that you can download and plug into the GPT4All open-source ecosystem software. Nomic AI maintains this software ecosystem to ensure quality and security while also leading the effort to enable anyone to train and deploy their own large language models.

Is it safe to install ChatGPT locally (GPT4All) ?

Yes, if you install ChatGPT locally (GPT4All) it does not have a connection to the internet. All it is is a master model that chooses when to call the other ones depending on the query at the time. So if you upload all your personal files no one else will have access to it.

Key features:

Using Nomic AI’s GPT4All has several advantages:

  • Answer questions about anything: You can use any ChatGPT version for your personal use to answer even simple questions.
  • Personal writing assistant: Write emails, documents, stories, songs, play based on your previous work.
  • Reading documents: Provide any text documents and receive summaries and answers about them
  • Write code: You can get guidance on easy coding taks. Althoug, code capabilites are still under improvement.

Step by step guide: How to install a ChatGPT model locally with GPT4All

1. Download and Installation

Step 1: Download and Installation
  1. Download it from gpt4all.io
  2. GPT4All works on Windows, Mac and Ubuntu systems.
  3. After download and installation you should be able to find the application in the directory you specified in the installer. You will find a desktop icon for GPT4All after installation.

NOTE: On Windows, the installer might show a security complaint. This is being addressed and should be fixed soon by Nomic AI.

2. Installing a model locally

Step: Installing a model locally
  1. After you install GPT4All , you will need to pick an install a model.
  2. Choose a chat-based model Mistral OpenOrca. You can also download ChatGPT-4 but it will send your chats to OpenAI. For security of your documents this is not recommended.
  3. If you already have some models on your local PC give GPT4All the directory where your model files already are.

There are a lot of pre trained models to choose from but for this guide we will install OpenOrca as it works best with the LocalDocs plugin.

3. Install the LocalDocs plugin

Step 3: Install LocalDocs
  1. Go to settings
  2. Click on LocalDocs
  3. Download the SBert model as LocalDocs will not work without it.

4. Giving access to the documents (Setting up LocalDocs)

Step 4: Giving access to documents
  1. Now you just have to give access to your documents.
  2. Click Settings.
  3. Under LocalDocs, create a Collection.
  4. You can give it a whole directory of docs or other files.

5. Document collection setup

Step 5: Document collection
  1. Click the Knowledge Base icon.
  2. Enable the Collection you want the model to draw from.
  3. Give it some time for indexing
  4. Click the check button for GPT4All to take information from it

Quick tip: With every new conversation with GPT4All you will have to enable the collection as it does not auto enable.

6. You’re all set!

Now you can chat with the model it will have access to your documents, and give you citations.

Also you can see a quick example where I uploaded a history book about Roman empresses. It gives the information from the book and where it was taken from.

Quick simple example how can you use ChatGPT model locally

Well, now you have your own pre trained ChatGPT model.

A great thing you can use it for: doing a weekly review with your personal AI mentor.

The mentor has access to all of your thoughts and notes. You can see how you changed personally over time and even see information from years back if you wish.

Your data stays private and it never leaves your computer.

FAQ and common issues

1. Why is my LocalDocs plugin not using my documents?

  • Make sure LocalDocs is enabled for your chat session (the DB icon on the top-right should have a border)
  • If your document collection is large, wait a few minutes and let it index the files.

2. RAM Usage

If your system does have only 8gb of RAM and you have any browser open GPT4All might not run perfectly as it does use quite a bit of RAM. So take that in mind.

3. Do I have to give access of my documents for this model?

No, but it is a great plugin to use without internet connection on your local machine. You can just install the model without the LocalDocs plugin and use the AI tool.

4. Can I enable internet connection for capable models?

Yes, if you want to you can enable the app to connect to the internet by clicking the WIFI buttonBy enabling this feature, you will be able to participate in the democratic process of training a large language model by contributing data for future model improvements.. 

GPT4All Open Source Datalake

The GPT4All community has created the GPT4All Open Source datalake as a platform for contributing instructions and assistant fine tune data for future GPT4All model trains for them to have even more powerful capabilities. The datalake lets anyone to participate in the democratic process of training a large language model.

All data contributions to the GPT4All Datalake will be open-sourced in their raw and Atlas-curated form. More information about the datalake can be found on Github. To contribute, opt-in to share your data on start-up using the GPT4All Chat client. By default, the chat client will not allow any conversation history to leave your computer.

Final thoughts

Overall it is a great tool if you want a model of ChatGPT locally. It is faster than the online model and you do not have to worry about training the online models and you will not have any risks if you do decide to upload your own files. I think it is a big leap for natural language processing models but it still has ways to go. GPT4All might not be the most used tool but it might gain some traction in the near future.

Final thoughts

Although as all things in life it does have some drawbacks like that it uses a lot of RAM so you can forget using other RAM and CPU heavy tasks but it is better than some other models.

Should you use it? Probably. It might not be suitable for everyone as it really depends for how you use AI tools like ChatGPT. If you want guaranteed protection then this is the way to go.

But if you want an in-house, custom ChatGPT, consider hiring a company like Idea Link, which specializes in creating custom AI for businesses.

Author

Domantas
Domantas Alosevičius

Domantas Alosevičius

Domantas is a content manager and author passionate about creating quality content. He has a background in marketing, communications, and customer service and is skilled at using various AI and No Code tools. Domantas likes checking out new tools and putting them to work in his free time.

References

Read more