# transformers 5.24.1 (Apache-2.0), harvested by tools/harvest_corpus.py
=== input

        Args:
            hidden_states (`torch.Tensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
            attention_mask (`torch.Tensor`, *optional*):
                attention mask of size `(batch_size, sequence_length)` if flash attention is used or `(batch_size, 1,
                query_sequence_length, key_sequence_length)` if default attention is used.

            use_cache (`bool`, *optional*):
                If set to `True`, `cache` key value states are returned and can be used to speed up decoding
                (see `cache`).
            cache (`Cache`, *optional*): cached past key and value projection states
            position_embeddings (`tuple[torch.Tensor, torch.Tensor]`, *optional*):
                Tuple containing the cosine and sine positional embeddings of shape `(batch_size, seq_len, head_dim)`,
                with `head_dim` being the embedding dimension of each attention head.
            kwargs (`dict`, *optional*):
                Arbitrary kwargs to be ignored, used for FSDP and other methods that injects code
                into the model
        
=== parse google
blank_after_short_description: False
blank_after_long_description: False
style: google
- DocstringParam
  description: 'input to the layer of shape `(batch, seq_len, embed_dim)`'
  kind: param
  key: 'param'
  arg_name: 'hidden_states'
  type_name: '`torch.Tensor`'
  is_optional: False
- DocstringParam
  description: |
    attention mask of size `(batch_size, sequence_length)` if flash attention is used or `(batch_size, 1,
    query_sequence_length, key_sequence_length)` if default attention is used.
  kind: param
  key: 'param'
  arg_name: 'attention_mask'
  type_name: '`torch.Tensor`'
  is_optional: True
  raw_type_name: '`torch.Tensor`, *optional*'
- DocstringParam
  description: |
    If set to `True`, `cache` key value states are returned and can be used to speed up decoding
    (see `cache`).
  kind: param
  key: 'param'
  arg_name: 'use_cache'
  type_name: '`bool`'
  is_optional: True
  raw_type_name: '`bool`, *optional*'
- DocstringParam
  description: 'cached past key and value projection states'
  kind: param
  key: 'param'
  arg_name: 'cache'
  type_name: '`Cache`'
  is_optional: True
  raw_type_name: '`Cache`, *optional*'
- DocstringParam
  description: |
    Tuple containing the cosine and sine positional embeddings of shape `(batch_size, seq_len, head_dim)`,
    with `head_dim` being the embedding dimension of each attention head.
  kind: param
  key: 'param'
  arg_name: 'position_embeddings'
  type_name: '`tuple[torch.Tensor, torch.Tensor]`'
  is_optional: True
  raw_type_name: '`tuple[torch.Tensor, torch.Tensor]`, *optional*'
- DocstringParam
  description: |
    Arbitrary kwargs to be ignored, used for FSDP and other methods that injects code
    into the model
  kind: param
  key: 'param'
  arg_name: 'kwargs'
  type_name: '`dict`'
  is_optional: True
  raw_type_name: '`dict`, *optional*'
=== detect
google
=== compose google
Args:
    hidden_states (`torch.Tensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
    attention_mask (`torch.Tensor`, *optional*): attention mask of size `(batch_size, sequence_length)` if flash attention is used or `(batch_size, 1,
        query_sequence_length, key_sequence_length)` if default attention is used.
    use_cache (`bool`, *optional*): If set to `True`, `cache` key value states are returned and can be used to speed up decoding
        (see `cache`).
    cache (`Cache`, *optional*): cached past key and value projection states
    position_embeddings (`tuple[torch.Tensor, torch.Tensor]`, *optional*): Tuple containing the cosine and sine positional embeddings of shape `(batch_size, seq_len, head_dim)`,
        with `head_dim` being the embedding dimension of each attention head.
    kwargs (`dict`, *optional*): Arbitrary kwargs to be ignored, used for FSDP and other methods that injects code
        into the model
