Skip to main content

RelayServe

RelayServe is a minimal LLM inference server that adapts to heterogeneous devices.

Quick start

Install from PyPI:

pip install relayserve
relayserve

Defaults:

  • HTTP server: :8080
  • Endpoints:
    • GET /healthz
    • GET /v1/models
    • POST /v1/chat/completions
    • GET /metrics
    • GET /debug/shard
    • POST /v1/chat/pretty (colorized text response)
  • Backends: set RELAYSERVE_BACKENDS to comma-separated llama.cpp servers

Environment

  • RELAYSERVE_PORT (default 8080)
  • RELAYSERVE_MODEL_ID (default relay-gguf)
  • RELAYSERVE_BACKENDS (comma-separated, e.g. http://localhost:8081,http://localhost:8082)
  • RELAYSERVE_BATCH_SIZE (default 4)
  • RELAYSERVE_BATCH_WAIT_MS (default 10)
  • RELAYSERVE_METRICS_MAX_ITEMS (default 1000)
  • RELAYSERVE_TOTAL_LAYERS (default 32)
  • RELAYSERVE_PRETTY_JSON (set 1 for readable JSON responses)
  • RELAYSERVE_PRETTY_DEFAULT (default 1, set 0 for JSON by default)

Spawning llama.cpp backends

export LLAMA_SERVER_PATH=/path/to/llama.cpp/server
export LLAMA_MODEL_PATH=/path/to/models/phi-3-mini.gguf
export LLAMA_PORTS=8081,8082
python scripts/spawn_backends.py

Then run the RelayServe server with:

export RELAYSERVE_BACKENDS=http://localhost:8081,http://localhost:8082
relayserve

Metadata

Release files for relayserve 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for relayserve 1.1
File Size Uploaded
relayserve-1.1.tar.gz 13.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for relayserve 1.1
File Interpreter ABI Platform
relayserve-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / relayserve-1.1.tar.gz

Download URL relayserve-1.1.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
566f3744885974e773d1f5c855541796ca6f38fe5ba44958a957f611619b13a8
BLAKE2b-256 checksum
How to use checksums
a9e3effd4b6cd089dd6bf0012d881516aae566a994fe651c3d49434d370620f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / relayserve-1.1-py3-none-any.whl

Download URL relayserve-1.1-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1ac140ac51d29de9c3546bd165c6304ad4068ff6b9173fca2e2a08a20b5f02b
BLAKE2b-256 checksum
How to use checksums
d7ec4d059074f3f78bd165b5ddfc600e6e73e1206768b980530037b0e5e847af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

1.1 This release

2 release 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