# Attention\_mask missing from generate() output

**URL:** <https://discuss.huggingface.co/t/attention-mask-missing-from-generate-output/62489>\
**Category:** 🤗Transformers\
**Created:** [November 16, 2023, 1:06pm UTC](https://discuss.huggingface.co/t/attention-mask-missing-from-generate-output/62489 "2023-11-16T13:06:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![notoriousdto](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/notoriousdto/32/21240_2.png) [@notoriousdto](https://discuss.huggingface.co/u/notoriousdto)\
**Post date:** [November 16, 2023, 1:06pm UTC](https://discuss.huggingface.co/t/attention-mask-missing-from-generate-output/62489/1 "2023-11-16T13:06:40Z")

</div>

Hi, I am using Transformers from Git on Linux. I am passing return\_attentions=True, return\_dict\_in\_generate=True, and return\_attention\_mask=True in my GenerationConfig but the keys in the output from Generate are only ‘sequences’, ‘attentions’, and ‘past\_key\_values’. The attention\_mask that I am supposed to be passing back to the model, is not being returned by generate().
