MLX-Hub is an open-sourced command line tool for managing MLX AI models on Macs with Apple silicon.
Search, download & manage MLX models from Hugging Face, right from your terminal.
The CLI accepts command line arguments and provides an app interface with Interactive Mode
.
MLX is a model training and serving framework for Apple silicon, made by Machine Learning Research at Apple.
- Scan for downloaded Models in your local Hugging Face cache.
- Search for MLX Models from Hugging Face Hub.
- Suggest MLX models to download.
- Download MLX models by model ID.
- Delete MLX models as needed.
- Interactive Mode for an better UX.
Install mlx-hub
from PyPI using pip:
pip install mlx-hub
-
mlx-hub-cli
: CLI Tool -
mlx_hub
: Python Module
MLX-Hub uses huggingface_hub to interact with MLX models on Hugging Face. Please create and add an access token from Hugging Face to huggingface_hub.
Hugging Face Hub documentation:
To create an access token, go to you Hugging Face settings:
To add the access token to huggingface_hub
:
huggingface-cli login
MLX-Hub CLI accepts the following command line argument:
usage: mlx-hub-cli [-h] [--start] [--scan] [--search phrase] [--suggest] [--download model_id] [--delete model_id]
MLX-Hub CLI
options:
-h, --help show this help message and exit
--start Start Interactive Mode
--scan Scan for downloaded models in the Hugging Face cache
--search phrase Search for MLX models using a search phrase
--suggest Suggest MLX models to download
--download model_id Download a specific model
--delete model_id Delete a specific model
Interactive mode allows you to execute various Action in a user-friendly environment.
To start the interactive mode, use the start
action:
mlx-hub-cli --start
Starting interactive mode.
Available Actions:
scan Scan for downloaded models in the Hugging Face cache
search phrase Search for MLX models using a search phrase
suggest Suggest MLX models to download
download model_id Download a specific model
delete model_id Delete a specific model
exit Exit Interactive Mode
help Show this help message
Enter Action > scan
1 downloaded models:
mlx-community/TinyDolphin-2.8-1.1b-4bit-mlx
Enter Action > exit
Goodbye!
In interactive mode, the following actions are available:
help
: Show the help message with available actions.scan
: Scan for downloaded MLX models.suggest
: Suggest MLX models to download.search <phrase>
: Search for MLX models using a search phrase.download <model_id>
: Download a specific model.delete <model_id>
: Delete a specific model.exit
: Exit the interactive mode.
To exit the interactive mode, use the exit
action:
Enter Action > exit
Goodbye!
Thanks to:
- Apple's machine learning research team for MLX
- The Hugging Face team for huggingface_hub
- The MLX Community