Easily distribute language models across multiple systems
Project description
Language Pipes (Beta)
Distribute language models across multiple systems
Language pipes is a FOSS distributed network application designed to increase access to local language models.
Join our Discord for any comments or questions!
Disclaimer: This software is currently in Beta. Please be patient and if you encounter an error, please fill out a github issue!
Over the past few years open source language models have become much more powerful yet the most powerful models are still out of reach of the general population because of the extreme amounts of RAM that is needed to host these models. Language Pipes allows multiple computer systems to host the same model and move computation data between them so that no one computer has to hold all of the data for the model.
- Quick Setup
- Peer to peer network
- OpenAI compatible API
- Download and use models by HuggingFace ID
- Encrypted communication between nodes
What Does it do?
In a basic sense, language models work by passing information through many layers. At each layer, several matrix multiplicatitons between the layer weights and the system state are performed and the data is moved to the next layer. Language pipes works by hosting different layers on different machines to split up the RAM cost across the system.
How is this different from Distributed Llama?
Distributed Llama is built to be a static network and requires individual setup and allocation for each model hosted. Language Pipes meanwhile, has a more flexible setup process that automatically selects which parts of the model to load based on what the network needs and the local systems resources. This allows separate users to collectively host a network together while maintaining trust that one configuration will not break the network. Users can come and go from the network and many different models can be hosted at the same time.
Installation
Ensure that you have Python 3.10.18 (or any 3.10 version) installed. For an easy to use Python version manager use pyenv. This specific version is necessary for the transformers library to work properly.
If you need gpu support, first make sure you have the correct pytorch version installed for your GPU's Cuda compatibility using this link:
https://pytorch.org/get-started/locally/
To download the models from Huggingface, ensure that you have git and git lfs installed.
To start using the application, install the latest version of the package from PyPi.
Using Pip:
pip install language-pipes
Two Node Example
The following example will show how to create a small network. Firstly, create a network key for the network on the first computer:
language-pipes create_key network.key
Also create a config.toml file to tell the program how to operate:
node_id="node-1"
oai_port=6000 # Hosts an OpenAI compatible server on port 6000
[[hosted_models]]
id="Qwen/Qwen3-1.7B"
device="cpu"
max_memory=1
Note: Go to the configuration documentation for more information about how the config properties work.
Once the configuration has been created you can start the server:
language-pipes run --config config.toml
This tells language pipes to download with the ID "Qwen/Qwen3-1.7B" from huggingface.co and host it using 1GB of ram. This will load part of the model but not all of it.
Next, install the package on a separate computer on your home network and create a config.toml file like this:
node_id="node-2"
bootstrap_address="192.168.0.10" # Local ip address of node-1
[[hosted_models]]
id="Qwen/Qwen3-1.7B"
device="cpu"
max_memory=3
Copy the network.key file to the same directory that the config is in using a usb drive or sftp.
Run the same command again on the computer two:
language-pipes run --config config.toml
Node-2 will connect to node-1 and load the remaining parts of the model. The model is ready for inference using a standard openai chat API interface. An example request to the server is provided below:
import requests
import json
# node-1 IP address here
url = "http://127.0.0.1:6000/v1/chat/completions"
headers = {
"Content-Type": "application/json"
}
payload = {
"model": "Qwen/Qwen3-1.7B",
"max_completion_tokens": 10,
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a haiku about distributed systems."}
]
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print("Status Code:", response.status_code)
print("Response JSON:", response.json())
Models Supported
- Llama 2 & Llama 3.X
- Qwen3
- More to come!
Dependencies
Citation
If you use the project for an academic endeavour please use this citation.
@software{Clemmer_Language_Pipes_2025,
author = {Erin Clemmer},
title = {Language Pipes},
abstract = {Distribute language models across multiple systems.},
version = {0.0.1},
date = {2025-09-01},
url = {https://github.com/erinclemmer/language-pipes},
keywords = {Large Language Models, Transformers, Distributed Networks},
license = {MIT},
orcid = {0009-0005-0597-6197}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file language_pipes-0.4.3.tar.gz.
File metadata
- Download URL: language_pipes-0.4.3.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6bb369dd8061e06ad25c92fe8f7a95e5680626e3cecfcaf993a3b016fb69ea1
|
|
| MD5 |
7265eaabb09750da20607e584cd8c3d0
|
|
| BLAKE2b-256 |
77b40b6854c818655eba5338e8152358751643ba47741950218469f14b754311
|
Provenance
The following attestation bundles were made for language_pipes-0.4.3.tar.gz:
Publisher:
publish.yml on erinclemmer/language-pipes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
language_pipes-0.4.3.tar.gz -
Subject digest:
e6bb369dd8061e06ad25c92fe8f7a95e5680626e3cecfcaf993a3b016fb69ea1 - Sigstore transparency entry: 557906081
- Sigstore integration time:
-
Permalink:
erinclemmer/language-pipes@c7ca239706d2244ebbc42bdee609d9a05a027801 -
Branch / Tag:
refs/tags/0.4.3 - Owner: https://github.com/erinclemmer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c7ca239706d2244ebbc42bdee609d9a05a027801 -
Trigger Event:
release
-
Statement type:
File details
Details for the file language_pipes-0.4.3-py3-none-any.whl.
File metadata
- Download URL: language_pipes-0.4.3-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
979befaf049501d33e6146c47f7a2c134cfb1a0d5939a321e8e8f5fcd6b42140
|
|
| MD5 |
390eb7f5e59050850f191f729d8a032b
|
|
| BLAKE2b-256 |
4a15af15afed14bade4f567dad1ceed1745612ab00209501276115750db936c4
|
Provenance
The following attestation bundles were made for language_pipes-0.4.3-py3-none-any.whl:
Publisher:
publish.yml on erinclemmer/language-pipes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
language_pipes-0.4.3-py3-none-any.whl -
Subject digest:
979befaf049501d33e6146c47f7a2c134cfb1a0d5939a321e8e8f5fcd6b42140 - Sigstore transparency entry: 557906095
- Sigstore integration time:
-
Permalink:
erinclemmer/language-pipes@c7ca239706d2244ebbc42bdee609d9a05a027801 -
Branch / Tag:
refs/tags/0.4.3 - Owner: https://github.com/erinclemmer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c7ca239706d2244ebbc42bdee609d9a05a027801 -
Trigger Event:
release
-
Statement type: