
GPT4All is an open-source graphical desktop application running large language models (LLMs) locally. GPT4All supports most desktop operating systems including macOS, Windows, and Linux to run LLMs without an active internet connection. It supports GGUF format models from sources including Hugging Face and integrates with API-based providers including Groq, OpenAI, and Mistral to run models privately.
This guide covers how to install GPT4All, download, run, and chat with LLMs locally. You will install the latest GPT4All version, set up API-based access, and chat with LLMs using local documents like spreadsheets, PDFs, text documents, notes, and configuration files.
Before you begin:
gpt4all.example.com domain for demonstration purposes.You can install GPT4All on Windows, macOS, or Linux. Follow the installation steps for your operating system in the sections below.
GPT4All is available only for Ubuntu and Debian-based desktop workstations. You can install it using the latest installation binary or Flatpak. Follow the steps below to download and install the latest installation binary on an Ubuntu 24.04 desktop workstation.
Log in to your Ubuntu desktop workstation using VNC, Nomachine, or a remote desktop client.
Open a new terminal or press CTRL + ALT + T.
Use wget to download the latest GPT4All .run installation binary for Linux from the official website.
Enable execute permissions on the downloaded gpt4all-installer-linux.run file.
Execute the gpt4all-installer-linux.run file to open the GPT4All installation wizard.
You need a full desktop environment to run the application.
Click Next > to start the installation.
Verify the installation path and click Next > to install GPT4All.
Select all components to install and click Next >.
Click I accept the license to agree to the GPT4All license.
Click Install to install GPT4All.
Monitor the installation process and click Finish to close the installer.
List the files in the GPT4All installation directory ~/gpt4all, and verify that all application files are available.
Output:
List the files in your Desktop path and verify that a GPT4All.desktop file is available in your output.
Output:
Create an applications directory for your user.
Move the GPT4All.desktop file to ./local/share/applications/ in your user home directory.
Open your applications menu and search for GPT4All.
Verify that the GPT4All application icon is available. Click the icon to launch the GPT4All chat interface.
GPT4All does not include any models by default. You can download models from the GPT4All built-in repository or external sources such as Hugging Face. GPT4All supports distilled, instruct, reasoning, uncensored, and censored models that you can download and add to GPT4All. Follow the steps below to add new models, manage all downloaded models, and create a new chat to interact with the installed models.
Open GPT4All from your applications menu.
Click Models on the main navigation menu.
Click Add Model to explore the available models. Choose from any of the following options on the Explore Models page:
Scroll or search for a specific model, such as Llama3.2 1B Instruct, and verify the model requirements, including:
Click Download to download the model.
Click Models on the navigation menu.
Verify that the model is downloaded and available in GPT4All.
You have downloaded a model from the existing sources in GPT4All. You can browse all existing models and invoke each model independently on the Chats page.
Downloaded models are available in GPT4All on the Chats tab. All chats are private and local on your workstation. Follow the steps below to chat with the downloaded models locally available on your system without using the Internet.
Click Chats on the main navigation menu.
Click Select a Model and choose the model.
Enter a prompt in the Send a message field and press Enter to start the chat.
Monitor the number of tokens and the model response rate.
Verify that the model responds with a result that matches your input text prompt.
Enter another prompt in the Send a message field and press Enter to continue chatting with the model referencing the original prompt to fine-tune the generated results.
Click Delete next to a chat in the history pane to delete it.
Click Edit to modify the chat title, or click New Chat to start a new chat.
GPT4All supports Retrieval-Augmented Generation (RAG) by default with the LocalDocs menu option. You can upload multiple documents and chat with LLM using your uploaded documents to enhance the quality of the generated text. Follow the steps below to create a new collection and chat with local documents in GPT4All.
Click Settings and select LocalDocs.
Verify the list of supported file extensions.
Click the Embeddings Device option and select CUDA if available to use your GPU device for embedding the local documents.
Click LocalDocs on the main navigation menu.
Click Add Doc Collection to create a new collection of local documents.
Enter the collection name and click Browse to select the path containing your documents.
Click Create Collection to scan all documents in your specified source directory.
Verify the embeddings count and the model in use, nomic-embed-text-v1.5 by default, and monitor progress for each document in the path.
Verify that the Collection includes the documents you uploaded to use with GPT4All.
Click Chats.
Start a new chat and click LocalDocs in the top-right to select the documents collection in your chat to perform RAG operations referencing your uploaded documents.
GGUF (GPT-Generated Unified Format) is a model format designed to store, load, and infer large language models efficiently. It's optimized for memory usage and fast loading times, making it suitable for applications that require high performance and low latency. You can download .gguf format models from platforms like Hugging Face and manually add the model to GPT4All for use within the application interface. Follow the steps below to download and use .gguf format models from Hugging Face with GPT4All.
Open a web browser, such as Firefox.
Visit Hugging Face and search for a model to download.
For example, enter Mistral GGUF in the search bar to browse the available models.
Select your desired model from the list, such as mistralai/Devstral-Small-2507_gguf.
Click Files and Versions to browse the available version files.
Select the quantization version to browse the available .gguf files. For instance, you can select the Devstral-Small-2507-Q4_K_M.gguf
Verify the file size of the specific quantised model.
Open a new terminal window.
Check the disk usage on your workstation and verify that it has enough space to store the model files.
In your browser, click on the download icon of your model version.
Once the download is complete, navigate to the Downloads folder in your terminal session.
Move the downloaded .gguf file to the .local/share/nomic.ai/GPT4All/ directory in your user's home directory.
List the .local/share/nomic.ai/GPT4All/ directory and verify the available .gguf model files.
Output:
Close GPT4All if it's open on your workstation.
Open GPT4All again to load the newly added models.
Navigate to the Models tab and verify that the newly added model is available.
Navigate to Chats, click New Chat, and select the new model.
Enter a new text prompt like write a short story about a robot learning to code, with a focus on arrays in the message field, and press Enter to generate a response using the model.
GPT4All includes a built-in API server that lets you interact with models using REST API endpoints. The API allows you to list and run available models, allowing you to integrate GPT4All into your existing applications. Follow the steps below to configure the local API server and enable connections to the GPT4All port.
Click Settings on the main navigation menu.
Navigate to the Advanced section within the application options.
Click Enable Local API Server to enable API access on your server.
Verify the default API Server Port for accessing the GPT4All API.
Open a new terminal window.
Send a GET request to the /v1/models endpoint using the GPT4All localhost port to list all available models on the server.
The API returns a JSON output containing the list of available AI models.
Send a GET request to the /v1/models/<model-name> endpoint to get details of a specific model. Replace Devstral-Small-2507-Q4_K_M.gguf with a model available on your GPT4All server.
Send a POST request to the /v1/completions endpoint to generate text completions.
The API returns a response to the prompt in JSON format and a few other details.
GPT4All listens for API requests using the 127.0.0.1 localhost address, which limits all connection requests to your local system. Installing and configuring Nginx as a reverse proxy enables secure network connections to the GPT4All API server by forwarding all requests to the localhost network address.
Update the APT package information index.
Install Nginx web server.
Create a new gpt4all.conf virtual host configuration in the /etc/nginx/sites-available directory.
Add the following configurations to the gpt4all.conf file. Replace gpt4all.example.com with your domain name.
Save the file and exit the text editor.
In the above configuration, Nginx forwards all connection requests from the gpt4all.example.com domain to the GPT4All API server port 4891, allowing you to send API requests to the server remotely.
To enable it, link the gpt4all.conf configuration to the /etc/nginx/sites-enabled directory.
Remove the default Nginx virtual host configuration.
Test the Nginx configuration for syntax errors.
Output:
Restart Nginx to apply the configuration changes.
Allow network connections to Nginx through the default firewall.
Reload UFW to apply the firewall configuration changes.
Install Certbot to generate Let's Encrypt certificates for all connections to the gpt4all.example.com domain.
Generate a new SSL certificate for the gpt4all.example.com domain. Replace admin@example.com with your email address.
Restart Nginx to apply the Let's Encrypt certificate changes.
GPT4All now accepts remote API requests from a reverse proxy that forwards connections to the localhost API server port. Follow the steps below to send remote API requests to GPT4All using your gpt4all.example.com domain and run models on the server.
Send a GET request to the /v1/models endpoint using your gpt4all.example.com domain to list all available models.
Send a GET request to the /v1/models/<model-name> endpoint to get the details of a specific model.
Running GPT4All may return multiple errors after installation due to resource limitations or improper configurations. Depending on your base operating system, follow the recommendations below to troubleshoot common GPT4All errors on your workstation.
In this guide, you have installed GPT4All and run large language models (LLMs) on your workstation. GPT4All supports multiple types of models, including open-source models and API-provided models from providers like OpenAI. All chats and model interactions are private, allowing you to perform inference and run LLMs locally. For more information and application configurations, visit the GPT4All documentation.
0 Comments
Be the first to comment and share your perspective with the community.