# `vllm_mlx`

vllm-mlx: Apple Silicon MLX backend for vLLM This package provides native Apple Silicon GPU acceleration for vLLM using Apple's MLX framework, mlx-lm for LLMs, and mlx-vlm for vision-language models.

[View the complete module source at #L1-L132](https://github.com/waybarrios/vllm-mlx/blob/a69d47912bcb21d8fe04d48f75fa896b620ffcfa/vllm_mlx/__init__.py#L1-L132).

## API details

Each callable below includes its exact signature, type annotations, inputs, defaults, return contract, documented exceptions, implementation source, and parsed docstring sections when the source provides them.

::: vllm_mlx
    options:
      members:
        - __version__
        - __getattr__
        - __all__
      filters: []
      show_if_no_docstring: true

## Complete contract reference

Expand any definition for its exact inputs, annotations, defaults, return contract, directly raised exceptions, source-grounded behavior, and immutable line link. This section includes private and nested definitions that ordinary API generators omit.

<details class="api-contract" id="contract-vllm_mlx.__getattr__" markdown="1">
<summary><code>vllm_mlx.__getattr__</code> · function</summary>

```python
vllm_mlx.__getattr__(name) -> not annotated
```

Lazy load all components to avoid mlx_lm import on non-Apple platforms.

**Parameters**

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `not annotated` | `yes` | `none` | Required positional or keyword input. |

**Returns**

- Type: `not annotated`
- Direct return expressions: `getattr(request, name)`; `getattr(scheduler, name)`; `getattr(engine_core, name)`; `getattr(prefix_cache, name)`; `getattr(paged_cache, name)`; `getattr(mllm_cache, mllm_name)`; `getattr(model_registry, name)`; `MLXPlatform`; `MLXWorker`; `MLXModelRunner`; `MLXAttentionBackend`

**Exceptions and behavior**

Function `__getattr__` calls `getattr`, `name.startswith`, `name.replace`, `AttributeError`; can raise `AttributeError`; has 11 explicit return paths.
Directly raised exceptions: `AttributeError`.

[View source #L21-L90](https://github.com/waybarrios/vllm-mlx/blob/a69d47912bcb21d8fe04d48f75fa896b620ffcfa/vllm_mlx/__init__.py#L21-L90).

</details>

## Complete symbol map

This map also includes private definitions and nested helpers. The signature column exposes every explicit input even when an internal helper has no dedicated parameter prose.

| Symbol | Kind | Signature and inputs | What it does | Source |
| --- | --- | --- | --- | --- |
| [`__getattr__`](#contract-vllm_mlx.__getattr__) | function | `__getattr__(name) -> not annotated` | Lazy load all components to avoid mlx_lm import on non-Apple platforms. | [#L21-L90](https://github.com/waybarrios/vllm-mlx/blob/a69d47912bcb21d8fe04d48f75fa896b620ffcfa/vllm_mlx/__init__.py#L21-L90) |
