Skip to main content

Baton

Run one large language model across several laptops on the same Wi-Fi. Each laptop holds a few layers of the model and passes activations to the next laptop, like a relay baton.

Install

On every laptop, one line. A page opens in the browser.

# macOS or Linux
curl -LsSf https://raw.githubusercontent.com/hemalbadola/baton/main/install.sh | sh -s -- app

# Windows (PowerShell)
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/hemalbadola/baton/main/install.ps1))) app

# any system with Python 3.11 or newer
pip install baton-cluster
baton app

# macOS or Linux with Homebrew
brew install hemalbadola/baton/baton
baton app

Use

  1. Run baton app on every laptop. Each laptop shows the others that are nearby.
  2. On one laptop, pick a model and click Host this model. Invite the nearby laptops.
  3. On each other laptop, click Accept.
  4. On the host, click Start. Chat when the cluster is ready.

The API is OpenAI compatible: http://<host>:7700/v1. The first start downloads the model. Only bf16 weights load today (--quant none).

Commands

baton app                                 # the page above
baton serve --model Qwen/Qwen2.5-0.5B-Instruct --quant none --min-workers 2
baton worker                              # joins a head found over mDNS

Develop

pip install -e ".[dev]"
pytest

Design: see TICKETS.md. Tests need the sandbox off for sockets and mDNS.

Metadata

Release files for baton-cluster 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for baton-cluster 0.1.0
File Size Uploaded
baton_cluster-0.1.0.tar.gz 347.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for baton-cluster 0.1.0
File Interpreter ABI Platform
baton_cluster-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 454.0 kB

Release files / baton_cluster-0.1.0.tar.gz

Download URL baton_cluster-0.1.0.tar.gz
Size 347.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8fdf64456eb4e49ffc298342f466dcd72907ae060faf1dada21a74813911e531
BLAKE2b-256 checksum
How to use checksums
5dd95d0454722218df4398d87e414d82ea40a0d826eb574ef4b6cb4760d1f220
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.3

Release files / baton_cluster-0.1.0-py3-none-any.whl

Download URL baton_cluster-0.1.0-py3-none-any.whl
Size 106.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
390cf88b55b79ce791c7fd4e4610d303751f54f8a579b67523453dced098b788
BLAKE2b-256 checksum
How to use checksums
0ba1f25cfd1de086cab1ce20ff1915cbe141a2cdd852c3cf40c3420082ce9e9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page