
    Z jQ                         S SK Jr  SSKJr  SSKJr  \" SS9\ " S S\5      5       5       r\" SS9\ " S	 S
\5      5       5       rSS
/rg)    )strict   )PreTrainedConfig)auto_docstringzgoogle/medasr)
checkpointc                     ^  \ rS rSr% SrSrS/rSr\\	S'   Sr
\\	S'   S	r\\	S
'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\-  \	S'   Sr\\-  \	S'   Sr\\-  \	S '   Sr\\-  \	S!'   Sr\\-  \	S"'   S#r\\	S$'   S%r\\	S&'   S'r\\	S('   S)r \!\   \"\S*4   -  \	S+'   S,r#\!\   \"\S*4   -  \	S-'   S.r$\\	S/'   S0r%\&S0-  \	S1'   U 4S2 jr'S3r(U =r)$ )4LasrEncoderConfig   a  
convolution_bias (`bool`, *optional*, defaults to `False`):
    Whether to use bias in convolutions of the conformer's convolution module.
conv_kernel_size (`int`, *optional*, defaults to 32):
    The kernel size of the convolution layers in the Conformer block.
subsampling_conv_channels (`int`, *optional*, defaults to 256):
    The number of channels in the subsampling convolution layers.
subsampling_conv_kernel_size (`int`, *optional*, defaults to 5):
    The kernel size of the subsampling convolution layers.
subsampling_conv_stride (`int`, *optional*, defaults to 2):
    The stride of the subsampling convolution layers.
dropout_positions (`float`, *optional*, defaults to 0.0):
    The dropout ratio for the positions in the input sequence.
feed_forward_residual_weights (`tuple[float, float]`, *optional*, defaults to `[1.5, 0.5]`):
    The residual weights for the feed forward layers.
conv_residual_weights (`tuple[float, float]`, *optional*, defaults to `[2.0, 1.0]`):
    The residual weights for the convolution layers.
batch_norm_momentum (`float`, *optional*, defaults to 0.01):
    The momentum for the batch normalization layers

Example:
    ```python
    >>> from transformers import LasrEncoderModel, LasrEncoderConfig

    >>> # Initializing a `LasrEncoder` configuration
    >>> configuration = LasrEncoderConfig()

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

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

This configuration class is based on the LasrEncoder architecture from Google Health AI. You can find more details
and pre-trained models at [google/medasr](https://huggingface.co/google/medasr).
lasr_encoderpast_key_values   hidden_size   num_hidden_layers   num_attention_headsi   intermediate_sizesilu
hidden_actFattention_biasconvolution_bias    conv_kernel_size   subsampling_conv_channels   num_mel_bins   subsampling_conv_kernel_size   subsampling_conv_strideg?dropoutg        dropout_positions	layerdropactivation_dropoutattention_dropouti'  max_position_embeddingsg{Gz?initializer_rangegư>layer_norm_eps)g      ?g      ?.feed_forward_residual_weights)g       @g      ?conv_residual_weightsg{Gz?batch_norm_momentumNrope_parametersc                 H   > U R                   U l        [        TU ]  " S0 UD6  g N )r   num_key_value_headssuper__post_init__selfkwargs	__class__s     |/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/lasr/configuration_lasr.pyr3   LasrEncoderConfig.__post_init__`   s!    #'#;#; ''    )r1   )*__name__
__module____qualname____firstlineno____doc__
model_typekeys_to_ignore_at_inferencer   int__annotations__r   r   r   r   strr   boolr   r   r   r   r   r!   r"   floatr#   r$   r%   r&   r'   r(   r)   r*   listtupler+   r,   r-   dictr3   __static_attributes____classcell__r7   s   @r8   r	   r	      s_   $L  J#4"5Ks  !s!J ND "d"c%(s(L#() #)#$S$GUS[%(us{( Ius{ &))%(us{(#(S(#u# NE EO!4;ucz1B#BO=G4;ucz)::G!%%#'OTD['( (r:   r	   c                      ^  \ rS rSr% SrSrS\0rSr\	\
S'   Sr\\
S'   S	r\\
S
'   Sr\\-  S-  \
S'   Sr\	\
S'   U 4S jr\S 5       rSrU =r$ )LasrCTCConfige   a  
ctc_loss_reduction (`str`, *optional*, defaults to `"mean"`):
    Specifies the reduction to apply to the output of `torch.nn.CTCLoss`. Only relevant when training an
    instance of [`LasrForCTC`].
ctc_zero_infinity (`bool`, *optional*, defaults to `True`):
    Whether to zero infinite losses and the associated gradients of `torch.nn.CTCLoss`. Infinite losses mainly
    occur when the inputs are too short to be aligned to the targets. Only relevant when training an instance
    of [`LasrForCTC`].

Example:
    ```python
    >>> from transformers import LasrForCTC, LasrCTCConfig
    >>> # Initializing a Lasr configuration
    >>> configuration = LasrCTCConfig()
    >>> # Initializing a model from the configuration
    >>> model = LasrForCTC(configuration)
    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
This configuration class is based on the Lasr CTC architecture from Google Health AI. You can find more details
and pre-trained models at [google/medasr](https://huggingface.co/google/medasr).
lasr_ctcencoder_configr   
vocab_sizemeanctc_loss_reductionTctc_zero_infinityNr   pad_token_idc                   > [        U R                  [        5      (       a  [        S0 U R                  D6U l        OU R                  c  [        5       U l        U R                  R                  U l        [
        TU ]  " S0 UD6  g r/   )
isinstancerQ   rI   r	   r(   r2   r3   r4   s     r8   r3   LasrCTCConfig.__post_init__   sg    d))400"3"Jd6I6I"JD  ("3"5D!%!4!4!F!F''r:   c                 4    U R                   R                  S-  $ )Nr    )rQ   r!   )r5   s    r8   inputs_to_logits_ratio$LasrCTCConfig.inputs_to_logits_ratio   s    ""::A==r:   )rQ   r(   )r;   r<   r=   r>   r?   r@   r	   sub_configsrR   rB   rC   rT   rD   rU   rE   rQ   rI   r   rV   r3   propertyr[   rJ   rK   rL   s   @r8   rN   rN   e   sr    . J#%67KJ$$"t"59ND++d29L#( > >r:   rN   N)	huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   rN   __all__r0   r:   r8   <module>rc      ss   * / 3 # ?+E(( E(  ,E(P ?++>$ +>  ,+>\ 
0r:   