Skip to content

[bugfix] fix vllm sleep&wake_up produces meaningless output #5143

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

Merged
merged 2 commits into from
Jul 29, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions swift/trainers/rlhf_trainer/grpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ def _fast_infer(self, inputs: InputsType) -> Tuple[InputsType, OutputsType]:
outputs = self._infer_single_or_multi_turn(inputs, self.request_config)

if self.vllm_mode == 'colocate' and self.args.sleep_level > 0:
self.engine.engine.reset_prefix_cache()
self.engine.engine.sleep(level=self.args.sleep_level)
empty_cache()

Expand Down
Loading