# CTranslate2

> **Class** in `langchain_community`

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

CTranslate2 language model.

## Signature

```python
CTranslate2()
```

## Extends

- `BaseLLM`

## Properties

- `model_path`
- `tokenizer_name`
- `device`
- `device_index`
- `compute_type`
- `max_length`
- `sampling_topk`
- `sampling_topp`
- `sampling_temperature`
- `client`
- `tokenizer`
- `ctranslate2_kwargs`

## Methods

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

---

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