# Why is only the parameter \`attention\_mask\` singular?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhy-is-only-the-parameter-attention-mask-singular%2F69292%3E%5C
**Category:** 🤗Transformers\
**Created:** [January 16, 2024, 4:40am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhy-is-only-the-parameter-attention-mask-singular%2F69292 "2024-01-16T04:40:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonghwanhyeon](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jonghwanhyeon/32/23019_2.png) [@jonghwanhyeon](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjonghwanhyeon)%5C
**Post date:** [January 16, 2024, 4:40am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhy-is-only-the-parameter-attention-mask-singular%2F69292%2F1 "2024-01-16T04:40:29Z")

</div>

In Transformers library, why is only the parameter `attention_mask` singular? Even `head_mask` is singular too.

I am asking this because other parameters like `input_ids`, `position_ids` and `labels` are plural in forward().

Is there any historical reason for that choice?

One hypothesis I think is that for one sample in a batch, `attention_mask` corresponds to one and `input_ids` corresponds to multiple values.

However, this does not explain why `labels` is plural.
