text: 
  
  TITLE
  Mistake in the BART doc & inconsistency between code & doc
  
  COMMENTS
  3
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  Version: Most recent in the Github repo.
  Model: BART.
  
  Description:
  https://github.com/huggingface/transformers/blob/main/src/transformers/models/bart/modeling_bart.py#L627 says to look at `modeling_bart._prepare_decoder_inputs` to modify the default behavior of the way `decoder_attention_mask` behaves by default, but there is no `_prepare_decoder_inputs` anywhere in the Huggingface Transformers repository. I guess it's an artifact from a previous version, and that the function is now called `_prepare_decoder_attention_mask`. However, this method doesn't seem to look at the values of the decoder inputs anywhere, so I don't think it does what the doc says, ie mask the pad tokens. Or is this done somewhere else?
  
  Thanks.
  
  
  ### Who can help?
  
  @patil-suraj
  
  ### Expected behavior
  
  ```shell
  Mask pad tokens by default in the decoder.
  ```
  