Skip to main content
 _                                                   ____   _
| |                                                 |  __`\(_)                
| |     __ _  ___   ___  _   _  __ _  __ _  ___     | |__) | |_ __   ___  ___ 
| |    / _` |/ _ \ / _ `| | | |/ _` |/ _` |/ _ \    |  ___/| | '_ \ / _ \/ __|
| |___| (_| | | | | (_| | |_| | (_| | (_| |  __/    | |    | | |_) |  __/\__ \
|______\__,_|_| |_|\__, |\__,_|\__,_|\__, |\___|    |_|    |_| .__/ \___||___/
                    __/ |            __/ |                   | |              
                   |___/            |___/                    |_|      

Peer-to-peer distributed inference for open-source language models

Tests Release GitHub license PyPI - Downloads

Documentation & site: https://languagepipes.com

Language Pipes is an open-source distributed inference system built on the transformers library that splits large language model computation across multiple machines. By separating the model's text-handling components (embedding and output head) from its intermediate transformer layers, Language Pipes enables peer-to-peer inference.

Features

  • OpenAI-compatible API
  • Automatic model download by HuggingFace ID
  • Interactive TUI for configuration, monitoring, and control
  • Decentralized peer-to-peer network with optional AES encryption

How It Works

Language models process input through a sequence of transformer layers. Each layer performs matrix multiplications between learned weights and a hidden state tensor, passing the result to the next layer. Language Pipes distributes these layers across machines, splitting the memory cost across the network while keeping the text-handling components on the origin node.

The architecture provides architectural separation: layer models operate on continuous-valued tensors rather than discrete text while the end models keep text data on trusted systems. The privacy documentation provides a probabilistic threat model that quantifies the difficulty of known inversion attacks under various mitigation configurations.

Further reading:

Installation

Requires Python 3.10+. A GPU is optional — each node can run on CPU or CUDA, and a node only needs enough memory to hold the layers it hosts (memory scales with how many layers you assign it). For GPU support, install the appropriate PyTorch version for your CUDA configuration:
https://pytorch.org/get-started/locally/

See System requirements and network requirements for details, including what happens when a node drops mid-generation.

Install from pip:

pip install language-pipes

Quick Start

Launch the interactive TUI:

language-pipes

From the main menu, select New Configuration and give it a name to create a TOML config and open the dashboard (or Load Configuration to reopen one you've created before).

The dashboard is organized into tabs along the top: Home, Network, Models, Pipes, and Jobs. A fresh configuration has no node ID yet, so the only option on Home is Configure Network Server. Set a Node ID under Network > Configure, then return to Home and select Start Network Server. Once the network is running, the dashboard exposes the rest of setup: load models under Models > Layer Models / End Models, and configure and start the OpenAI-compatible API under Jobs > Server.

Configuration can also be edited directly as TOML files and run headlessly. See the CLI reference for details on running a saved configuration from the command line.


Two Node Example

This example distributes Qwen/Qwen3-1.7B across two computers. Node 1 hosts the End Model, so prompts and responses stay on Node 1, plus enough layers to fit in its memory. Node 2 hosts the remaining layers.

Node 1 (First Computer)

language-pipes

Select New Configuration and name it (e.g. node-1).

  1. Network > Configure: set Node ID to node-1 and ensure Network IP is set to this machine's local IP address. Leave Network Key empty to disable encryption for this example. Peer Port defaults to 5000.
  2. Back on Home, select Start Network Server.
  3. Models > Installed: select Install New Model and enter Qwen/Qwen3-1.7B to download it.
  4. Models > Layer Models: select Add Layer Model, choose Qwen/Qwen3-1.7B, a device (cpu or cuda:0), and a memory budget in GB (e.g. 2), then Save Model. Confirm to load it now.
  5. Models > End Models: select Add End Model, choose Qwen/Qwen3-1.7B, and confirm to load it now.
  6. Jobs > Server: ensure the Port is set to 8000 and select Start Server.

Node 2 (Second Computer)

language-pipes

Select New Configuration and name it (e.g. node-2).

  1. Network > Configure: set Node ID to node-2. Under Bootstrap Nodes, add an entry with node-1's IP address and peer port (5000) so this node joins node-1's network.
  2. Back on Home, select Start Network Server.
  3. Models > Installed: install Qwen/Qwen3-1.7B as on Node 1.
  4. Models > Layer Models: add Qwen/Qwen3-1.7B with a device and memory budget covering the remaining layers (e.g. 2 on cpu).

Once both nodes have loaded their layers, Pipes > Complete shows a completed pipe for Qwen/Qwen3-1.7B, and the model is ready for inference via node-1's Job Port.

Test the API

The model is accessible via the OpenAI-compatible API.

Example using the OpenAI Python library:

from openai import OpenAI

client = OpenAI(
    base_url="http://127.0.0.1:8000/v1",  # node-1 IP address and Job Port
    api_key="not-needed"  # only required if api_keys is set in the config
)

response = client.chat.completions.create(
    model="Qwen/Qwen3-1.7B",
    max_completion_tokens=100,
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Write a haiku about distributed systems."}
    ]
)

print(response.choices[0].message.content)

Install the OpenAI library with: pip install openai

See the OpenAI-compatible API documentation for the full endpoint reference and sampling parameter descriptions.

Supported Models

Language Pipes supports Qwen3 (dense and MoE), Phi, Meta Llama 2/3, Gemma 3, Gemma 4, and Ministral 3. See the supported-models list for a more complete list.

Contributing

Contributions are welcome! Bug reports, documentation fixes, and especially new model architectures. See CONTRIBUTING.md for dev setup, how to run the tests, and PR expectations, and the Code of Conduct. Questions and ideas are welcome in GitHub Discussions.

Packages

Language Pipes is built on two components that are also published as standalone PyPI packages, maintained from this repo under packages/:

  • llm-layer-collector — load individual transformer components (embedding, decoder layers, norm, head) from sharded HuggingFace checkpoints and run per-architecture computation. Docs
  • distributed-state-network — an encrypted peer-to-peer state-sharing network over HTTP. Docs

Language Pipes pins exact versions of both, so pip install language-pipes always pulls the matching releases — you never have to update them yourself.

Dependencies

Documentation

The docs are published as a website at https://erinclemmer.github.io/language-pipes (built from this folder by website/). The Markdown source of truth lives in documentation/:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

language_pipes-2.5.0.tar.gz (391.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

language_pipes-2.5.0-py3-none-any.whl (157.4 kB view details)

Uploaded Python 3

File details

Details for the file language_pipes-2.5.0.tar.gz.

File metadata

  • Download URL: language_pipes-2.5.0.tar.gz
  • Upload date:
  • Size: 391.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for language_pipes-2.5.0.tar.gz
Algorithm Hash digest
SHA256 43b44925c8c67744362d6e8425dec3515216d4fc13704143b1a6d889aaac20f4
MD5 39c81b924037ce0cc080661a61c9d7f1
BLAKE2b-256 b714d3fb9b848982639cc4412c537e6fcd5414beb83fe7751b4ac14558ab9984

See more details on using hashes here.

Provenance

The following attestation bundles were made for language_pipes-2.5.0.tar.gz:

Publisher: publish.yml on erinclemmer/language-pipes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file language_pipes-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: language_pipes-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 157.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for language_pipes-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa8f8f03e0ebb0665ae016055a414e86859ad696c908d31333f528428da0c795
MD5 71df537573c9dbd778a2c95b1e5017e3
BLAKE2b-256 fd374b5924cbee5c4438a5eefa9a6ef69c7c6c8c708f0af566f3512e51ef6060

See more details on using hashes here.

Provenance

The following attestation bundles were made for language_pipes-2.5.0-py3-none-any.whl:

Publisher: publish.yml on erinclemmer/language-pipes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.5.0 This release

2 files

2.4.0

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.19.7

2 files

0.19.6

2 files

0.19.5

2 files

0.19.4

2 files

0.19.3

2 files

0.19.2

2 files

0.19.1

2 files

0.19.0

2 files

0.18.1

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.13.1

2 files

0.13.0

2 files

0.12.4

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 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