TypeError: forward() got an unexpected keyword argument 'masked_token_type_ids'

I am trying to fine tune bert-base-uncase (WORKS FOR distilbert-base-uncase) from this example Fine-tuning a masked language model - Hugging Face NLP Course . I am using accelerate . Here is the full stack:
TypeError Traceback (most recent call last)
Cell In [23], line 25
23 for step, batch in enumerate(eval_dataloader):
24 with torch.no_grad():
—> 25 outputs = model(batch)
27 loss = outputs.loss
28 losses.append(accelerator.gather(loss.repeat(batch_size)))

File /usr/local/lib/python3.9/dist-packages/torch/nn/modules/module.py:1130, in Module._call_impl(self, input, kwargs)
1126 # If we don’t have any hooks, we want to skip the rest of the logic in
1127 # this function, and just call forward.
1128 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1129 or _global_forward_hooks or _global_forward_pre_hooks):
→ 1130 return forward_call(input, **kwargs)
1131 # Do not call functions when jit is used
1132 full_backward_hooks, non_full_backward_hooks = ,

TypeError: forward() got an unexpected keyword argument ‘masked_token_type_ids’