# GPT4All

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/llms/gpt4all/GPT4All)

GPT4All language models.

To use, you should have the ``gpt4all`` python package installed, the
pre-trained model file, and the model's config information.

## Signature

```python
GPT4All()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.llms import GPT4All
model = GPT4All(model="./models/gpt4all-model.bin", n_threads=8)

# Simplest invocation
response = model.invoke("Once upon a time, ")

## Extends

- `LLM`

## Properties

- `model`
- `backend`
- `max_tokens`
- `n_parts`
- `seed`
- `f16_kv`
- `logits_all`
- `vocab_only`
- `use_mlock`
- `embedding`
- `n_threads`
- `n_predict`
- `temp`
- `top_p`
- `top_k`
- `echo`
- `stop`
- `repeat_last_n`
- `repeat_penalty`
- `n_batch`
- `streaming`
- `allow_download`
- `device`
- `client`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/llms/gpt4all/GPT4All/validate_environment)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/llms/gpt4all.py#L12)