title: How does masked_lm_labels argument work in BertForMaskedLM?
body: <pre><code>from transformers import BertTokenizer, BertForMaskedLM
  import torch
  
  tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
  model = BertForMaskedLM.from_pretrained('bert-base-uncased')
  
  input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute", add_special_tokens=True)).unsqueeze(0) # Batch size 1
  outputs = model(input_ids, masked_lm_labels=input_ids)
  
  loss, prediction_scores = outputs[:2] 
  </code></pre>
  
  <p>This code is from huggingface transformers page. <a href="https://huggingface.co/transformers/model_doc/bert.html#bertformaskedlm" rel="nofollow noreferrer">https://huggingface.co/transformers/model_doc/bert.html#bertformaskedlm</a></p>
  
  <p>I cannot understand the <code>masked_lm_labels=input_ids</code> argument in <code>model</code>. 
  How does it work? Does it means that it will automatically mask some of the text when <code>input_ids</code> is passed?</p>