Metadata-Version: 2.4
Name: llama-index-llms-mlx
Version: 0.4.1
Summary: llama-index llms mlx integration
Author-email: Dwight Foster <dwightfoster03@gmail.com>
License-Expression: MIT
License-File: LICENSE
Requires-Python: <4.0,>=3.9
Requires-Dist: llama-index-core<0.15,>=0.13.0
Requires-Dist: mlx-lm>=0.11.0
Requires-Dist: mlx>=0.11.0
Description-Content-Type: text/markdown

# LlamaIndex Llms Integration: MLX

## Overview

---

Integrate with MLX LLMs from the mlx-lm library

## Installation

---

```bash
pip install llama-index-llms-mlx
```

## Example

---

```python
from llama_index.llms.mlx import MLXLLM

llm = MLXLLM(
    model_name="microsoft/phi-2",
    context_window=3900,
    max_new_tokens=256,
    generate_kwargs={"temp": 0.7, "top_p": 0.95},
)

response = llm.complete("What is the meaning of life?")
print(str(response))
```
