+
    œ°³jr[  ã                   ó  € ^ RI t ^ RIHt ^ RIt^ RIHt ^ RIHtHtH	t	H
t
Ht ^ RIHt ^ RIHt ^RIHt ^RIHt ^R	IHt ^R
IHtHtHt ^RIHtHt ^RIHt ^RIHtH t H!t! ^RI"H#t# ^RI$H%t% ^RI&H't'H(t(H)t)H*t* ^RI+H,t,H-t- ^RI.H/t/H0t0H1t1H2t2H3t3 ^RI4H5t5 ]!Pl                  ! ]74      t8 ! R R]5]4      t9 ! R R]RR7      t:]  ! R R]4      4       t;] ! RR7      ] ! R R]-4      4       4       t<] ! RR7      ] ! R  R!],4      4       4       t= ! R" R#]P|                  4      t? ! R$ R%](4      t@ ! R& R']'4      tA ! R( R)]04      tB ! R* R+]/4      tC ! R, R-]34      tD ! R. R/]14      tE] ! R0R17       ! R2 R3]D4      4       tF ! R4 R5]24      tG. R6OtHR# )7é    N)ÚCallable)Ústrict)Ú	TokenizerÚdecodersÚnormalizersÚpre_tokenizersÚ
processors)ÚUnigram)Únn)Ú
AudioInput)Úcreate_bidirectional_mask)ÚALL_ATTENTION_FUNCTIONS)ÚProcessingKwargsÚProcessorMixinÚUnpack)ÚPreTokenizedInputÚ	TextInput)ÚTokenizersBackend)ÚTransformersKwargsÚauto_docstringÚlogging)Úmerge_with_config_defaults)Úcapture_outputs)ÚLlamaAttentionÚLlamaRotaryEmbeddingÚapply_rotary_pos_embÚeager_attention_forward)ÚParakeetCTCConfigÚParakeetEncoderConfig)ÚParakeetEncoderBlockÚ ParakeetEncoderConvolutionModuleÚParakeetEncoderModelOutputÚParakeetForCTCÚParakeetPreTrainedModel)ÚT5Tokenizerc                   ó@   a € ] tR t^0t o RR ltRV 3R lR lltRtV tR# )ÚLasrTokenizerNc	                ó¨  € WPn         Ve…   V U
u. uF  p
R\        V
4      9   g   K  V
NK  	  pp
\        V4      ^8  d(   T\        V4       Uu. uF	  pRV R2NK  	  up,          pMJV^ 8”  d#   V\        V4      8w  d   \	        RV RV R24      hM \        V4       Uu. uF	  pRV R2NK  	  ppTpVe   Wpn        Mh\        V4      R3\        V4      R3\        V4      R3R.V n        \        V^,
          RR4       F$  pV P
                  P                  RV R2R34       K&  	  \        \        V P
                  ^RR	7      4      V n	        Ve&   \        P                  ! V4      V P                  n        \        P                  ! \        P                  ! 4       \        P                   ! RR
RR7      .4      V P                  n        \$        P                   ! RR
RR7      V P                  n        \(        P*                  ! RRVRVRVRVRV/V	B  \,        P.                  ! RR.. RORV P0                  3.R7      V P                  n        R # u up
i u upi u upi )Nz
<extra_id_Ú>zBoth extra_ids (z!) and additional_special_tokens (zm) are provided to LasrTokenizer. In this case the additional_special_tokens must include the extra_ids tokensç        õ   â–�F)Úunk_idÚbyte_fallbackÚalwaysT)ÚreplacementÚprepend_schemeÚsplitÚ	eos_tokenÚ	unk_tokenÚ	pad_tokenÚ	extra_idsÚadditional_special_tokensú$Aú</s>)ÚsingleÚpairÚspecial_tokens)r+   g       Àéÿÿÿÿ© )r7   r8   z$Br8   )Ú
_extra_idsÚstrÚlenÚrangeÚ
ValueErrorÚ_vocab_scoresÚappendr   r
   Ú
_tokenizerr   ÚPrecompiledÚ
normalizerr   ÚSequenceÚWhitespaceSplitÚ	MetaspaceÚpre_tokenizerr   Údecoderr   Ú__init__r	   ÚTemplateProcessingÚeos_token_idÚpost_processor)Úselfr2   r3   r4   Ú_spm_precompiled_charsmapr5   r6   ÚvocabÚ
vocab_fileÚkwargsÚxÚextra_tokensÚis   &&&&&&&&&,   Úf/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/lasr/modular_lasr.pyrM   ÚLasrTokenizer.__init__1   s|  € ð $Œð %Ò0Ù'@Ó[Ñ'@ !ÀLÔTWÐXYÓTZÑDZŸA˜AÑ'@ˆLÐ[Ü�<Ó  1Ô$Ø)ÌÈyÔIYÓ-ZÑIYÀA°
¸1¸#¸QÓ.?ÑIYÑ-ZÕZÑ)Ø˜Q” 9´°LÓ0AÔ#AÜ Ø& y kÐ1RÐSlÐRmð nð óð øô 8=¸YÔ7GÓHÑ7G°!˜j¨¨¨1Ó-Ñ7GˆLÐHØ(4Ð%ð ÒØ!&Õô �Y“ Ð%Ü�Y“ Ð%Ü�Y“ Ð%Øð	"ˆDÔô ˜9 q�=¨"¨bÖ1�Ø×"Ñ"×)Ñ)¨Z¸°s¸!Ð+<¸cÐ*BÖCñ 2ä#ÜØ×"Ñ"ØØ#ôó
ˆŒð %Ò0Ü)4×)@Ò)@ÐAZÓ)[ˆD�O‰OÔ&ä(6×(?Ò(?ä×.Ò.Ó0Ü×(Ò(°UÈ8Ð[_Ô`ðó)
ˆ�‰Ô%ô #+×"4Ò"4ÀÐW_ÐgkÔ"lˆ�‰Ôä×"Ò"ñ 	
Øð	
àð	
ð  ð	
ð  ð		
ð
 '@ð	
ð ò	
ô *4×)FÒ)FØ˜&�>Ú-à˜×*Ñ*Ð+ðô*
ˆ�‰Ö&ùòk \ùâ-Zùò Is   �I¦IÁI
ÂIc          
      óf   <€ V ^8„  d   QhRS[ S[S[ ,          ,          RS[RS[R,          RS[RS[/# )é   Ú	token_idsÚskip_special_tokensÚclean_up_tokenization_spacesNÚgroup_tokensÚreturn)ÚintÚlistÚboolr?   )ÚformatÚ__classdict__s   "€rY   Ú__annotate__ÚLasrTokenizer.__annotate__~   sI   ø€ ÷ 
ñ 
á™™c�•?ð
ñ "ð
ñ '+¨T¥kð	
ñ
 ð
ñ 
ñ
ó    c           	     ó.  € \        V\        4      '       d   V.pV'       d,   \        P                  ! V4       Uu. uF  qf^ ,          NK  	  ppV Uu. uF  qwV P                  8w  g   K  VNK  	  pp\
        P                  ! V 3RVRVRV/VB # u upi u upi )r   r]   r^   r_   )Ú
isinstancerb   Ú	itertoolsÚgroupbyÚpad_token_idr   Ú_decode)rQ   r]   r^   r_   r`   rU   Útoken_groupÚtokens   &&&&&,  rY   ro   ÚLasrTokenizer._decode~   s¬   € ô �i¤×%Ò%Ø"˜ˆIßÜ;D×;LÒ;LÈYÔ;WÓXÑ;W¨K QŸ˜Ñ;WˆIÐXñ )2ÓP©	˜u¸d×>OÑ>OÑ5O—U�U©	ˆ	ÐPä ×(Ò(Øñ
àð
ð !4ð
ð *Fð	
ð
 ñ
ð 	
ùò Yùò Qs   ºBÁBÁ(B)r>   rE   rC   )r8   z<unk>z<pad>Néd   NNN)FNT)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__rM   ro   Ú__static_attributes__Ú__classdictcell__©rf   s   @rY   r'   r'   0   s   ø‡ € ôK
÷Z
÷ 
ð 
ri   r'   c            	       óB   € ] tR t^—tRRRRRRR/RRRR	R
RR/RRR//tRtR# )ÚLasrProcessorKwargsÚaudio_kwargsÚsampling_ratei€>  ÚpaddingÚlongestÚreturn_attention_maskTÚtext_kwargsÚpadding_sideÚrightÚadd_special_tokensFÚcommon_kwargsÚreturn_tensorsÚptr=   N)rt   ru   rv   rw   Ú	_defaultsrx   r=   ri   rY   r|   r|   —   sF   † àØ˜UØ�yØ# Tð
ð
 	Ø�tØ˜GØ  %ð
ð
 	Ð*¨DÐ1ð„Iri   r|   F)Útotalc                   ól   a a€ ] tR t^§t o]tV 3R lt]RV3R lV 3R lll4       t]	R 4       t
RtVtV ;t# )ÚLasrProcessorc                ó&   <€ \         SV `  W4       R # ©N)ÚsuperrM   )rQ   Úfeature_extractorÚ	tokenizerÚ	__class__s   &&&€rY   rM   ÚLasrProcessor.__init__«   s   ø€ Ü‰ÑÐ*Ö6ri   c          	      ó®   <€ V ^8„  d   QhRS[ RS[S[,          S[S[,          ,          S[S[,          ,          R,          RS[R,          RS[S[,          /# )r\   ÚaudioÚtextNr~   rU   )r   r   r   rc   rb   r   r|   )re   rf   s   "€rY   rg   ÚLasrProcessor.__annotate__¯   s]   ø€ ÷ !ñ !áð!ñ Ñ+Õ+©d±9­oÕ=ÁÑEVÕ@WÕWÐZ^Õ^ð!ñ ˜T•zð	!ñ
 Ñ,Õ-ñ!ri   c                óž  <€ V P                   ! \        3RV P                  P                  /VB pVf)   \        P                  RVR,          R,           R24       M4W5R,          R,          8w  d!   \        RV RVR,          R,           R	24      h\        SV `   ! RR
VRV/VB pVe'   VP                  R4      VR&   VP                  RR4       V# )aš  
sampling_rate (`int`, *optional*):
    The sampling rate of the input audio in Hz. This should match the sampling rate expected by the feature
    extractor (defaults to 16000 Hz). If provided, it will be validated against the processor's expected
    sampling rate, and an error will be raised if they don't match. If not provided, a warning will be
    issued and the default sampling rate will be assumed.
Útokenizer_init_kwargsNzUYou've provided audio without specifying the sampling rate. It will be assumed to be r}   r~   z$, which can result in silent errors.z The sampling rate of the audio (z5) does not match the sampling rate of the processor (zD). Please provide resampled the audio to the expected sampling rate.r•   r–   Ú	input_idsÚlabelsÚattention_maskr=   )
Ú_merge_kwargsr|   r‘   Úinit_kwargsÚloggerÚwarning_oncerB   r�   Ú__call__Úpop)rQ   r•   r–   r~   rU   Úoutput_kwargsÚmodel_inputsr’   s   &&&&,  €rY   r¡   ÚLasrProcessor.__call__®   s0  ø€ ð ×*Ò*Üñ
à"&§.¡.×"<Ñ"<ð
ð ñ
ˆð Ò Ü×ÑØgÐhuð  wEõ  iFð  GVõ  iWð  hXð  X|ð  }õð ¨NÕ;¸OÕLÔLÜØ2°=°/ÐAvð  xEð  FTõ  xUð  Veõ  xfð  wgð  gkð  lóð ô ‘wÒ'ÑP¨eÐP¸$ÐPÀ-ÑPˆØÒØ%1×%5Ñ%5°kÓ%BˆL˜Ñ"Ø×ÑÐ-¨tÔ4ØÐri   c                óB   € V P                   P                  pVR .,           # )r›   )r�   Úmodel_input_names)rQ   Úfeature_extractor_input_namess   & rY   r§   ÚLasrProcessor.model_input_namesÒ   s!   € à(,×(>Ñ(>×(PÑ(PÐ%Ø,°¨zÕ9Ð9ri   r=   ©NN)rt   ru   rv   rw   r|   Úvalid_processor_kwargsrM   r   r¡   Úpropertyr§   rx   ry   Ú__classcell__©r’   rf   s   @@rY   rŒ   rŒ   §   sC   ù‡ € à0Ðõ7ð ÷!ô !ó ð!ðF ñ:ó ÷:ð :ri   rŒ   zgoogle/medasr)Ú
checkpointc                   ó„   a € ] tR t^Øt o RtRt^tRtRtRt	^ t
^t^€tRtRtRtRtRtRt]! 4       t]! 4       tV 3R	 ltR
tV tR# )ÚLasrEncoderConfiga   
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).
é   i   Fi'  g�íµ ÷Æ°>g{®Gáz„?Nc                ó8  <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R	&   S[;R
&   S[S[,          S[S[R3,          ,          ;R&   S[S[,          S[S[R3,          ,          ;R&   S[;R&   S[R,          ;R&   # )r\   Úhidden_sizeÚnum_hidden_layersÚintermediate_sizeÚattention_biasÚconvolution_biasÚconv_kernel_sizeÚsubsampling_conv_kernel_sizeÚnum_mel_binsÚmax_position_embeddingsÚlayer_norm_eps.Úfeed_forward_residual_weightsÚconv_residual_weightsÚbatch_norm_momentumNÚrope_parameters)rb   rd   Úfloatrc   ÚtupleÚdict)re   rf   s   "€rY   rg   ÚLasrEncoderConfig.__annotate__Ø   sÿ   ø‡ ‚ ñR ÑñS ñT ÑñU ñV Ñ!ñW ñX Ñ ñY ñZ Ñ"ñ[ ñ\ Ññ] ñ^ #&Ñ)ñ_ ñ` Ñña ñb !Ñ(ñc ñd Ñ ñe ñf $(©¥;±±u¸c°zÕ1BÕ#BÑOñg ñh  ¡�;©©u°c¨zÕ):Õ:ÑGñi ñj Ñ%ñk ñl ˜D•[Ñ'òm ri   r=   )g      ø?g      à?)g       @g      ð?)rt   ru   rv   rw   Ú__doc__r´   rµ   r¶   r·   r¸   r¹   rº   r»   r¼   r½   r¾   r¿   rÀ   rÁ   ÚAttributeErrorÚsubsampling_factorÚscale_inputÚ__annotate_func__rx   ry   rz   s   @rY   r±   r±   Ø   su   ø‡ € ñ$ðL €KØÐØ!ÐØ €NØ"ÐØÐØ()Ð Ø€LØ#(ÐØ €NØEOÐ!Ø=GÐØ!%ÐØ#'€Oá'Ó)ÐÙ Ó"€K÷s ƒ ri   r±   c                   óH   a € ] tR tRt o RtRt^ t]R 4       tV 3R lt	Rt
V tR# )ÚLasrCTCConfigi  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).
r²   c                ó<   € V P                   P                  ^,          # ©r\   )Úencoder_configÚsubsampling_conv_stride)rQ   s   &rY   Úinputs_to_logits_ratioÚ$LasrCTCConfig.inputs_to_logits_ratio1  s   € à×"Ñ"×:Ñ:¸AÕ=Ð=ri   c                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   # )r\   Ú
vocab_sizern   )rb   )re   rf   s   "€rY   rg   ÚLasrCTCConfig.__annotate__  s   ø‡ ‚ ñ4 Ññ5 ñ6 Ñò7 ri   r=   N)rt   ru   rv   rw   rÆ   rÔ   rn   r¬   rÑ   rÊ   rx   ry   rz   s   @rY   rÌ   rÌ     s/   ø‡ € ñð. €JØ€Làñ>ó ð>÷= ƒ ri   rÌ   c                   óP   a a€ ] tR tRt oV3R lV 3R lltV3R lR ltRtVtV ;t# )ÚLasrEncoderSubsamplingi6  c                ó    <€ V ^8„  d   QhRS[ /# ©r\   Úconfig©r±   )re   rf   s   "€rY   rg   Ú#LasrEncoderSubsampling.__annotate__7  s   ø€ ÷  ñ  Ñ0ñ  ri   c                ó4  <€ \         SV `  4        \        P                  ! VP                  VP
                  4      V n        \        P                  ! VP
                  VP
                  VP                  VP                  R 7      V n
        \        P                  ! VP
                  VP                  VP                  VP                  R 7      V n        \        P                  ! VP                  VP
                  4      V n        \        P                  ! 4       V n        R# ))Úkernel_sizeÚstrideN)r�   rM   r   ÚLinearr»   r´   Údense_0ÚConv1drº   rÐ   Úconv_0Úsubsampling_conv_channelsÚconv_1Údense_1ÚReLUÚact_fn)rQ   rÚ   r’   s   &&€rY   rM   ÚLasrEncoderSubsampling.__init__7  sÃ   ø€ Ü‰ÑÔÜ—y’y ×!4Ñ!4°f×6HÑ6HÓIˆŒÜ—i’iØ×ÑØ×ÑØ×;Ñ;Ø×1Ñ1ô	
ˆŒô —i’iØ×ÑØ×,Ñ,Ø×;Ñ;Ø×1Ñ1ô	
ˆŒô —y’y ×!AÑ!AÀ6×CUÑCUÓVˆŒÜ—g’g“iˆŽri   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# )r\   Úinput_featuresra   ©ÚtorchÚTensor)re   rf   s   "€rY   rg   rÜ   I  s#   ø€ ÷ +ñ +¡e§l¡lð +±u·|±|ñ +ri   c                ó,  € V P                  V P                  V4      4      pVP                  ^^4      pV P                  V P                  V4      4      pV P                  V P	                  V4      4      pVP                  ^^4      pV P                  V4      # )é   )rè   rá   Ú	transposerã   rå   ræ   )rQ   rë   Úhidden_statess   && rY   ÚforwardÚLasrEncoderSubsampling.forwardI  sz   € ØŸ™ D§L¡L°Ó$@ÓAˆØ%×/Ñ/°°1Ó5ˆØŸ™ D§K¡K°Ó$>Ó?ˆØŸ™ D§K¡K°Ó$>Ó?ˆØ%×/Ñ/°°1Ó5ˆØ�|‰|˜MÓ*Ð*ri   )rè   rã   rå   rá   ræ   ©	rt   ru   rv   rw   rM   ró   rx   ry   r­   r®   s   @@rY   r×   r×   6  s   ù‡ € ÷ ó  ÷$+÷ +ð +ri   r×   c                   ó   € ] tR tRtRtR# )ÚLasrEncoderRotaryEmbeddingiR  r=   N©rt   ru   rv   rw   rx   r=   ri   rY   r÷   r÷   R  s   † »ri   r÷   c                   óT   a a€ ] tR tRt oV3R lV 3R lltRV3R lR lltRtVtV ;t# )ÚLasrEncoderAttentioniU  c                ó&   <€ V ^8„  d   QhRS[ RS[/# ©r\   rÚ   Ú	layer_idx©r±   rb   )re   rf   s   "€rY   rg   Ú!LasrEncoderAttention.__annotate__V  s   ø€ ÷ ñ Ñ0ð ¹Sñ ri   c                ó4   <€ \         SV `  W4       R V n        R# )FN)r�   rM   Ú	is_causal©rQ   rÚ   rý   r’   s   &&&€rY   rM   ÚLasrEncoderAttention.__init__V  s   ø€ Ü‰Ñ˜Ô+ØˆŽri   c                ó  <€ V ^8„  d   QhRS[ P                  RS[S[ P                  S[ P                  3,          R,          RS[ P                  R,          RS[S[,          RS[S[ P                  S[ P                  3,          /# )r\   rò   Úposition_embeddingsNrœ   rU   ra   )rí   rî   rÃ   r   r   )re   rf   s   "€rY   rg   rÿ   Z  sy   ø€ ÷ ")ñ ")á—|‘|ð")ñ #¡5§<¡<±·±Ð#=Õ>ÀÕEð")ñ Ÿ™ tÕ+ð	")ñ
 Ñ+Õ,ð")ñ 
‰u�|‰|™UŸ\™\Ð)Õ	*ñ")ri   c                óÌ  € VP                   R R p. VORNV P                  N5pV P                  V4      P                  V4      P	                  ^^4      pV P                  V4      P                  V4      P	                  ^^4      pV P                  V4      P                  V4      P	                  ^^4      p	Vw  r«\        WxW«4      w  rx\        P                  ! V P                  P                  \        4      pT! V VVV	V3RV P                  '       g   RMV P                  RV P                  /VB w  rÞVP                   ! . VORN5!  P#                  4       pV P%                  V4      pWÞ3# )NÚdropoutr*   Úscalingr<   )ÚshapeÚhead_dimÚq_projÚviewrñ   Úk_projÚv_projr   r   Úget_interfacerÚ   Ú_attn_implementationr   ÚtrainingÚattention_dropoutr  ÚreshapeÚ
contiguousÚo_proj)rQ   rò   r  rœ   rU   Úinput_shapeÚhidden_shapeÚquery_statesÚ
key_statesÚvalue_statesÚcosÚsinÚattention_interfaceÚattn_outputÚattn_weightss   &&&&,          rY   ró   ÚLasrEncoderAttention.forwardZ  se  € ð $×)Ñ)¨#¨2Ð.ˆØ8˜Ð8 bÐ8¨$¯-©-Ñ8ˆà—{‘{ =Ó1×6Ñ6°|ÓD×NÑNÈqÐRSÓTˆØ—[‘[ Ó/×4Ñ4°\ÓB×LÑLÈQÐPQÓRˆ
Ø—{‘{ =Ó1×6Ñ6°|ÓD×NÑNÈqÐRSÓTˆà&‰ˆÜ#7¸ÐRUÓ#[Ñ ˆä(?×(MÒ(MØ�K‰K×,Ñ,Ô.Eó)
Ðñ %8ØØØØØñ	%
ð  $Ÿ}Ÿ}˜}‘C°$×2HÑ2Hð	%
ð —L‘Lð	%
ð ñ	%
Ñ!ˆð "×)Ò)Ð;¨;Ð;¸Ó;×FÑFÓHˆØ—k‘k +Ó.ˆØÐ(Ð(ri   )r  rª   rõ   r®   s   @@rY   rú   rú   U  s   ù‡ € ÷ó ÷")÷ ")ò ")ri   rú   c                   óB   a a€ ] tR tRt oRV3R lV 3R llltRtVtV ;t# )ÚLasrEncoderConvolutionModulei  c                ó    <€ V ^8„  d   QhRS[ /# rÙ   rÛ   )re   rf   s   "€rY   rg   Ú)LasrEncoderConvolutionModule.__annotate__€  s   ø€ ÷ \ñ \Ñ0ñ \ri   c                ó–   <€ \         SV `  W4       R V n        \        P                  ! VP
                  VP                  R7      V n        R# )Úsame)ÚmomentumN)r�   rM   r   r   ÚBatchNorm1dr´   rÀ   Únorm)rQ   rÚ   Úmodule_configr’   s   &&&€rY   rM   Ú%LasrEncoderConvolutionModule.__init__€  s5   ø€ Ü‰Ñ˜Ô/ØˆŒÜ—N’N 6×#5Ñ#5À×@ZÑ@ZÔ[ˆŽ	ri   )r)  r   rŽ   )rt   ru   rv   rw   rM   rx   ry   r­   r®   s   @@rY   r"  r"    s   ù‡ € ÷\÷ \õ \ri   r"  c                   óT   a a€ ] tR tRt oV3R lV 3R lltRV3R lR lltRtVtV ;t# )ÚLasrEncoderBlocki†  c                ó&   <€ V ^8„  d   QhRS[ RS[/# rü   rþ   )re   rf   s   "€rY   rg   ÚLasrEncoderBlock.__annotate__‡  s    ø€ ÷ 
\ñ 
\Ñ0ð 
\¹Sñ 
\ri   c                ó^  <€ \         SV `  W4       VP                  V n        VP                  V n        \        P
                  ! VP                  VP                  R R7      V n        \        P
                  ! VP                  VP                  R R7      V n	        \        P
                  ! VP                  VP                  R R7      V n
        \        P
                  ! VP                  VP                  R R7      V n        \        P
                  ! VP                  VP                  R R7      V n        R# )F)ÚbiasN)r�   rM   r¾   r¿   r   Ú	LayerNormr´   r½   Únorm_feed_forward1Únorm_self_attÚ	norm_convÚnorm_feed_forward2Únorm_outr  s   &&&€rY   rM   ÚLasrEncoderBlock.__init__‡  sÔ   ø€ Ü‰Ñ˜Ô+à-3×-QÑ-QˆÔ*Ø%+×%AÑ%AˆÔ"ä"$§,¢,¨v×/AÑ/AÀ6×CXÑCXÐ_dÔ"eˆÔÜŸ\š\¨&×*<Ñ*<¸f×>SÑ>SÐZ_Ô`ˆÔÜŸš f×&8Ñ&8¸&×:OÑ:OÐV[Ô\ˆŒÜ"$§,¢,¨v×/AÑ/AÀ6×CXÑCXÐ_dÔ"eˆÔÜŸš V×%7Ñ%7¸×9NÑ9NÐUZÔ[ˆŽri   c          
      ó´   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[ P                  R,          RS[S[,          RS[ P                  /# )r\   rò   rœ   Nr  rU   ra   )rí   rî   r   r   )re   rf   s   "€rY   rg   r/  “  s]   ø€ ÷ !ñ !á—|‘|ð!ñ Ÿ™ tÕ+ð!ñ #Ÿ\™\¨DÕ0ð	!ñ
 Ñ+Õ,ð!ñ 
�‰ñ!ri   c           	     ó°  € TpV P                  V P                  V4      4      pV P                  ^ ,          V,          V P                  ^,          V,          ,           pV P                  V4      pV P                  ! RRVRVRV/VB w  rxW,           pV P                  V P                  V4      VR7      p	V P                  ^ ,          V,          V P                  ^,          V	,          ,           pTpV P                  V P                  V4      4      pV P                  ^ ,          V,          V P                  ^,          V,          ,           pV P                  V4      pV# )r   rò   rœ   r  )rœ   r=   )Úfeed_forward1r3  r¾   r4  Ú	self_attnÚconvr5  r¿   Úfeed_forward2r6  r7  )
rQ   rò   rœ   r  rU   ÚresidualÚnormalized_hidden_statesr  Ú_Úconv_outputs
   &&&&,     rY   ró   ÚLasrEncoderBlock.forward“  sP  € ð !ˆØ×*Ñ*¨4×+BÑ+BÀ=Ó+QÓRˆà×.Ñ.¨qÕ1°HÕ<¸t×?aÑ?aÐbcÕ?dÐgtÕ?tÕtð 	ð $(×#5Ñ#5°mÓ#DÐ ØŸšñ 
Ø2ð
à)ð
ð !4ð
ð ñ	
‰ˆð &Õ3ˆà—i‘i §¡¨}Ó =Èn�iÓ]ˆØ×2Ñ2°1Õ5¸ÕEÈ×HbÑHbÐcdÕHeÐhsÕHsÕsˆà ˆØ×*Ñ*¨4×+BÑ+BÀ=Ó+QÓRˆà×.Ñ.¨qÕ1°HÕ<¸t×?aÑ?aÐbcÕ?dÐgtÕ?tÕtð 	ð Ÿ™ mÓ4ˆàÐri   )r¿   r¾   r5  r3  r6  r7  r4  rª   rõ   r®   s   @@rY   r-  r-  †  s    ù‡ € ÷
\ó 
\÷!÷ !ò !ri   r-  c                   ó<   a € ] tR tRt o RtR tV 3R lR ltRtV tR# )ÚLasrPreTrainedModeli·  Fc                ó   € \        R 4      h)zNormal super call)rÇ   )rQ   Úmodules   &&rY   Ú_init_weightsÚ!LasrPreTrainedModel._init_weights»  s   € ÜÐ0Ó1Ð1ri   c                ó4   <€ V ^8„  d   QhRS[ P                  /# )r\   Úinput_lengthsrì   )re   rf   s   "€rY   rg   Ú LasrPreTrainedModel.__annotate__¾  s   ø€ ÷ 	ñ 	¹E¿L¹Lñ 	ri   c                ó  € \        V P                  \        4      '       d   V P                  P                  MV P                  pVP                  pVP
                  p^p\        V4       F  pW,
          V,          ^,           pK  	  V# rÎ   )rk   rÚ   rÌ   rÏ   rº   rÐ   rA   )rQ   rK  rÏ   rÞ   rß   Ú
num_layersrA  s   &&     rY   Ú_get_subsampling_output_lengthÚ2LasrPreTrainedModel._get_subsampling_output_length¾  sn   € Ü7AÀ$Ç+Á+Ì}×7]Ò7]˜Ÿ™×3Ò3Ðcg×cnÑcnˆØ$×AÑAˆØ×7Ñ7ˆàˆ
Ü�zÖ"ˆAØ*Õ8¸VÕCÀaÕGŠMñ #ð Ðri   r=   N)	rt   ru   rv   rw   Ú_supports_flex_attnrH  rO  rx   ry   rz   s   @rY   rE  rE  ·  s   ø‡ € àÐò2÷	ö 	ri   rE  c                   ó   € ] tR tRtRtR# )ÚLasrEncoderModelOutputiÊ  r=   Nrø   r=   ri   rY   rS  rS  Ê  s   † Ûri   rS  zh
    The LasrEncoder model, based on the Conformer architecture](https://arxiv.org/abs/2005.08100).
    )Úcustom_introc                   ó‚   a a€ ] tR tRt oRtV3R lV 3R llt]]]R	V3R lR ll4       4       4       t	V3R lt
RtVtV ;t# )
ÚLasrEncoderiÎ  Úencoderc                ó    <€ V ^8„  d   QhRS[ /# rÙ   rÛ   )re   rf   s   "€rY   rg   ÚLasrEncoder.__annotate__×  s   ø€ ÷ ñ Ñ0ñ ri   c           	     óö  <€ \         SV `  V4       R V n        VP                  V n        VP                  V n        VP
                  V n        \        V4      V n        \        V4      V n	        \        P                  ! \        VP                  4       Uu. uF  p\        W4      NK  	  up4      V n        \        P                   ! VP"                  VP$                  R R7      V n        V P)                  4        R# u upi )F)Úepsr1  N)r�   rM   Úgradient_checkpointingr  Údropout_positionsÚ	layerdropr×   Ú
subsamplerr÷   Ú
rotary_embr   Ú
ModuleListrA   rµ   r-  Úlayersr2  r´   r½   Úout_normÚ	post_initr  s   && €rY   rM   ÚLasrEncoder.__init__×  s¾   ø€ Ü‰Ñ˜Ô Ø&+ˆÔ#à—~‘~ˆŒØ!'×!9Ñ!9ˆÔØ×)Ñ)ˆŒä0°Ó8ˆŒÜ4°VÓ<ˆŒÜ—m’mÜBGÈ×H`ÑH`ÔBaÓbÑBa°YÔ˜fÖ0ÑBaÑbó
ˆŒô Ÿš V×%7Ñ%7¸V×=RÑ=RÐY^Ô_ˆŒà�‰Öùò	 cs   ÂC6c          
      óŒ   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[R,          RS[S[,          RS[/# )r\   rë   rœ   NÚoutput_attention_maskrU   ra   )rí   rî   rd   r   r   rS  )re   rf   s   "€rY   rg   rY  ë  s[   ø€ ÷ H
ñ H
áŸ™ðH
ñ Ÿ™ tÕ+ðH
ñ  $ d�{ð	H
ñ
 Ñ+Õ,ðH
ñ 
 ñH
ri   c           	     óÜ  € V P                  V4      pV P                  V\        P                  ! VP                  ^,          VP
                  R7      P                  ^ 4      4      w  rg\        P                  P                  WPP                  V P                  R7      p\        P                  P                  W`P                  V P                  R7      p\        P                  P                  WpP                  V P                  R7      pRpVe&   V P                  W%P                  ^,          R7      pTp\        V P                  VVR7      pV P                   FW  p	Rp
V P                  '       d)   \        P                   ! . 4      pW°P"                  8  d   Rp
V
'       d   KI  V	! V3RVR	Wg3/VB pKY  	  V P%                  V4      p\'        TV'       d   Ve   VP)                  4       R
7      # RR
7      # )a»  
output_attention_mask (`bool`, *optional*):
    Whether to return the output attention mask.

Example:

```python
>>> from transformers import AutoProcessor, LasrEncoder
>>> from datasets import load_dataset, Audio

>>> model_id = "google/medasr"
>>> processor = AutoProcessor.from_pretrained(model_id)
>>> encoder = ParakeetEncoder.from_pretrained(model_id)

>>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
>>> ds = ds.cast_column("audio", Audio(sampling_rate=processor.feature_extractor.sampling_rate))

>>> inputs = processor(ds[0]["audio"]["array"])
>>> encoder_outputs = encoder(**inputs)

>>> print(encoder_outputs.last_hidden_state.shape)
```
)Údevice)Úpr  N)Útarget_length)rÚ   Úinputs_embedsrœ   FTrœ   r  )Úlast_hidden_staterœ   )r_  r`  rí   Úaranger	  ri  Ú	unsqueezer   Ú
functionalr  r  r]  Ú_get_output_attention_maskr   rÚ   rb  Úrandr^  rc  rS  rb   )rQ   rë   rœ   rg  rU   rò   r  r  Úoutput_maskÚencoder_layerÚto_dropÚdropout_probabilitys   &&&&,       rY   ró   ÚLasrEncoder.forwardè  s«  € ðD Ÿ™¨Ó7ˆØ—?‘?Øœ5Ÿ<š<¨×(;Ñ(;¸AÕ(>À}×G[ÑG[Ô\×fÑfÐghÓió
‰ˆô Ÿ™×-Ñ-¨m¿|¹|ÐVZ×VcÑVcÐ-ÓdˆÜ�m‰m×#Ñ# C×+AÑ+AÈDÏMÉMÐ#ÓZˆÜ�m‰m×#Ñ# C×+AÑ+AÈDÏMÉMÐ#ÓZˆàˆØÒ%Ø×9Ñ9¸.×XkÑXkÐlmÕXnÐ9ÓoˆKØ(ˆNä2Ø—;‘;Ø'Ø)ô
ˆð "Ÿ[œ[ˆMàˆGØ�}�}ˆ}Ü&+§j¢j°£nÐ#Ø&¯©Ô7Ø"�Gç‘7Ù -Ø!ñ!à#1ð!ð *-¨
ð!ð ñ	!’ñ )ð  Ÿ™ mÓ4ˆä%Ø+ß0EÈ+ÒJa˜;Ÿ?™?Ó,ô
ð 	
àgkô
ð 	
ri   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # rÙ   rÛ   )re   rf   s   "€rY   rg   rY  Î  s   ø‡ ‚ ñ Ñò ri   )r  r]  r\  r^  rb  rc  r`  r_  rª   )rt   ru   rv   rw   Úbase_model_prefixrM   r   r   r   ró   rÊ   rx   ry   r­   r®   s   @@rY   rV  rV  Î  sJ   ù‡ € ð "Ð÷ó ð" ØØ÷H
ñ H
ó ó  ó ðH
÷; … ri   rV  c                   ó2   a a€ ] tR tRt oV 3R ltRtVtV ;t# )Ú
LasrForCTCi6  c                 ó8   <€ \        4       P                  ! R/ V B # )a¨  
Example:

```python
>>> from transformers import AutoProcessor, LasrForCTC
>>> from datasets import load_dataset, Audio

>>> model_id = "google/medasr"
>>> processor = AutoProcessor.from_pretrained(model_id)
>>> model = LasrForCTC.from_pretrained(model_id)

>>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
>>> ds = ds.cast_column("audio", Audio(sampling_rate=processor.feature_extractor.sampling_rate))

>>> inputs = processor(ds[0]["audio"]["array"], text=ds[0]["text"])
>>> predicted_ids = model.generate(**inputs)
>>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)

>>> print(transcription)
```
r=   )r�   Úgenerate)Úsuper_kwargsr’   s   ,€rY   r}  ÚLasrForCTC.generate7  s   ø€ ô, ‹w×ÒÑ/ ,Ñ/Ð/ri   r=   )rt   ru   rv   rw   r}  rx   ry   r­   r®   s   @@rY   r{  r{  6  s   ù‡ € ÷0õ 0ri   r{  )r{  rV  rE  rŒ   r±   rÌ   r'   )Irl   Úcollections.abcr   rí   Úhuggingface_hub.dataclassesr   Ú
tokenizersr   r   r   r   r	   Útokenizers.modelsr
   r   Úaudio_utilsr   Úmasking_utilsr   Úmodeling_utilsr   Úprocessing_utilsr   r   r   Útokenization_utils_baser   r   Útokenization_utils_tokenizersr   Úutilsr   r   r   Úutils.genericr   Úutils.output_capturingr   Úllama.modeling_llamar   r   r   r   Úparakeet.configuration_parakeetr   r   Úparakeet.modeling_parakeetr    r!   r"   r#   r$   Út5.tokenization_t5r%   Ú
get_loggerrt   rŸ   r'   r|   rŒ   r±   rÌ   ÚModuler×   r÷   rú   r"  r-  rE  rS  rV  r{  Ú__all__r=   ri   rY   Ú<module>r”     s—  ðó Ý $ã Ý .ß SÕ SÝ %Ý å %Ý 6Ý 5ß HÑ Hß CÝ >ß @Ñ @Ý 7Ý 5ß vÓ vß V÷õ õ -ð 
×	Ò	˜HÓ	%€ôd
�KÐ!2ô d
ôNÐ*°%õ ð  ô-:�Nó -:ó ð-:ñ` ˜?Ô+Øô7#Ð-ó 7#ó ó ,ð7#ñt ˜?Ô+Øô>Ð%ó >ó ó ,ð>ô@+˜RŸY™Yô +ô8 <Ð!5Ô ;ô')˜>ô ')ôT\Ð#Cô \ô.Ð+ô .ôbÐ1ô ô&	Ð7ô 	ñ ðôô
`
Ð%ó `
óð
`
ôF0�ô 0ò4‚ri   