Skip to main content

A lightweight, distributed tensor store for ML inference. The spiritual successor to Apache Plasma, without the Ray dependency.

Project description

ByteShare

🚀 A lightweight, distributed tensor store for ML inference

The spiritual successor to Apache Plasma, without the Ray dependency.

PyPI version License Python 3.10+

Why ByteShare?

  • Apache Plasma is dead - Removed from Arrow 12.0.0 (May 2023)
  • Ray is too heavy - You just want object sharing, not a full cluster (~150MB)
  • Redis doesn't understand tensors - Serialization overhead kills performance
  • SharedMemory is local only - No cross-node support

ByteShare fills this gap: a lightweight, zero-dependency distributed tensor store.

Features

  • Zero external dependencies - Pure Python + PyZMQ (optional backends available)
  • Pass by Reference - ObjectRef contains only metadata, data transferred on get()
  • Same-node zero-copy - SharedMemory backend for multi-process sharing
  • Cross-node efficient transfer - ZMQ ROUTER/DEALER with connection pooling
  • Auto lifecycle management - TTL expiration, optional reference counting
  • Native Tensor support - PyTorch, NumPy, with optimal serialization

Installation

pip install byteshare

# Optional backends
pip install byteshare[zmq]     # ZMQ transport (recommended for distributed)
pip install byteshare[redis]   # Redis backend
pip install byteshare[s3]      # S3 backend
pip install byteshare[all]     # All optional dependencies

Quick Start

from byteshare import ByteStore, ObjectRef
import torch

# Create a store
store = ByteStore()

# Store a tensor
tensor = torch.randn(1, 16, 125, 96, 96, dtype=torch.float16)
ref: ObjectRef = store.put(tensor, name="embeddings", ttl=120)

# Retrieve it (zero-copy if same process/node)
tensor = store.get(ref)

# Delete when done
store.delete(ref)

Use Cases

  • Disaggregated ML inference - Share embeddings/latents between pipeline stages
  • Multi-process ML - Zero-copy tensor sharing between workers
  • Distributed pipelines - Pass tensors across nodes without serialization pain

Roadmap

  • v0.1.0 - MVP: ObjectRef, LocalMemory, SharedMemory backends
  • v0.2.0 - Distributed: ZMQ transport, cross-node get
  • v0.3.0 - Production: Async API, Prometheus metrics, disk spill
  • v0.4.0 - Extensions: Redis/S3 backends, UCX RDMA transport

License

Apache 2.0

Contributing

Contributions are welcome! Please read our Contributing Guide first.

Project details


Download files

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

Source Distribution

byteshare-0.0.1.tar.gz (221.7 kB view details)

Uploaded Source

Built Distribution

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

byteshare-0.0.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file byteshare-0.0.1.tar.gz.

File metadata

  • Download URL: byteshare-0.0.1.tar.gz
  • Upload date:
  • Size: 221.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for byteshare-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6c492d1c1eb4e8dca670db174c1a198de13a310a86503dba9a8e7ef36b8ec495
MD5 bcec1ee522e75f5ffd695aad5d09eaf8
BLAKE2b-256 5eaa407a9b577d0450221a37eec49c753118da4cbde0cedf1135d96a6107bcfd

See more details on using hashes here.

File details

Details for the file byteshare-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: byteshare-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for byteshare-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f19fcca57f88f099bd49b7f9556a4e26e4032941326fe84091d215c73e7a0149
MD5 a3692df0fea5ec7e8a2b0f2d4f6efb79
BLAKE2b-256 2e8c4f5e9274ff5260ba43bc563dbbdb11b1b0c6ed8b5c3e8e4ddab1fe7e32ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page