[Refactor] Rename offload_model and dispatch_for_sequential to set_onload_device#2501
[Refactor] Rename offload_model and dispatch_for_sequential to set_onload_device#2501nrmlthms wants to merge 4 commits intovllm-project:mainfrom
Conversation
dispatch_for_sequential to set_onload_device - Delete dispatch_for_sequential from sequential pipeline helpers - Update SequentialPipeline to call set_onload_device directly - Update test_helpers to use set_onload_device Closes vllm-project#2483
|
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the model offloading mechanism within the sequential pipeline. It simplifies the codebase by removing a redundant wrapper function, Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the model offloading logic by removing the dispatch_for_sequential wrapper function and replacing its usage, along with calls to the now-renamed offload_model, with set_onload_device from the compressed-tensors library. The changes are applied consistently across the sequential pipeline and its tests, simplifying the codebase by removing an unnecessary abstraction.
brian-dellabetta
left a comment
There was a problem hiding this comment.
Thanks! LGTM, pending changes requested to CT PR
kylesayrs
left a comment
There was a problem hiding this comment.
Looks good! Let's make sure the CT PR lands first before merging this one.
|
The quality checks have failed. Please run |
Head branch was pushed to by a user without write access
|
The quality checks have failed. Please run |
There was a problem hiding this comment.
can you remove all these one-off formatting changes?
(some of them are breaking the quality checks incidentally) but even if not, lets leave those in a separate PR if you want to make them
if you do pip install -e .[dev] in the llm compressor repo that will give you the right version of ruff that won't add 24 files worth of formatting changes
Summary
dispatch_for_sequentialfrompipelines/sequential/helpers.py— it was a thin wrapperaround
offload_modelwith no additional logicSequentialPipelineto callset_onload_devicedirectly from
compressed_tensors.offloadtests/llmcompressor/utils/test_helpers.pyto useset_onload_deviceCloses #2483
Notes
Companion PR in compressed-tensors: vllm-project/compressed-tensors#643