Setting up an AI Cluster on Mac with Exo Labs & MLX | Alpha | PandaiTech

Setting up an AI Cluster on Mac with Exo Labs & MLX

A step-by-step guide to installing Python and the MLX library, and configuring Exo Labs to combine multiple Mac units into a single local AI cluster.

Learning Timeline
Key Insights

Network Auto-Discovery Feature

Exo Labs nodes will discover each other automatically over the local network (LAN/Wi-Fi). Ensure all Macs are on the same subnet so this 'magic' discovery process works without manual IP configuration.

OpenAI API Integration

Exo Labs provides an API compatible with the OpenAI format. This means you can connect your local AI cluster to third-party tools like Fabric or any application that supports the ChatGPT API.

Performance Boost (Teraflops)

Adding nodes to the cluster increases the total available TFLOPS. For example, a cluster of 5 Macs can match or approach the performance of high-end GPUs like the RTX 4090 for LLM inference tasks.
Step by Step

Setting Up the Python & MLX Environment

  1. Open Terminal on every Mac device you intend to use in the cluster.
  2. Ensure Xcode Command Line Tools are installed by running the command `xcode-select --install` to obtain PIP.
  3. Install Python version 3.12 (using pyenv is recommended).
  4. Set Python 3.12 as the global version using the command `pyenv global 3.12`.
  5. Refresh your terminal session with the command `source ~/.zshrc`.
  6. Verify the Python version by typing `python --version` (ensure it displays 3.12.x).
  7. Install the MLX library by running the command `pip install mlx`.

Exo Labs Installation & Configuration

  1. Clone the Exo Labs repository from GitHub onto each Mac using the command `git clone [URL-REPOS-EXO]`.
  2. Navigate into the downloaded Exo directory using the command `cd exo`.
  3. Run the Exo application on the first Mac by typing `exo` or the execution command specified in that directory.
  4. Repeat the `exo` command on all remaining Mac units within the same network.
  5. Monitor the terminal output; Exo will perform an 'Auto Discover' to automatically find and connect all Mac nodes into a single cluster.
  6. Open the Web Interface (GUI) provided by Exo via your web browser to start loading the LLM.

More from Local AI & Open Source Deployment

View All