Skip to main content

vLLM plugin for flyte

Project description

Union vLLM Plugin

Serve large language models using vLLM with Flyte Apps.

This plugin provides the VLLMAppEnvironment class for deploying and serving LLMs using vLLM.

Installation

pip install --pre flyteplugins-vllm

Usage

import flyte
import flyte.app
from flyteplugins.vllm import VLLMAppEnvironment

# Define the vLLM app environment
vllm_app = VLLMAppEnvironment(
    name="my-llm-app",
    model="s3://your-bucket/models/your-model",
    model_id="your-model-id",
    resources=flyte.Resources(cpu="4", memory="16Gi", gpu="L40s:1"),
    stream_model=True,  # Stream model directly from blob store to GPU
    scaling=flyte.app.Scaling(
        replicas=(0, 1),
        scaledown_after=300,
    ),
)

if __name__ == "__main__":
    flyte.init_from_config()
    app = flyte.serve(vllm_app)
    print(f"Deployed vLLM app: {app.url}")

Features

  • Streaming Model Loading: Stream model weights directly from object storage to GPU memory, reducing startup time and disk requirements.
  • OpenAI-Compatible API: The deployed app exposes an OpenAI-compatible API for chat completions.
  • Auto-scaling: Configure scaling policies to scale up/down based on traffic.
  • Tensor Parallelism: Support for distributed inference across multiple GPUs.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

flyteplugins_vllm-2.0.0b46-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file flyteplugins_vllm-2.0.0b46-py3-none-any.whl.

File metadata

File hashes

Hashes for flyteplugins_vllm-2.0.0b46-py3-none-any.whl
Algorithm Hash digest
SHA256 290ed3322ed55e70e1a29e020d97790644e6f1456b843b32bc543c0222d7aafc
MD5 117a3cb6adb93db4bc6fea1d93fdb153
BLAKE2b-256 9aa76ce34e386b66204108d7c8ed3f0b8d7abd0769ba9d4809341b50dfb0d3ae

See more details on using hashes here.

Supported by

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