vllm_mlx.plugin¶
vLLM Platform Plugin for MLX.
View the complete module source at #L1-L155.
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.plugin
¶
vLLM Platform Plugin for MLX.
This module provides the entry point for vLLM's platform plugin system, enabling automatic detection and activation of the MLX platform on Apple Silicon Macs.
vllm_mlx.plugin.mlx_platform_plugin
¶
Platform plugin entry point for vLLM.
This function is called by vLLM's platform detection system to determine if the MLX platform should be activated.
Returns:
-
str(str | None) –Fully qualified class name of MLXPlatform if conditions are met
-
None(str | None) –If MLX platform should not be activated
Source code in vllm_mlx/plugin.py
vllm_mlx.plugin.is_mlx_available
¶
Check if MLX platform can be used.
Returns:
-
bool(bool) –True if MLX is available and working
vllm_mlx.plugin.get_mlx_device_info
¶
Get information about the MLX device.
Returns:
-
dict(dict) –Device information including chip name, memory, etc.
Source code in vllm_mlx/plugin.py
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.
vllm_mlx.plugin.mlx_platform_plugin · function
Platform plugin entry point for vLLM.
Parameters
This callable has no explicit inputs.
Returns
- Type:
str | None - Direct return expressions:
None;'vllm_mlx.vllm_platform.MLXPlatform'
Exceptions and behavior
Function mlx_platform_plugin calls logger.debug, platform.machine, mx.array, mx.sum; has 2 explicit return paths.
No direct raise statement appears in this definition.
vllm_mlx.plugin.is_mlx_available · function
Check if MLX platform can be used.
Parameters
This callable has no explicit inputs.
Returns
- Type:
bool - Direct return expressions:
mlx_platform_plugin() is not None
Exceptions and behavior
Function is_mlx_available calls mlx_platform_plugin; returns mlx_platform_plugin() is not None.
No direct raise statement appears in this definition.
vllm_mlx.plugin.get_mlx_device_info · function
Get information about the MLX device.
Parameters
This callable has no explicit inputs.
Returns
- Type:
dict - Direct return expressions:
info
Exceptions and behavior
Function get_mlx_device_info calls is_mlx_available, subprocess.run, result.stdout.strip, int; returns info.
No direct raise statement appears in this definition.
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 |
|---|---|---|---|---|
mlx_platform_plugin |
function | mlx_platform_plugin() -> str \| None |
Platform plugin entry point for vLLM. | #L17-L70 |
is_mlx_available |
function | is_mlx_available() -> bool |
Check if MLX platform can be used. | #L73-L80 |
get_mlx_device_info |
function | get_mlx_device_info() -> dict |
Get information about the MLX device. | #L83-L155 |