# GPT4AllEmbeddings

> **Class** in `langchain_community`

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

GPT4All embedding models.

To use, you should have the gpt4all python package installed

## Signature

```python
GPT4AllEmbeddings()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.embeddings import GPT4AllEmbeddings

model_name = "all-MiniLM-L6-v2.gguf2.f16.gguf"
gpt4all_kwargs = {'allow_download': 'True'}
embeddings = GPT4AllEmbeddings(
    model_name=model_name,
    gpt4all_kwargs=gpt4all_kwargs
)

## Extends

- `BaseModel`
- `Embeddings`

## Properties

- `model_name`
- `n_threads`
- `device`
- `gpt4all_kwargs`
- `client`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/embeddings/gpt4all/GPT4AllEmbeddings/validate_environment)
- [`embed_documents()`](https://reference.langchain.com/python/langchain-community/embeddings/gpt4all/GPT4AllEmbeddings/embed_documents)
- [`embed_query()`](https://reference.langchain.com/python/langchain-community/embeddings/gpt4all/GPT4AllEmbeddings/embed_query)

---

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