# LlamaCppEmbeddings

> **Class** in `langchain_community`

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

llama.cpp embedding models.

To use, you should have the llama-cpp-python library installed, and provide the
path to the Llama model as a named parameter to the constructor.
Check out: https://github.com/abetlen/llama-cpp-python

## Signature

```python
LlamaCppEmbeddings()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.embeddings import LlamaCppEmbeddings
llama = LlamaCppEmbeddings(model_path="/path/to/model.bin")

## Extends

- `BaseModel`
- `Embeddings`

## Properties

- `client`
- `model_path`
- `n_ctx`
- `n_parts`
- `seed`
- `f16_kv`
- `logits_all`
- `vocab_only`
- `use_mlock`
- `n_threads`
- `n_batch`
- `n_gpu_layers`
- `verbose`
- `device`
- `model_config`

## Methods

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

---

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