update attention mask handling
# What does this PR do?
Fixes error when using whisper with inference API.

Working script : 
```python 
>>> from transformers import WhisperForConditionalGeneration, WhisperProcessor, AutomaticSpeechRecognitionPipeline, , load_dataset, AutoModel
>>> processor = WhisperProcessor.from_pretrained("openai/whisper-large")
>>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large")

>>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")

>>> model.config.forced_decoder_ids = processor.get_decoder_prompt_ids(task="transcribe", language = "en")
>>> model.config.max_length = 224
>>> pipeline = AutomaticSpeechRecognitionPipeline(
    model = model, 
    tokenizer = processor.tokenizer, 
    feature_extractor = processor.feature_extractor)
>>> print(pipeline(ds[0]["audio"]["array"]))
{'text': ' Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.'}
```
_The documentation is not available anymore as the PR was closed or merged._<|||||>Using the `pipeline` wrapper  also works : `pipe = pipeline("automatic-speech-recognition", model="openai/whisper-medium.en", device=0)`. 