Skip to main content

vLLM adapter for a TGIS-compatible grpc server

Project description

vllm-tgis-adapter

vLLM adapter for a TGIS-compatible grpc server.

PyPi Tests quay.io/opendatahub/vllm codecov

Install

vllm-tgis-adapter is available on PyPi

pip install vllm-tgis-adapter
python -m vllm_tgis_adapter

HealthCheck CLI

Installing the adapter also install a grpc healthcheck cli that can be used to monitor the status of the grpc server:

$ grpc_healtheck
health check...status: SERVING

See usage with

grpc_healthcheck --help

Build

python -m build
pip install dist/*whl
python -m vllm_tgis_adapter

Inference

This will start serving a grpc server on port 8033. This can be queried with grpcurl:

bash examples/inference.sh

Docker

Image available at quay.io/opendatahub/vllm, built from opendatahub-io/vllm's Dockerfile.ubi

docker pull quay.io/opendatahub/vllm

Inference

See examples

Contributing

Set up pre-commit for linting/style/misc fixes:

pip install pre-commit
pre-commit install
# to run on all files
pre-commit run --all-files

This project uses nox to manage test automation:

pip install nox
nox --list  # list available sessions
nox -s tests-3.10 # run tests session for a specific python version
nox -s build-3.11 # build the wheel package
nox -s lint-3.11 -- --mypy # run linting with type checks

Testing without a GPU

The standard vllm built requires an Nvidia GPU. When this is not available, it is possible to compile vllm from source with CPU support:

env \
    VLLM_CPU_DISABLE_AVX512=true VLLM_TARGET_DEVICE=cpu \
    PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu \
    pip install git+https://github.com/vllm-project/vllm

making it possible to run the tests on most hardware. Please note that the pip extra index url is required in order to install the torch CPU version.

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

vllm_tgis_adapter-0.5.2.tar.gz (123.0 kB view details)

Uploaded Source

Built Distribution

vllm_tgis_adapter-0.5.2-py3-none-any.whl (52.9 kB view details)

Uploaded Python 3

File details

Details for the file vllm_tgis_adapter-0.5.2.tar.gz.

File metadata

  • Download URL: vllm_tgis_adapter-0.5.2.tar.gz
  • Upload date:
  • Size: 123.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vllm_tgis_adapter-0.5.2.tar.gz
Algorithm Hash digest
SHA256 0e7371608c05f80f5b3c6a12877dd850f6aa31cef25495af385cfe8915024752
MD5 49004bfb20d3bce465a0bd86ec7fcff8
BLAKE2b-256 cbee0d8900f7f493bc0db003082e656820a681263dce39007e909f37633fb97a

See more details on using hashes here.

File details

Details for the file vllm_tgis_adapter-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for vllm_tgis_adapter-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 90a9ec5cf2926cac962b88597f2692f15fb1ac00bccafb9fd854977fb633922e
MD5 4eb90d2b88475f45649382ce5fd4ffa4
BLAKE2b-256 822c720676a856900898935304a9542eec73e5b7f4dce4eae74fb84fa8a2d58f

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