# ExLlamaV2

> **Class** in `langchain_community`

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

ExllamaV2 API.

- working only with GPTQ models for now.
- Lora models are not supported yet.

To use, you should have the exllamav2 library installed, and provide the
path to the Llama model as a named parameter to the constructor.
Check out:

## Signature

```python
ExLlamaV2()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.llms import Exllamav2

llm = Exllamav2(model_path="/path/to/llama/model")

#TODO:
- Add loras support
- Add support for custom settings
- Add support for custom stop sequences

## Extends

- `LLM`

## Properties

- `client`
- `model_path`
- `exllama_cache`
- `config`
- `generator`
- `tokenizer`
- `settings`
- `logfunc`
- `stop_sequences`
- `max_new_tokens`
- `streaming`
- `verbose`
- `disallowed_tokens`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/llms/exllamav2/ExLlamaV2/validate_environment)
- [`get_num_tokens()`](https://reference.langchain.com/python/langchain-community/llms/exllamav2/ExLlamaV2/get_num_tokens)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/llms/exllamav2.py#L10)