Skip to content
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

Add GPT eval mode fix for interleaved to main (#6449) #6610

Merged
merged 1 commit into from
May 10, 2023
Merged
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 @@ -665,8 +665,17 @@ def validation_step(self, dataloader_iter, batch_idx):
from the dataloader to produce a list of microbatches.
The list of microbatches is then piped through the pipeline using megatron-core fwd/bwd functions.
"""
if isinstance(self.model, list):
for model_module in self.model:
model_module.eval()

loss = self.fwd_bwd_step(dataloader_iter, batch_idx, True)

return self.fwd_bwd_step(dataloader_iter, batch_idx, True)
if isinstance(self.model, list):
for model_module in self.model:
model_module.train()

return loss

def validation_epoch_end(self, outputs):
if parallel_state.is_pipeline_last_stage():
Expand Down
Loading