Tensorlink is a decentralized Python library for distributed PyTorch models, providing easy Hugging Face API access and enabling users to share compute resources across a global network.
Project description
Distributed AI Inference & Training for Everyone
What is Tensorlink?
Tensorlink is a Python library and decentralized platform that makes distributed AI accessible to everyone. Access Hugging Face models through simple APIs, run PyTorch models across a network of peers, or contribute compute resources to earn rewards, all without the need of centralized infrastructure.
Early Access: We're in active development! Some features are still stabilizing. Join our Discord for updates and support.
Key Features
- Drop-in PyTorch replacement - Run models in your workflows without VRAM
- Simple REST APIs - Access Hugging Face models with familiar HTTP requests
- Privacy-first architecture - Your data stays local, never stored on external servers
- Earn while you contribute - Get rewarded for sharing idle compute resources
Quick Start
Tensorlink can be accessed via API or directly within Python.
Use the Inference API
import requests
response = requests.post(
"http://smartnodes-lab.ddns.net/tensorlink-api/generate",
json={
"hf_name": "Qwen/Qwen2.5-7B-Instruct",
"message": "Explain quantum computing in simple terms",
"max_new_tokens": 256,
"temperature": 0.7
}
)
print(response.json())
Installation
pip install tensorlink
Requirements: Python 3.10+, PyTorch 2.3+, UNIX/MacOS (Windows support coming soon)
Run Your First Distributed Model
from tensorlink import DistributedModel
import torch
# Connect to a pre-trained model on the network
model = DistributedModel(
model="Qwen/Qwen2.5-7B-Instruct",
training=False,
device="cuda",
dtype=torch.float16
)
# Use it like any PyTorch model
inputs = tokenizer("Hello, world!", return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=100)
Contribute Compute (Mining)
- Download the latest
tensorlink-minerfrom Releases - Configure your wallet address in
config.json - Run:
./run-worker.sh
That's it! Your GPU will earn rewards by processing AI workloads from the network.
Learn More
- 📚 Documentation - Full API reference and guides
- 💬 Discord Community - Get help and connect with developers
- 🎮 Live Demo - Try localhostGPT powered by Tensorlink
- 📘 Litepaper - Technical overview and architecture
Contributing
We welcome contributions! Here's how to get involved:
- 🐛 Report bugs via GitHub Issues
- 💡 Suggest features on our Discord
- 🔧 Submit PRs to improve code or documentation
- ☕ Support the project via Buy Me a Coffee
License
Tensorlink is released under the MIT License.
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 tensorlink-0.2.0.post1.tar.gz.
File metadata
- Download URL: tensorlink-0.2.0.post1.tar.gz
- Upload date:
- Size: 439.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4af1900b6a7ea22072cac4f2e8d9c1524368156b45f0e889b2e91036392fb2ab
|
|
| MD5 |
18c1766120c41fb4f810e282a7c8cbb9
|
|
| BLAKE2b-256 |
3bf7eff81c8f0dd7bf03f609dc2159e69f3de93d822989e9bb2e7fe8ba546d8d
|
File details
Details for the file tensorlink-0.2.0.post1-py3-none-any.whl.
File metadata
- Download URL: tensorlink-0.2.0.post1-py3-none-any.whl
- Upload date:
- Size: 488.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0c8ca4f08ccaae86a1b05b2f2d5910d1a0e2d08d9bb21e2cb173619ff13b62e
|
|
| MD5 |
d7522ef8e2f1fc98099d54cb2d544dc0
|
|
| BLAKE2b-256 |
70adc2faea343fea558e66cd31d774db9e1c7b9d3a07dd95100ad457d2c8c5b5
|