-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Integration for Ray LLM with load_format=runai_streamer #30154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…i_streamer Signed-off-by: Jiang Wu <[email protected]>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run You ask your reviewers to trigger select CI tests on top of Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request addresses a bug where the model path is incorrectly overwritten when using runai_streamer with models from cloud storage. The fix prevents this overwrite, ensuring the engine initializes correctly. My review identifies an oversight where the fix doesn't account for the runai_streamer_sharded load format, which would lead to the same bug. I've suggested a more robust condition to cover all runai_streamer variants.
| model_config = self.create_model_config() | ||
| self.model = model_config.model | ||
| # if streaming from cloud storage, do not overwrite self.model with local dir | ||
| if not (is_cloud_storage(self.model) and self.load_format=="runai_streamer"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition to prevent overwriting self.model only checks for load_format=="runai_streamer". This is incomplete as it misses other runai_streamer variants like runai_streamer_sharded. If a user specifies load_format="runai_streamer_sharded" with a cloud storage model path, self.model will be incorrectly overwritten with a local directory, leading to the same failure this PR aims to fix. Using startswith("runai_streamer") would be more robust and cover all related formats.
| if not (is_cloud_storage(self.model) and self.load_format=="runai_streamer"): | |
| if not (is_cloud_storage(self.model) and self.load_format.startswith("runai_streamer")): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there other modes we need to consider as well like tokenizer? I'm not sure which load_formats actually skip tensors being downloaded and use streaming
|
Hi @jiangwu300, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, |
|
After a second eye, I think it's better to fix this inside ModelConfig where redirected Lines 769 to 787 in 02a4169
|
Purpose
This PR makes it so that when a model is a s3 (or other cloud storage location) and we have runai_streamer turned on, we do not overwrite the self.model with a local directory which leads to failure of engine initialization since the local dir will not have the safe tensors.
Test Plan
Run a simple ray job with ray data llm, passing in a s3 model path with runai_streamer turned on.
Test Result
Runs as expected, no more failure.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.