Skip to content
Closed
Changes from all commits
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
4 changes: 4 additions & 0 deletions slime/backends/megatron_utils/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ def forward_step(
origin_values[origin_index] = value
values = origin_values
rollout_data[f"{store_prefix}{key}"] = values

# 显式释放 forward_data_store 以避免显存泄漏
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is written in Chinese while all other comments in this file are in English. For consistency with the rest of the codebase, this comment should be in English. Consider changing it to: "Explicitly delete forward_data_store to prevent GPU memory leak"

Suggested change
# 显式释放 forward_data_store 以避免显存泄漏
# Explicitly delete forward_data_store to prevent GPU memory leak

Copilot uses AI. Check for mistakes.
del forward_data_store

return rollout_data


Expand Down