# Parallax

> A decentralized inference engine that shards one LLM across the Macs, Linux GPUs and Windows PCs you already own and serves it as a single cluster

- Category: Models & Inference / Serving & Deployment
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/GradientHQ/parallax
- Canonical page: https://ai-tldr.dev/tools/parallax/

## In short

Parallax is a fully decentralized inference engine built by Gradient. It sits in the Serving & Deployment category of the Models & Inference tools and is open-source, written in Python and licensed Apache-2.0. To get started: install from source.

## Overview

Parallax is a fully decentralized inference engine built by Gradient. It lets you assemble your own AI cluster out of a set of distributed nodes, even when those machines have different hardware and sit in different physical locations, and host a large language model across them. Instead of needing one machine big enough to hold the whole model, Parallax shards the model with pipeline parallelism, so each node runs a contiguous slice of its layers.

The architecture has three backends underneath. Peer-to-peer communication between nodes runs over Gradient's Lattica library, NVIDIA GPU nodes use SGLang and vLLM, and Apple silicon Macs use MLX LM, with paged KV-cache management and continuous batching on the Mac side. A scheduler node handles dynamic request scheduling and routing across the cluster and exposes an OpenAI-style /v1/chat/completions endpoint plus a browser setup and chat UI.

It installs from source on Linux and macOS, ships a Windows installer, and offers Docker images for Linux GPU machines including DGX Spark. The supported-model list covers open-weight families such as DeepSeek, Qwen, Kimi-K2, GLM, MiniMax, gpt-oss and Step. Parallax is released under the Apache License 2.0.

## What it does

- Pipeline-parallel model sharding: each node hosts a range of layers, so a model too big for one device can run across several
- Mixed hardware in one cluster, with SGLang and vLLM backends for GPUs and MLX LM for Apple silicon Macs
- A scheduler that handles node discovery, dynamic request routing and an OpenAI-style chat completions API
- Browser setup flow for choosing node count, local or remote networking and the model, then a chat interface showing the cluster topology
- Local-network or public-network clusters; remote mode uses a public relay server to connect the scheduler and nodes
- Standalone mode that skips the scheduler, where you set start and end layers per node by hand
- Models download from Hugging Face by default, or from ModelScope with USE_MODELSCOPE=1

## Getting started

The install script needs Python 3.11 to 3.13, Git and curl. It installs uv if needed, creates a .venv and picks the mac extras on macOS or the gpu extras on Linux. Windows users get a separate installer, and Linux GPU machines can use the gradientservice/parallax Docker image instead.

1. Install from source

```bash
git clone https://github.com/GradientHQ/parallax.git
cd parallax
./install.sh
source .venv/bin/activate
```

2. Launch the scheduler

   Run it on your main node, then open http://localhost:3001 to pick the number of nodes, local or remote networking, and the model. Add --host 0.0.0.0 to make the API reachable from other machines.

```bash
parallax run
```

3. Join each node

   On every machine in the cluster, run the join command. On a public network, pass the scheduler address printed in the scheduler logs. Once all nodes connect, the UI moves to the chat interface.

```bash
# local area network
parallax join
# public network
parallax join -s {scheduler-address}
```

4. Or run headless and call the API

   Without the frontend, give the scheduler the model and worker count, join the nodes as above, then send OpenAI-style requests to the scheduler.

```bash
parallax run -m Qwen/Qwen3-0.6B -n 2

curl --location 'http://localhost:3001/v1/chat/completions' --header 'Content-Type: application/json' --data '{
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "hello"}],
    "stream": true
}'
```

5. Single machine, no scheduler

   For a standalone server on one machine, start the backend engine directly.

```bash
parallax serve -m Qwen/Qwen3-0.6B
```

## When to use it

- Run an open-weight model that is too large for any single laptop or GPU by pooling several machines you already have
- Combine Apple silicon Macs and NVIDIA GPU boxes on a home or office network into one private chat endpoint
- Host a model across machines in different locations, connected over the public network through the scheduler
- Point an app that speaks the OpenAI chat completions API at your own self-hosted cluster
