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.4.tar.gz (8.7 kB view details)

Uploaded Source

Built Distributions

sglang_router-0.0.4-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.4-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.4-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.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: sglang_router-0.0.4.tar.gz
  • Upload date:
  • Size: 8.7 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.4.tar.gz
Algorithm Hash digest
SHA256 cab4fb1425465814a27e1c4fe1da1577a2652a45592a917ee96b3e675f04bd18
MD5 6337ee110c85b8f0314627aaa5486994
BLAKE2b-256 0d3e21b4029dac48ff3deabfd6487f08d4647e5511f06438b7fe1c3577270d5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sglang_router-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b2c5e2e66f957f049e0763291ee29cd2ca66b270c96fc434e560be6adf1be4d
MD5 7dbaa2257c965e1b48713aab3b831550
BLAKE2b-256 83cd4c4b4161fd817ce665927f1a836cbe8e73a5185c70c78e46143ae6fc4608

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sglang_router-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0032d574c8b3da2b29ab0c53b388644e557b09c8218b6631cf240a113d94e8a5
MD5 627301e751593824b88099c392c2f90c
BLAKE2b-256 e82e9a62e3597ece5186c4e011896f78e9ab5dc5d4edf575234b6346a0fdb9e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sglang_router-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9aa9977ab7b18026b7fd3a9260bd5a9fa93f98f5b64ed7d7e3f3e890a4aef38
MD5 3b51eac406d8da8616d731d0986f76a0
BLAKE2b-256 2d6abd2ff26e75664f9ae227ce809d43f87eb2f48592625e6046191738fb5547

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sglang_router-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4a4f2c046d9a2aed24be97fd4adcfa65b7326def52015f76d10516af38b5acb5
MD5 01aae1665a10dcc4b5aeb4bae31c49dc
BLAKE2b-256 86eb1536506731a56928718a4049557fb5edc2ce4d9d596943c47a608d1bc998

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sglang_router-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc5f54232de0648420002ee7dfe6ec520397d3eb614b59fee347336bf62934ca
MD5 d17bd17101ecdf75e3677579bcee5758
BLAKE2b-256 e02e6336074777854df7da7c15aa53b6f98b96cfb038eb6836cacc738890a589

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