Skip to content

Commit

Permalink
fix: fix DPO sequence packing + pipeline parallel (#437)
Browse files Browse the repository at this point in the history
Signed-off-by: ashors1 <[email protected]>
  • Loading branch information
ashors1 authored Dec 9, 2024
1 parent cf14d1c commit 3791aad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nemo_aligner/models/nlp/gpt/megatron_gpt_dpo_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def fwd_output_and_loss_func(dataloader_iter, model, checkpoint_activations_all_
required_keys.add("attention_mask")
if "cu_seqlens" in batch:
required_keys.add("cu_seqlens")
required_keys.add("max_seqlen")
required_keys.add("cu_seqlens_argmin")

if parallel_state.is_pipeline_first_stage():
if packed:
Expand Down

0 comments on commit 3791aad

Please sign in to comment.