Skip to main content

SGLang router is a standalone module implemented in Rust to achieve data parallelism across SGLang instances.

Project description

SGLang Router (Experimental)

SGLang router is a standalone module implemented in Rust to achieve data parallelism across SGLang instances.

Prerequisites

  • Rust and Cargo installed
# Install rustup (Rust installer and version manager)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Follow the installation prompts, then reload your shell
source $HOME/.cargo/env

# Verify installation
rustc --version
cargo --version
  • Python with pip installed

Build Process

1. Build Rust Project

cargo build

2. Build Python Binding

Option A: Build and Install Wheel

  1. Build the wheel package:
pip install setuptools-rust wheel build
python -m build
  1. Install the generated wheel:
pip install <path-to-wheel>

Option B: Development Mode

For development purposes, you can install the package in editable mode:

pip install -e .

Note: When modifying Rust code, you must rebuild the wheel for changes to take effect.

CI/CD Setup

The continuous integration pipeline consists of three main steps:

1. Build Wheels

  • Uses cibuildwheel to create manylinux x86_64 packages
  • Compatible with major Linux distributions (Ubuntu, CentOS, etc.)
  • Additional configurations can be added to support other OS/architectures
  • Reference: cibuildwheel documentation

2. Build Source Distribution

  • Creates a source distribution containing the raw, unbuilt code
  • Enables pip to build the package from source when prebuilt wheels are unavailable

3. Publish to PyPI

  • Uploads both wheels and source distribution to PyPI

The CI configuration is based on the tiktoken workflow.

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

sglang_router-0.0.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distributions

sglang_router-0.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

sglang_router-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

sglang_router-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

sglang_router-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

sglang_router-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

File details

Details for the file sglang_router-0.0.3.tar.gz.

File metadata

  • Download URL: sglang_router-0.0.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for sglang_router-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6037f22d6a1f04133140755eb822dcfdbdd21e35255d7bd698c8a5fa107f4a19
MD5 db85c17c81c350056e5696d6113ad6b9
BLAKE2b-256 83da2e571c9572c2674349c071dd01645156dea2036e1105be7ca9d343e6e251

See more details on using hashes here.

File details

Details for the file sglang_router-0.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_router-0.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9dc4673fb21ac6c0e65363ec5335352e999789f5e6553d784a8a7774ec7b14de
MD5 c99d20a39a189104803f368bcdf29fbd
BLAKE2b-256 f35b264aeeea6fb5f0639be47cdc9567c7f8606fb88eb80034a63b56d20dbb8c

See more details on using hashes here.

File details

Details for the file sglang_router-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_router-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 34ad4df46992f0cb14b28da03a3fd0afde3caf08738deec60177deefd468b086
MD5 fa1883444a143406057a0eb6a6c67ec8
BLAKE2b-256 6c425521a35780196ea5393bc8bdabbdedc8fbfeba39a46aede1cba02bc23453

See more details on using hashes here.

File details

Details for the file sglang_router-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_router-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 39c16c9f12622306dd342fccbac557d1fd0e24d4a57d9b45d275a8ce432437e0
MD5 5484e6662b91866ecf5fb5bd99e5d6a8
BLAKE2b-256 3c617049dfccb363756a54a736c1eeed945228cb792334bd85bea14624d133dc

See more details on using hashes here.

File details

Details for the file sglang_router-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_router-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3e14c485a9d4e954bef5663d8487a80bbb76c69cadc327de8dc19e081174b1e
MD5 0c0695675250ff55af287002022ce300
BLAKE2b-256 c68ec782f2b5f7d4c08052dbfff6865d8611e0f8be66f3257f721fcf4fb4f924

See more details on using hashes here.

File details

Details for the file sglang_router-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_router-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3cf549c7a416dd18d2614685b766c601bbd71436de87f0eb158f6278424cfcfd
MD5 1a3bd96e63c1b02238ccfa3fd3adfb34
BLAKE2b-256 ee10c6cbe486f951b5995fa4c6425c9384f6e1c00107961a65ca213ab1345876

See more details on using hashes here.

Supported by

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