Skip to main content

hs_connectors

hs_connectors is a lightweight package that enables the transfer of hidden states between vLLM and Speculators training processes during both online and offline training. It provides a pluggable backend system where each backend registers itself via @HiddenStatesBackend.register(name) and exposes hooks for CLI argument injection and configuration, so that training and serving scripts can discover and configure backends without hardcoding.

The package should be installed alongside Speculators as well as within the same environment as vLLM.

Backends

Filesystem

The filesystem backend enables the transfer of hidden states between vLLM and Speculators on a single node with a shared filesystem. Hidden states are serialized as safetensors files with file-lock synchronization to prevent partial reads. Cached samples are stored by index and can be reused across training runs.

Mooncake

The Mooncake backend enables multi-node training by transferring hidden states between vLLM and Speculators across nodes over TCP or RDMA, without requiring a shared filesystem. It uses a Mooncake distributed key-value store where each sample is written under a sanitized request ID, with a metadata marker written last to signal that the sample is complete and ready for consumption. This follows a similar pattern to disaggregated prefill and decode.

When using this backend, install the Mooncake transfer engine separately (pip install mooncake-transfer-engine).

Download files

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

Source Distribution

hs_connectors-0.7.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

hs_connectors-0.7.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file hs_connectors-0.7.0.tar.gz.

File metadata

  • Download URL: hs_connectors-0.7.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.18

File hashes

Hashes for hs_connectors-0.7.0.tar.gz
Algorithm Hash digest
SHA256 4a8fa57eb919215e27fada5a132f17d52743534232957ce0a6d360e0ac0f4589
MD5 44665b8ad366d3954203d38cfb820d13
BLAKE2b-256 56bbfe3dd1b5cdaf6ad0531e59869e9801adde53f14748b000bc3c34af7edf67

See more details on using hashes here.

File details

Details for the file hs_connectors-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: hs_connectors-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.18

File hashes

Hashes for hs_connectors-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cb433c5a54f3bda3e082581b5c722b0ff32e75c3eca5b7b143ab1dde7ac2bf3
MD5 28cb590123b9e7dbecb12cf3eaa6ebcc
BLAKE2b-256 6605da984e873935a6f9148df0711a26d0d64fdd90f6cf2318ef43c062b7b9aa

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.0

2 files

This release

0.7.0 This release

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