-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[platforms] absorb worker cls difference into platforms folder #10555
Conversation
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 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 do one of these:
🚀 |
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.
LGTM
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Thanks @youkaichao! I am also reviewing this now... |
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.
@youkaichao I think this change is probably ok if we're going to continue iterating on the architecture, but it doesn't seem like the right end design to me.
I've already been thinking that we need to overhaul the executor hierarchy/abstractions a bit (hoping we can do this as part of v1), and that may be part of why this doesn't sit right.
In particular we have one or more executor class(es) per platform so this is in some way abstracting over the platforms. But then there's a parallel Platform abstraction. I think we should get rid of the platform-specific executors. I.e. no ray_*pu_executor.py
s. Possibly the platform-specific aspects could be a mix-in.
It also feels a bit wrong to me to update the config objects in-place since these might be created/ "owned" by the user.
Also wdyt about changing this field to be custom_worker_cls: Optional[str] = None
? Since it's a very specialized option I would consider it more overriding vLLMs native behaviour so it's not so much an "auto" thing.
I strongly agree. We should only have {single worker executor, ray executor, mp executor} , and they should be able to initialize various workers. I think this PR is a tiny step towards that direction. |
what's the concern here? the problem is we don't have a scratch space for the model to store some information, and right now we use |
Yeah it's kind of a more general point than this PR ... like you say two things are being conflated a bit. Ideally the config should be treated as read-only I think (could have been passed in by the user) and model global mutable state should be separate. Perhaps something like: @dataclass
class ModelState:
config: VllmConfig
# ... |
Co-authored-by: Nick Hill <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
@njhill this makes sense, but you need to figure out where to store it. All the classes, including engine, executor, worker, model runner, model needs to access it. And you cannot use module-level global state because people can create multiple |
I use a single Printing:
looks less clear than:
and
|
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.
We can address the other suggestions as follow-on refactoring
…project#10555) Signed-off-by: youkaichao <[email protected]> Co-authored-by: Nick Hill <[email protected]> Signed-off-by: Tyler Michael Smith <[email protected]>
`worker_module_name` and `worker_class_name` is no longer supported. Refer to vllm-project/vllm#10555 Signed-off-by: Hollow Man <[email protected]>
…project#10555) Signed-off-by: youkaichao <[email protected]> Co-authored-by: Nick Hill <[email protected]> Signed-off-by: Maxime Fournioux <[email protected]>
…project#10555) Signed-off-by: youkaichao <[email protected]> Co-authored-by: Nick Hill <[email protected]>
part of #9268
every platforms should specify the worker class inside their own code.
in addition, the default case is
auto
, and this allows users to specify custom classes for extensibility (which i'm working on as part of an RLHF support).