Skip to content

Commit 0a43813

Browse files
committed
[Feat] Add worker interface "reload_weights"
Signed-off-by: ivyilike <[email protected]>
1 parent 2223ea3 commit 0a43813

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

vllm_ascend/worker/worker_v1.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -470,14 +470,4 @@ def take_draft_token_ids(self) -> Optional[DraftTokenIds]:
470470
return self.model_runner.take_draft_token_ids()
471471

472472
def reload_weights(self) -> None:
473-
if self.vllm_config.model_config.enable_sleep_mode:
474-
allocator = CaMemAllocator.get_instance()
475-
assert allocator.get_current_usage() == 0, (
476-
"Sleep mode can only be "
477-
"used for one instance per process.")
478-
context = allocator.use_memory_pool(tag="weights")
479-
else:
480-
from contextlib import nullcontext
481-
context = nullcontext() # type: ignore
482-
with context:
483-
self.model_runner.reload_weights()
473+
self.model_runner.reload_weights()

0 commit comments

Comments
 (0)