Skip to content

Commit

Permalink
Merge branch 'mllm' of github.com:mlfoundations/open_flamingo into im…
Browse files Browse the repository at this point in the history
…age_res
  • Loading branch information
Oscar Lo committed Nov 30, 2023
2 parents adc61a6 + c5feb97 commit 2053d1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion open_flamingo/train/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __call__(
shift_labels = labels[..., 1:].contiguous()
# Flatten the tokens
loss_fct = CrossEntropyLossWithZLoss(eps=z_loss_eps)
shift_logits = shift_logits.view(-1, model.lang_model.config.vocab_size)
shift_logits = shift_logits.view(-1, unwrap_model(model).lang_model.config.vocab_size)
shift_labels = shift_labels.view(-1)
# Enable model parallelism
shift_labels = shift_labels.to(shift_logits.device)
Expand Down

0 comments on commit 2053d1f

Please sign in to comment.