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

    encoder_num_key_value_heads (`int`, *optional*):
        This is the number of key_value heads that should be used to implement Grouped Query Attention. If
        `encoder_num_key_value_heads=encoder_num_attention_heads`, the model will use Multi Head Attention (MHA), if
        `encoder_num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
        converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
        by meanpooling all the original heads within that group. For more details, check out [this
        paper](https://huggingface.co/papers/2305.13245). If it is not specified, will default to
        `num_attention_heads`.
    decoder_num_key_value_heads (`int`, *optional*):
        This is the number of key_value heads that should be used to implement Grouped Query Attention. If
        `decoder_num_key_value_heads=decoder_num_attention_heads`, the model will use Multi Head Attention (MHA), if
        `decoder_num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
        converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
        by meanpooling all the original heads within that group. For more details, check out [this
        paper](https://huggingface.co/papers/2305.13245). If it is not specified, will default to
        `decoder_num_attention_heads`.
    pad_head_dim_to_multiple_of (`int`, *optional*):
        Pad head dimension in encoder and decoder to the next multiple of this value. Necessary for using certain
        optimized attention implementations.
    encoder_hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`):
        The non-linear activation function (function or string) in the encoder.
    decoder_hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
        The non-linear activation function (function or string) in the decoder.

    Example:

    ```python
    >>> from transformers import MoonshineModel, MoonshineConfig

    >>> # Initializing a Moonshine style configuration
    >>> configuration = MoonshineConfig().from_pretrained("UsefulSensors/moonshine-tiny")

    >>> # Initializing a model from the configuration
    >>> model = MoonshineModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
=== parse google
short_description: 'encoder_num_key_value_heads (`int`, *optional*):'
long_description: |
      This is the number of key_value heads that should be used to implement Grouped Query Attention. If
      `encoder_num_key_value_heads=encoder_num_attention_heads`, the model will use Multi Head Attention (MHA), if
      `encoder_num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
      converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
      by meanpooling all the original heads within that group. For more details, check out [this
      paper](https://huggingface.co/papers/2305.13245). If it is not specified, will default to
      `num_attention_heads`.
  decoder_num_key_value_heads (`int`, *optional*):
      This is the number of key_value heads that should be used to implement Grouped Query Attention. If
      `decoder_num_key_value_heads=decoder_num_attention_heads`, the model will use Multi Head Attention (MHA), if
      `decoder_num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
      converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
      by meanpooling all the original heads within that group. For more details, check out [this
      paper](https://huggingface.co/papers/2305.13245). If it is not specified, will default to
      `decoder_num_attention_heads`.
  pad_head_dim_to_multiple_of (`int`, *optional*):
      Pad head dimension in encoder and decoder to the next multiple of this value. Necessary for using certain
      optimized attention implementations.
  encoder_hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`):
      The non-linear activation function (function or string) in the encoder.
  decoder_hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
      The non-linear activation function (function or string) in the decoder.
  
  ```python
  >>> from transformers import MoonshineModel, MoonshineConfig
  
  >>> # Initializing a Moonshine style configuration
  >>> configuration = MoonshineConfig().from_pretrained("UsefulSensors/moonshine-tiny")
  
  >>> # Initializing a model from the configuration
  >>> model = MoonshineModel(configuration)
  
  >>> # Accessing the model configuration
  >>> configuration = model.config
  ```
blank_after_short_description: True
blank_after_long_description: True
style: google
- DocstringExample
  kind: examples
  key: 'examples'
=== detect
google
=== compose google
encoder_num_key_value_heads (`int`, *optional*):

    This is the number of key_value heads that should be used to implement Grouped Query Attention. If
    `encoder_num_key_value_heads=encoder_num_attention_heads`, the model will use Multi Head Attention (MHA), if
    `encoder_num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
    converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
    by meanpooling all the original heads within that group. For more details, check out [this
    paper](https://huggingface.co/papers/2305.13245). If it is not specified, will default to
    `num_attention_heads`.
decoder_num_key_value_heads (`int`, *optional*):
    This is the number of key_value heads that should be used to implement Grouped Query Attention. If
    `decoder_num_key_value_heads=decoder_num_attention_heads`, the model will use Multi Head Attention (MHA), if
    `decoder_num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
    converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
    by meanpooling all the original heads within that group. For more details, check out [this
    paper](https://huggingface.co/papers/2305.13245). If it is not specified, will default to
    `decoder_num_attention_heads`.
pad_head_dim_to_multiple_of (`int`, *optional*):
    Pad head dimension in encoder and decoder to the next multiple of this value. Necessary for using certain
    optimized attention implementations.
encoder_hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`):
    The non-linear activation function (function or string) in the encoder.
decoder_hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
    The non-linear activation function (function or string) in the decoder.

```python
>>> from transformers import MoonshineModel, MoonshineConfig

>>> # Initializing a Moonshine style configuration
>>> configuration = MoonshineConfig().from_pretrained("UsefulSensors/moonshine-tiny")

>>> # Initializing a model from the configuration
>>> model = MoonshineModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```

Examples:
