Skip to content

[LLM] fix eval batch for pipeline model #72122

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ def forward_backward_pipeline(
# https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/schedules.py
if not compute_loss:
assert (
not forward_only
forward_only
), "compute_loss can only be set to False when forward_only is set to True"

if static_scheduler:
Expand Down Expand Up @@ -2497,7 +2497,7 @@ def forward_backward_pipeline(
get_sync_logger().info("start forward_backward_pipeline")
if not compute_loss:
assert (
not forward_only
forward_only
), "compute_loss can only be set to False when forward_only is set to True"

# NOTE(shenliang03): Due to ring_exchange for pipeline with interleave, cache should be enabled
Expand Down Expand Up @@ -2727,7 +2727,7 @@ def forward_backward_pipeline(
self._reset_user_hooks_status()
if not compute_loss:
assert (
not forward_only
forward_only
), "compute_loss can only be set to False when forward_only is set to True"
assert (
self._using_cache
Expand Down