The `runai-model-streamer-s3` library acts as a backend for the `runai-model-streamer`, enabling high-performance streaming of AI model weights (specifically Safetensors format) directly from S3-compatible object storage to GPU memory. It significantly reduces model loading times, addressing 'cold start' issues for large language models in inference scenarios. The current version is 0.15.8, with releases often aligned with the main `runai-model-streamer` project.
pip install runai-model-streamer-s3Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to utilize `SafetensorsStreamer` from the `runai-model-streamer` library to stream a SafeTensors model directly from an S3-compatible object store. This relies on `runai-model-streamer-s3` under the hood. It highlights the necessary environment variables for S3-compatible (e.g., GCS HMAC) authentication.
Set the required AWS-compatible environment variables corresponding to your S3-compatible storage credentials and endpoint URL before initializing the streamer. For GCS, set `AWS_ENDPOINT_URL` to `https://storage.googleapis.com`.
Ensure `libcurl4` and `libssl1.1_1` are installed on your system (e.g., `sudo apt-get install libcurl4-openssl-dev libssl-dev` on Debian/Ubuntu-based systems, or equivalent for other distributions).
Explicitly set S3 authentication environment variables in your runtime environment (e.g., Dockerfile, Kubernetes deployment) or verify that credential files are correctly mounted and accessible to the application.
Process S3 paths and local file system paths in separate streaming operations if both are required.
Monitor S3 throughput and adjust `concurrency` and `memory_limit` parameters via `--model-loader-extra-config` in vLLM, or `RUNAI_STREAMER_CONCURRENCY` and `RUNAI_STREAMER_MEMORY_LIMIT` environment variables for `runai-model-streamer`, to optimize performance and prevent resource exhaustion. Consider local caching strategies for frequently accessed models if applicable.
No resource links recorded.