robinfaro commited on
Commit
8d4a6d6
·
verified ·
1 Parent(s): c7a0766

Adding modeling.py file

Browse files
Files changed (1) hide show
  1. modeling.py +1 -1
modeling.py CHANGED
@@ -109,7 +109,7 @@ class MoLM(PreTrainedModel):
109
  # Expand the expert_mask to match the logits shape (batch_size, 1, 1)
110
  expert_mask_expanded = expert_mask.unsqueeze(-1).unsqueeze(-1).float()
111
 
112
- expert_output = expert(input_ids, targets=targets, date=date, **kwargs)
113
 
114
  logits = expert_output["logits"]
115
  loss_to_log = expert_output["loss_to_log"]
 
109
  # Expand the expert_mask to match the logits shape (batch_size, 1, 1)
110
  expert_mask_expanded = expert_mask.unsqueeze(-1).unsqueeze(-1).float()
111
 
112
+ expert_output = expert(input_ids, targets=targets, date=date, **kwargs, get_logits=True)
113
 
114
  logits = expert_output["logits"]
115
  loss_to_log = expert_output["loss_to_log"]