-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[rollout] feat: ChatScheduler requests sglang fully async #1769
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
Changes from all commits
c384c54
c24aa0b
d85ee69
442f8d9
e74f82d
fdac45b
f8bab50
1fa47c3
0872d21
902cf3e
862b80a
ee74ca9
2d67bdc
03aee03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1430,10 +1430,19 @@ def execute_method(self, method: Union[str, bytes], *args, **kwargs): | |
| print(f"[DP={self.vllm_dp_rank},TP={self.vllm_tp_rank}] execute_method: {method if isinstance(method, str) else 'Callable'}") | ||
| return self.rollout.execute_method(method, *args, **kwargs) | ||
|
|
||
| @register(dispatch_mode=Dispatch.DIRECT_ROLLOUT_METHOD, blocking=False) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to use the rollout API directly instead of adding a glue layer at the FSDP worker level?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I have tried this approach, but have not success yet, because sglang need tp start a process for each TP worker, otherwise it stacks at " params = self.module.state_dict()". Do you know how to get it work?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After investigation, it seems the base Worker class includes a routing mechanism through a registration system, which may hinder rollout from supporting the dispatch method via registration. Therefore, the current logic is essential. |
||
| async def chat_completion(self, json_request): | ||
| ret = await self.rollout.chat_completion(json_request) | ||
| return ret | ||
|
|
||
| @register(dispatch_mode=Dispatch.DIRECT_ROLLOUT_METHOD) | ||
| def resume(self): | ||
| return self.rollout.resume() | ||
| async def wake_up(self): | ||
| await self.rollout.wake_up() | ||
| # return something to block the caller | ||
| return True | ||
|
|
||
| @register(dispatch_mode=Dispatch.DIRECT_ROLLOUT_METHOD) | ||
| def offload(self): | ||
| return self.rollout.offload() | ||
| async def sleep(self): | ||
| await self.rollout.sleep() | ||
| # return something to block the caller | ||
| return True | ||
Uh oh!
There was an error while loading. Please reload this page.