+
    œ°³j‘a ã                   ó&  € R t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIt^ RI	H
t
 ^ RI	Ht ^RIHt ^RIHt ^RIHtHt ^R	I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$H%t% ^RI&H't' ^RI(H)t)H*t*H+t+ ^RI,H-t- ^RI.H/t/ ^RI0H1t1 ^RI2H3t3H4t4 ]+Pj                  ! ]64      t7]*! RR7      ] ! R R]4      4       4       t8]*! RR7      ] ! R R]4      4       4       t9]*! RR7      ] ! R R]4      4       4       t:]*] ! R R ]4      4       4       t; ! R! R"]
Px                  4      t= ! R# R$]
Px                  4      t> ! R% R&]
Px                  4      t? ! R' R(]
Px                  4      t@R) tARAR* ltB ! R+ R,]
Px                  4      tCR- R. ltDRBR/ R0 lltE ! R1 R2]
Px                  4      tF ! R3 R4]4      tG]* ! R5 R6]%4      4       tH ! R7 R8]H]4      tI]* ! R9 R:]H4      4       tJ]*! R;R7       ! R< R=]H]4      4       tK]*! R>R7       ! R? R@]H]4      4       tL. RCOtMR# )DzPyTorch Moshi model.N)ÚCallable)Ú	dataclass)ÚAny)ÚCrossEntropyLoss)Úinitialization)ÚACT2FN)ÚCacheÚDynamicCache)ÚGenerationConfigÚGenerationMixin)Úcreate_causal_mask)ÚGradientCheckpointingLayer)ÚBaseModelOutputWithPastÚCausalLMOutputWithPastÚModelOutputÚSeq2SeqLMOutput)ÚROPE_INIT_FUNCTIONSÚdynamic_rope_update)ÚALL_ATTENTION_FUNCTIONSÚPreTrainedModel)ÚUnpack)ÚTransformersKwargsÚauto_docstringÚlogging)Údeprecate_kwarg)Úmaybe_autocast)Ú	AutoModel)ÚMoshiConfigÚMoshiDepthConfigzK
    Outputs of [`MoshiForConditionalConditionalGeneration.generate`].
    )Úcustom_introc                   óX   a € ] tR t^-t o RtRtRtRtRtRt	Rt
RtRtRtRtV 3R ltRtV tR# )Ú(MoshiConditionalGenerationGenerateOutputab  
audio_sequences (`torch.LongTensor` of shape `(batch_size*num_return_sequences, 1, sequence_length)`, *optional*):
    The generated audio waveforms.
sequences (`torch.LongTensor` of shape `(batch_size*num_return_sequences, sequence_length)`):
    The generated text sequences. The second dimension (sequence_length) is either equal to `max_length` or shorter
    if all batches finished early due to the `eos_token_id`.
sequences_scores (`torch.FloatTensor` of shape `(batch_size*num_return_sequences)`, *optional*, returned when `output_scores=True`):
    Final beam scores of the generated `sequences`.
scores (`tuple(torch.FloatTensor)` *optional*, returned when `output_scores=True`):
    Beam transition scores for each vocabulary token at each generation step. Beam transition scores consisting
    of log probabilities of tokens conditioned on log softmax of previously generated tokens in this beam.
    Tuple of `torch.FloatTensor` with up to `max_new_tokens` elements (one element for each generated token),
    with each tensor of shape `(batch_size*num_beams, config.vocab_size)`.
logits (`tuple(torch.FloatTensor)` *optional*, returned when `output_logits=True`):
    Unprocessed prediction scores of the language modeling head (scores for each vocabulary token before SoftMax)
    at each generation step. Tuple of `torch.FloatTensor` with up to `max_new_tokens` elements (one element for
    each generated token), with each tensor of shape `(batch_size, config.vocab_size)`.
beam_indices (`torch.LongTensor`, *optional*, returned when `output_scores=True`):
    Beam indices of generated token id at each generation step. `torch.LongTensor` of shape
    `(batch_size*num_return_sequences, sequence_length)`.
attentions (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `output_attentions=True`):
    Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
    `torch.FloatTensor` of shape `(batch_size*num_beams, num_heads, generated_length, sequence_length)`.
hidden_states (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `output_hidden_states=True`):
    Tuple (one element for each generated token) of tuples (one element for each layer of the decoder) of
    `torch.FloatTensor` of shape `(batch_size*num_beams*num_return_sequences, generated_length, hidden_size)`.
past_key_values (`Cache`, *optional*, returned when `use_cache=True`):
    Contains the model cache, used to speed up decoding. Different models have a different cache format, check
    the model's documentation. Usually, a [`~cache_utils.Cache`] instance.
audio_codes (`torch.LongTensor` of shape `(batch_size*num_return_sequences, num_codeooks, sequence_length)`, *optional*):
    The generated audio codes. Returned if `return_audio_codes=True`. Intermediate audio "tokens" which transforms to `audio_sequences` once passed through the audio decoder.
Nc                ó2  <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   S[S[ P                  ,          R,          ;R&   S[ P                  R,          ;R&   S[S[S[ P                  ,          ,          R,          ;R&   S[S[S[ P                  ,          ,          R,          ;R	&   S[R,          ;R
&   S[ P                  R,          ;R&   # )é   NÚaudio_sequencesÚ	sequencesÚsequences_scoresÚscoresÚlogitsÚbeam_indicesÚ
attentionsÚhidden_statesÚpast_key_valuesÚaudio_codes)ÚtorchÚTensorÚ
LongTensorÚFloatTensorÚtupler   )ÚformatÚ__classdict__s   "€Úi/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/moshi/modeling_moshi.pyÚ__annotate__Ú5MoshiConditionalGenerationGenerateOutput.__annotate__-   s  ø‡ ‚ ñP —\‘\ DÕ(Ñ/ñQ ñR ×Ñ $Õ&Ñ-ñS ñT ×'Ñ'¨$Õ.Ñ5ñU ñV ‘%×#Ñ#Õ$ tÕ+Ñ2ñW ñX ‘%×#Ñ#Õ$ tÕ+Ñ2ñY ñZ ×"Ñ" TÕ)Ñ0ñ[ ñ\ ‘e™E×-Ñ-Õ.Õ/°$Õ6Ñ=ñ] ñ^ ™™u×0Ñ0Õ1Õ2°TÕ9Ñ@ñ_ ñ` ˜T•\Ñ(ña ñb ×!Ñ! DÕ(Ñ/òc ó    © )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r4   s   @r5   r!   r!   -   sH   ø‡ € ñðB ,0€OØ)-€IØ15ÐØ.2€FØ.2€FØ,0€LØ9=€JØ<@€MØ$(€OØ+/€K÷c ƒ r8   r!   z%
    `MoshiForCausalLM` outputs.
    c                   óH   a € ] tR t^at o RtRtRtRtRtRt	Rt
V 3R ltRtV tR# )ÚMoshiCausalLMOutputWithPasta  
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
    Language modeling loss (for next-token prediction).
logits (`torch.FloatTensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
    Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
past_key_values (`Cache`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
    It is a [`~cache_utils.Cache`] instance. For more details, see our [kv cache guide](https://huggingface.co/docs/transformers/en/kv_cache).

    Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
    `past_key_values` input) to speed up sequential decoding.
Nc                óB  <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[R,          ;R&   S[S[ P                  R3,          R,          ;R&   S[S[ P                  R3,          R,          ;R&   # )	r#   NÚlossr(   Úlast_hidden_stater,   .r+   r*   ©r.   r1   r   r2   )r3   r4   s   "€r5   r6   Ú(MoshiCausalLMOutputWithPast.__annotate__a   s¢   ø‡ ‚ ñ& ×
Ñ
˜dÕ
"Ñ)ñ' ñ( ×Ñ Õ$Ñ+ñ) ñ* ×(Ñ(¨4Õ/Ñ6ñ+ ñ, ˜T•\Ñ(ñ- ñ. ™×*Ñ*¨CÐ/Õ0°4Õ7Ñ>ñ/ ñ0 ‘e×'Ñ'¨Ð,Õ-°Õ4Ñ;ò1 r8   r9   )r:   r;   r<   r=   r>   rF   r(   rG   r,   r+   r*   r?   r@   rA   rB   s   @r5   rD   rD   a   s2   ø‡ € ñ
ð &*€DØ'+€FØ26ÐØ$(€OØ:>€MØ7;€J÷1 ƒ r8   rD   z2
    `MoshiForConditionalGeneration` outputs.
    c                   ó\   a € ] tR t^|t o RtRtRtRtRtRt	Rt
RtRtRtRtRtV 3R ltRtV tR# )Ú(MoshiConditionalGenerationOutputWithPasta×  
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `text_labels` is provided):
    Text language modeling loss (for next-token prediction).
logits (`torch.FloatTensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
    Prediction scores of the text language modeling head (scores for each vocabulary token before SoftMax).
past_key_values (`Cache`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
    It is a [`~cache_utils.Cache`] instance. For more details, see our [kv cache guide](https://huggingface.co/docs/transformers/en/kv_cache).

    Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
    `past_key_values` input) to speed up sequential decoding.
depth_loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `audio_labels` is provided):
    Audio language modeling loss (for next-token prediction).
audio_logits (`torch.FloatTensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
    Prediction scores of the audio language modeling heads.
depth_past_key_values (`Cache`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
    Past key-values of the depth decoder.
depth_hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
    Hidden states of the depth decoder
depth_attentions (`tuple(torch.FloatTensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
    Depth decoder's Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
    heads.
Nc                ó<  <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[R,          ;R&   S[S[ P                  R3,          R,          ;R&   S[S[ P                  R3,          R,          ;R&   S[ P                  R,          ;R	&   S[ P                  R,          ;R
&   S[R,          ;R&   S[S[ P                  R3,          R,          ;R&   S[S[ P                  R3,          R,          ;R&   # )r#   NrF   r(   rG   r,   .r+   r*   Ú
depth_lossÚaudio_logitsÚdepth_past_key_valuesÚdepth_hidden_statesÚdepth_attentionsrH   )r3   r4   s   "€r5   r6   Ú5MoshiConditionalGenerationOutputWithPast.__annotate__|   s9  ø‡ ‚ ñ< ×
Ñ
˜dÕ
"Ñ)ñ= ñ> ×Ñ Õ$Ñ+ñ? ñ@ ×(Ñ(¨4Õ/Ñ6ñA ñB ˜T•\Ñ(ñC ñD ™×*Ñ*¨CÐ/Õ0°4Õ7Ñ>ñE ñF ‘e×'Ñ'¨Ð,Õ-°Õ4Ñ;ñG ñH ×!Ñ! DÕ(Ñ/ñI ñJ ×#Ñ# dÕ*Ñ1ñK ñL ! 4�<Ñ.ñM ñN ™u×0Ñ0°#Ð5Õ6¸Õ=ÑDñO ñP ™E×-Ñ-¨sÐ2Õ3°dÕ:ÑAòQ r8   r9   )r:   r;   r<   r=   r>   rF   r(   rG   r,   r+   r*   rM   rN   rO   rP   rQ   r?   r@   rA   rB   s   @r5   rK   rK   |   sO   ø‡ € ñð. &*€DØ'+€FØ26ÐØ$(€OØ:>€MØ7;€JØ+/€JØ-1€LØ*.ÐØ@DÐØ=AÐ÷Q ƒ r8   rK   c                   ó@   a € ] tR t^§t o RtRtRtRtRtV 3R lt	Rt
V tR# )ÚMoshiUnconditionalInputa  
input_ids (`torch.Tensor `of shape `(batch_size, sequence_length), *optional*):
    The sequence used as a text prompt for the generation.
user_audio_codes (`torch.Tensor `of shape `(batch_size, num_codebooks, sequence_length), *optional*):
    The audio codes used as audio user prompt for the generation. Has priority over `user_input_values` and represents the audio "tokens" of `user_input_values` once passed through the audio encoder.
moshi_audio_codes (`torch.Tensor `of shape `(batch_size, num_codebooks, sequence_length), *optional*):
    The audio codes used as audio Moshi prompt for the generation. Has priority over `moshi_input_values` and represents the audio "tokens" of `moshi_input_values` once passed through the audio encoder.
attention_mask (`torch.LongTensor`)  of shape `(batch_size, sequence_length)`, *optional*):
    Attention mask to avoid performing attention on padding token indices. Mask values selected in `[0,
    1]`: 1 for tokens that are **not masked**, 0 for tokens that are **masked**.
Nc                óÒ   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   # )r#   NÚ	input_idsÚuser_audio_codesÚmoshi_audio_codesÚattention_mask)r.   r0   r/   )r3   r4   s   "€r5   r6   Ú$MoshiUnconditionalInput.__annotate__§   sa   ø‡ ‚ ñ ×Ñ $Õ&Ñ-ñ ñ  —l‘l TÕ)Ñ0ñ! ñ" —|‘| dÕ*Ñ1ñ# ñ$ ×$Ñ$ tÕ+Ñ2ò% r8   r9   )r:   r;   r<   r=   r>   rV   rW   rX   rY   r?   r@   rA   rB   s   @r5   rT   rT   §   s)   ø‡ € ñ
ð *.€IØ,0ÐØ-1ÐØ.2€N÷% ƒ r8   rT   c                   óT   a a€ ] tR t^½t oRV3R lV 3R llltR tR tR tRtVt	V ;t
# )ÚMoshiRMSNormc                ó&   <€ V ^8„  d   QhRS[ RS[/# )r#   ÚdimÚeps)ÚintÚfloat)r3   r4   s   "€r5   r6   ÚMoshiRMSNorm.__annotate__¾   s   ø€ ÷ 4ñ 4™Cð 4¡eñ 4r8   c                óŽ   <€ \         SV `  4        W n        \        P                  ! \
        P                  ! V4      4      V n        R # ©N)ÚsuperÚ__init__r_   ÚnnÚ	Parameterr.   ÚonesÚweight)Úselfr^   r_   Ú	__class__s   &&&€r5   rf   ÚMoshiRMSNorm.__init__¾   s+   ø€ Ü‰ÑÔØŒÜ—l’l¤5§:¢:¨c£?Ó3ˆŽr8   c                óž   € V\         P                  ! VP                  ^4      P                  RRR7      V P                  ,           4      ,          # )r#   T)Úkeepdiméÿÿÿÿ)r.   ÚrsqrtÚpowÚmeanr_   )rk   Úxs   &&r5   Ú_normÚMoshiRMSNorm._normÃ   s4   € Ø”5—;’;˜qŸu™u Q›xŸ}™}¨R¸˜}Ó>ÀÇÁÕIÓJÕJÐJr8   c                ó¢   € V P                  VP                  4       4      pW P                  P                  4       ,          pVP                  V4      # rd   )ru   ra   rj   Útype_as)rk   rt   Úoutputs   && r5   ÚforwardÚMoshiRMSNorm.forwardÇ   s:   € Ø—‘˜AŸG™G›IÓ&ˆØŸ+™+×+Ñ+Ó-Õ-ˆØ�~‰~˜aÓ Ð r8   c                ó^   € \        V P                  P                  4       R V P                   2# )z, eps=)r2   rj   Úshaper_   ©rk   s   &r5   Ú
extra_reprÚMoshiRMSNorm.extra_reprÌ   s'   € Ü˜Ÿ™×)Ñ)Ó*Ð+¨6°$·(±(°Ð<Ð<r8   )r_   rj   )g�íµ ÷Æ°>)r:   r;   r<   r=   rf   ru   rz   r   r@   rA   Ú__classcell__©rl   r4   s   @@r5   r\   r\   ½   s$   ù‡ € ÷4õ 4ò
Kò!÷
=ò =r8   r\   c                   ó<   a a€ ] tR t^Ðt oV 3R ltRR ltRtVtV ;t# )ÚMoshiFlexibleLinearc                ó„   <€ \         SV `  4        \        P                  ! \        P
                  ! W2V4      4      V n        R # rd   )re   rf   rg   rh   r.   Úrandnrj   )rk   Ú
input_sizeÚoutput_sizeÚ
num_layersrl   s   &&&&€r5   rf   ÚMoshiFlexibleLinear.__init__Ñ   s)   ø€ Ü‰ÑÔä—l’l¤5§;¢;¨zÈ
Ó#SÓTˆŽr8   c                óö   € Ve#   \         P                  ! V P                  ^ V4      MV P                  pVP                  ^^4      R,          p\         P                  ! VR,          V4      pVP                  ^4      # )a…  
`MoshiFlexibleLinear` creates one linear layer per codebook. There's multiple ways to use it.
In the default case, `sequence_length=num_layers`, so each element of the sequence will be matmul to the weights corresponding to its index on the sequence.

For more advanced cases, one can specify which codebook's layer(s) to use with `layer_idx`.
If `layer_idx` indicates a single integer, all of the element of the sequence will be matmul to this single codebook's layer.
But if `layer_idx` is a tensor of shape `(seq_length,)`, it will matmul each i-th element of the input sequence to the corresponding layer `weight[i]`.


Args:
    x (`torch.FloatTensor): input to the layer of shape `(batch, num_layers, embed_dim)` or of shape `(batch, seq_length, embed_dim)`
    layer_idx (`torch.Tensor`, *optional*):
        Can be used to specify which codebook's layers(s) to use.
        If it's a tensor of shape `(seq_length,)`, will matmul each element of the sequence to the corresponding weights.
        But if `layer_idx` is a tensor of shape `(seq_length,)`, it will matmul each i-th element of the input sequence to the corresponding layer `weight[i]`.
)NºNNNrŒ   rŒ   )rŒ   rŒ   NrŒ   )r.   Úindex_selectrj   Ú	transposeÚmatmulÚsqueeze)rk   rt   Ú	layer_idxÚselected_weightss   &&& r5   rz   ÚMoshiFlexibleLinear.forwardÖ   so   € ð( MVÒLaœ5×-Ò-¨d¯k©k¸1¸iÔHÐgk×grÑgrÐð ,×5Ñ5°a¸Ó;¸MÕJÐô �LŠL˜˜=Õ)Ð+;Ó<ˆð �y‰y˜‹|Ðr8   )rj   rd   ©	r:   r;   r<   r=   rf   rz   r@   rA   r�   r‚   s   @@r5   r„   r„   Ð   s   ù‡ € õU÷
ô r8   r„   c                   ó@   a a€ ] tR t^÷t oRV 3R lltRR ltRtVtV ;t# )ÚMoshiLinearc                ó¢   <€ \         SV `  4        W@n        V'       g    \        P                  ! WR R7      V n        R# \        WVR7      V n        R# )F©Úbias)r‰   N)re   rf   Úuse_flexible_linearrg   ÚLinearÚlinearr„   )rk   Ú	input_dimÚ
output_dimÚnum_codebooksrš   rl   s   &&&&&€r5   rf   ÚMoshiLinear.__init__ø   s8   ø€ Ü‰ÑÔà#6Ô ç"ÜŸ)š) IÀÔFˆDŽKä-¨iÐP]Ô^ˆDŽKr8   c                ój   € V P                   '       d   V P                  W4      # V P                  V4      # rd   )rš   rœ   )rk   rt   r‘   s   &&&r5   rz   ÚMoshiLinear.forward  s+   € Ø×#×#Ð#Ø—;‘;˜qÓ,Ð,à—;‘;˜q“>Ð!r8   )rœ   rš   ©Frd   r”   r‚   s   @@r5   r–   r–   ÷   s   ù‡ € ÷_÷"ô "r8   r–   c                   óÎ   a a€ ] tR tRt o]! RRR7      RV3R lV 3R lll4       t]]! RRR7      RV3R lR ll4       4       t]P                  ! 4       ]
R	 4       4       tR
tVtV ;t# )ÚMoshiRotaryEmbeddingi
  Údevicez5.18)Úversionc                ó    <€ V ^8„  d   QhRS[ /# ©r#   Úconfig©r   )r3   r4   s   "€r5   r6   Ú!MoshiRotaryEmbedding.__annotate__  s   ø€ ÷ Oñ O™{ñ Or8   c                óä  <€ \         SV `  4        VP                  V n        VP                  V n        Wn        V P
                  P                  R ,          V n        V P                  pV P                  R8w  d   \        V P                  ,          pV! V P
                  V4      w  q@n
        \        P                  ! VRR7      V n        \        P                  ! VP                  4       RR7      V n        R# )Ú	rope_typeÚdefaultF)Ú
persistentN)re   rf   Úmax_position_embeddingsÚmax_seq_len_cachedÚoriginal_max_seq_lenrª   Úrope_parametersr®   Úcompute_default_rope_parametersr   Úattention_scalingrg   ÚBufferÚinv_freqÚcloneÚoriginal_inv_freq)rk   rª   r¦   Úrope_init_fnr¸   rl   s   &&&  €r5   rf   ÚMoshiRotaryEmbedding.__init__  s¬   ø€ ä‰ÑÔØ"(×"@Ñ"@ˆÔØ$*×$BÑ$BˆÔ!àŒàŸ™×4Ñ4°[ÕAˆŒØ!%×!EÑ!EˆØ�>‰>˜YÔ&Ü.¨t¯~©~Õ>ˆLÙ+7¸¿¹ÀVÓ+LÑ(ˆÔ(äŸ	š	 (°uÔ=ˆŒÜ!#§¢¨8¯>©>Ó+;ÈÔ!NˆÖr8   c                óP   <€ V ^8„  d   QhRS[ RS[S[P                  S[3,          /# )r#   rª   Úreturn)r   r2   r.   r/   ra   )r3   r4   s   "€r5   r6   r¬     s.   ø€ ÷ 5ñ 5±ð 5ÑW\Ñ]b×]iÑ]iÑkpÐ]pÕWqñ 5r8   c           	     ó0  € V P                   R,          p\        V RR4      ;'       g    V P                  V P                  ,          pRpRV\        P
                  ! ^ V^\        P                  R7      V,          ,          ,          pVP                  V4      V3# )a~  
Computes the inverse frequencies according to the original RoPE implementation
Args:
    config ([`~transformers.PreTrainedConfig`]):
        The model configuration.
Returns:
    Tuple of (`torch.Tensor`, `float`), containing the inverse frequencies for the RoPE embeddings and the
    post-processing scaling factor applied to the computed cos/sin (unused in this type of RoPE).
Ú
rope_thetaÚhead_dimNg      ð?©Údtype)r´   ÚgetattrÚhidden_sizeÚnum_attention_headsr.   Úarangera   Úto)rª   r¦   ÚkwargsÚbaser^   Úattention_factorr¸   s   &&,    r5   rµ   Ú4MoshiRotaryEmbedding.compute_default_rope_parameters  s~   € ð ×%Ñ% lÕ3ˆÜ�f˜j¨$Ó/×cÐc°6×3EÑ3EÈ×IcÑIcÕ3cˆàÐà˜$¤5§<¢<°°3¸ÄÇÁÔ#MÐPSÕ#SÕTÕUˆØ�{‰{˜6Ó"Ð$4Ð4Ð4r8   c                ó^  € V P                   R,          P                  VP                  ^ ,          R	^4      P                  \        P
                  VP                  R7      pVR
,          P                  4       p\        VP                  P                  \        4      '       d2   VP                  P                  R8w  d   VP                  P                  MRp\        VRR7      ;_uu_ 4        W4,          P                  ^^4      p\        P                  ! Wf3R	R7      pVP                  4       V P                  ,          pVP                  4       V P                  ,          p	R R R 4       XP                  VP                   R7      X	P                  VP                   R7      3#   + '       g   i     LH; i)N©rÃ   r¦   ÚmpsÚcpuF)Údevice_typeÚenabled©r^   rÂ   )NrŒ   Nrp   )rŒ   NrŒ   )r¸   Úexpandr}   rÈ   r.   ra   r¦   Ú
isinstanceÚtypeÚstrr   rŽ   ÚcatÚcosr¶   ÚsinrÃ   )
rk   rt   Úposition_idsÚinv_freq_expandedÚposition_ids_expandedrÑ   ÚfreqsÚembrÙ   rÚ   s
   &&&       r5   rz   ÚMoshiRotaryEmbedding.forward0  s2  € ð �M‰M˜-Õ(×/Ñ/°×0BÑ0BÀ1Õ0EÀrÈ1ÓM×PÑPÔW\×WbÑWbÐkl×ksÑksÐPÓtð 	ð !-¨ZÕ 8× >Ñ >Ó @Ðä'1°!·(±(·-±-Ä×'EÒ'EÈ!Ï(É(Ï-É-Ð[`ÔJ`�a—h‘h—m’mÐfkˆä¨¸U×CÖCØ&Õ>×IÑIÈ!ÈQÓOˆEÜ—)’)˜U˜N°Ô3ˆCØ—'‘'“)˜d×4Ñ4Õ4ˆCØ—'‘'“)˜d×4Ñ4Õ4ˆC÷	 Dð �v‰v˜AŸG™GˆvÓ$ c§f¡f°1·7±7 fÓ&;Ð;Ð;÷ D×Cús   Ã(A4FÆF,	)r¶   rª   r¸   r²   rº   r³   r®   rd   )r:   r;   r<   r=   r   rf   Ústaticmethodrµ   r.   Úno_gradr   rz   r@   rA   r�   r‚   s   @@r5   r¥   r¥   
  su   ù‡ € Ù�X vÔ.÷Oô Oó /ðOð  Ù�X vÔ.÷5ñ 5ó /ó ð5ð$ ‡]‚]ƒ_Øñ<ó ó ÷<ð <r8   r¥   c                óÌ   € V RRV P                   R,          ^,          13,          pV RV P                   R,          ^,          R13,          p\        P                  ! V) V3RR7      # )z*Rotates half the hidden dims of the input..NrÓ   rp   )r}   r.   rØ   )rt   Úx1Úx2s   &  r5   Úrotate_halfræ   D  sZ   € à	
ˆ3Ð"�!—'‘'˜"•+ Õ"Ð"Ð"Õ	#€BØ	
ˆ3�—‘˜•˜qÕ Ñ"Ð"Õ	#€BÜ�9Š9�r�c˜2�Y BÔ'Ð'r8   c                óÈ   € VP                  V4      pVP                  V4      pW,          \        V 4      V,          ,           pW,          \        V4      V,          ,           pWV3# )aI  Applies Rotary Position Embedding to the query and key tensors.

Args:
    q (`torch.Tensor`): The query tensor.
    k (`torch.Tensor`): The key tensor.
    cos (`torch.Tensor`): The cosine part of the rotary embedding.
    sin (`torch.Tensor`): The sine part of the rotary embedding.
    unsqueeze_dim (`int`, *optional*, defaults to 1):
        The 'unsqueeze_dim' argument specifies the dimension along which to unsqueeze cos[position_ids] and
        sin[position_ids] so that they can be properly broadcasted to the dimensions of q and k. For example, note
        that cos[position_ids] and sin[position_ids] have the shape [batch_size, seq_len, head_dim]. Then, if q and
        k have the shape [batch_size, heads, seq_len, head_dim], then setting unsqueeze_dim=1 makes
        cos[position_ids] and sin[position_ids] broadcastable to the shapes of q and k. Similarly, if q and k have
        the shape [batch_size, seq_len, heads, head_dim], then set unsqueeze_dim=2.
Returns:
    `tuple(torch.Tensor)` comprising of the query and key tensors rotated using the Rotary Position Embedding.
)Ú	unsqueezeræ   )ÚqÚkrÙ   rÚ   Úunsqueeze_dimÚq_embedÚk_embeds   &&&&&  r5   Úapply_rotary_pos_embrî   L  sS   € ð$ �-‰-˜Ó
&€CØ
�-‰-˜Ó
&€CØ�wœ; q›>¨CÕ/Õ0€GØ�wœ; q›>¨CÕ/Õ0€GØÐÐr8   c                   óL   a a€ ] tR tRt oRV 3R lltRV3R lR lltRtVtV ;t# )ÚMoshiGatingMLPie  c                ó   <€ \         SV `  4        \        VP                  ,          V n        VP
                  pVP                  pV'       d   VP                  M^pV^8X  dE   \        P                  ! WCRR7      V n
        \        P                  ! V^,          VRR7      V n        R# \        WCV4      V n
        \        V^,          WE4      V n        R# )é   Fr˜   N)re   rf   r   Ú
hidden_actÚactivation_fnÚffn_dimrÅ   rŸ   rg   r›   Úfc1Úfc2r„   )rk   rª   rš   rõ   rÅ   r‰   rl   s   &&&   €r5   rf   ÚMoshiGatingMLP.__init__f  s•   ø€ Ü‰ÑÔä# F×$5Ñ$5Õ6ˆÔØ—.‘.ˆØ×(Ñ(ˆß-@�V×)Ò)Àaˆ
Ø˜Œ?Ü—y’y ¸EÔBˆDŒHÜ—y’y ¨A¥¨{ÀÔGˆDŽHä*¨;ÀÓLˆDŒHÜ*¨7°a­<¸ÓQˆDŽHr8   c                ób   <€ V ^8„  d   QhRS[ P                  RS[R,          RS[ P                  /# )r#   r+   r‘   Nr¾   ©r.   r/   r`   )r3   r4   s   "€r5   r6   ÚMoshiGatingMLP.__annotate__t  s1   ø€ ÷ ñ ¡U§\¡\ð ¹cÀD½jð ÑTY×T`ÑT`ñ r8   c                ó2  € Vf   V P                  V4      MV P                  W4      pVP                  w  r4pVP                  W4^R4      pV P                  VR,          4      VR,          ,          pVf   V P	                  V4      pV# V P	                  W4      pV# )Nrp   ).é    rŒ   ).rò   rŒ   )rö   r}   Úviewrô   r÷   )rk   r+   r‘   Ú
batch_sizeÚsequence_lengthÚ_s   &&&   r5   rz   ÚMoshiGatingMLP.forwardt  s—   € Ø3<Ò3D˜Ÿ™ Ô/È$Ï(É(ÐS`ÓJlˆà)6×)<Ñ)<Ñ&ˆ
 QØ%×*Ñ*¨:ÈÈ2ÓNˆØ×*Ñ*¨=¸Õ+CÓDÀ}ÐU^ÕG_Õ_ˆØ3<Ò3D˜Ÿ™ Ó/ˆØÐð KOÏ(É(ÐS`ÓJlˆØÐr8   )rô   rö   r÷   r£   rd   r”   r‚   s   @@r5   rð   rð   e  s   ù‡ € ÷R÷÷ ò r8   rð   c                ód   € V ^8„  d   QhR\         P                  R\        R\         P                  /# )r#   r+   Ún_repr¾   rú   )r3   s   "r5   r6   r6     s.   € ÷ 	Uñ 	UœUŸ\™\ð 	U´#ð 	U¼%¿,¹,ñ 	Ur8   c                ó˜   € V P                   w  r#rEV^8X  d   V # V R,          P                  W#WV4      p V P                  W#V,          WE4      # )zÈ
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch,
num_key_value_heads, seqlen, head_dim) to (batch, num_attention_heads, seqlen, head_dim)
)rŒ   rŒ   NrŒ   rŒ   )r}   rÔ   Úreshape)r+   r  ÚbatchÚnum_key_value_headsÚslenrÁ   s   &&    r5   Ú	repeat_kvr
    sU   € ð
 2?×1DÑ1DÑ.€E Ø�„zØÐØ!Ð"2Õ3×:Ñ:¸5ÐW\ÐdlÓm€MØ× Ñ  ¸eÕ(CÀTÓTÐTr8   c                ó   € V ^8„  d   QhR\         P                  R\        P                  R\        P                  R\        P                  R\        P                  R,          R\        R\        R	\
        \        ,          /# )
r#   ÚmoduleÚqueryÚkeyÚvaluerY   NÚscalingÚdropoutrÉ   )rg   ÚModuler.   r/   ra   r   r   )r3   s   "r5   r6   r6   Œ  sw   € ÷ %ñ %Ü�I‰Ið%ä�<‰<ð%ô 
�‰ð%ô �<‰<ð	%ô
 —L‘L 4Õ'ð%ô ð%ô ð%ô Ô'Õ(ñ%r8   c                 ó"  € \        W P                  4      p\        W0P                  4      p	\        P                  ! WP	                  ^^4      4      V,          p
Ve	   W¤,           p
\
        P                  P                  V
R\        P                  R7      P                  VP                  4      p
\
        P                  P                  W¦V P                  R7      p
\        P                  ! W©4      pVP	                  ^^4      P                  4       pWº3# )r#   )r^   rÃ   )ÚpÚtrainingrp   )r
  Únum_key_value_groupsr.   r�   rŽ   rg   Ú
functionalÚsoftmaxÚfloat32rÈ   rÃ   r  r  Ú
contiguous)r  r  r  r  rY   r  r  rÉ   Ú
key_statesÚvalue_statesÚattn_weightsÚattn_outputs   &&&&&&&,    r5   Úeager_attention_forwardr  Œ  sÒ   € ô ˜3× ;Ñ ;Ó<€JÜ˜U×$?Ñ$?Ó@€Lä—<’< ×';Ñ';¸A¸qÓ'AÓBÀWÕL€LØÒ!Ø#Õ4ˆä—=‘=×(Ñ(¨¸2ÄUÇ]Á]Ð(ÓS×VÑVÐW\×WbÑWbÓc€LÜ—=‘=×(Ñ(¨È6Ï?É?Ð(Ó[€LÜ—,’,˜|Ó:€KØ×'Ñ'¨¨1Ó-×8Ñ8Ó:€KàÐ$Ð$r8   c                   ó\   a a€ ] tR tRt oRtRV3R lV 3R llltR	V3R lR lltRtVtV ;t	# )
ÚMoshiAttentioni¥  z=Multi-headed attention from 'Attention Is All You Need' paperc                ó4   <€ V ^8„  d   QhRS[ RS[R,          /# )r#   rª   r‘   N)r   r`   )r3   r4   s   "€r5   r6   ÚMoshiAttention.__annotate__¨  s   ø€ ÷ $;ñ $;™{ð $;±s¸Tµzñ $;r8   c                ór  <€ \         SV `  4        Wn        W n        VP                  V n        VP
                  V n        VP                  V n        VP                  V n        VP                  V n	        V P                  V P                  ,          V n
        R V n        ^\        P                  ! V P                  4      ,          V n        V P
                  V P                  ,          ^ 8w  d'   \        RV P
                   RV P                   R24      h\!        V P
                  V P                  V P                  ,          VP"                  V4      V n        \!        V P
                  V P                  V P                  ,          VP"                  V4      V n        \!        V P
                  V P                  V P                  ,          VP"                  V4      V n        \!        V P                  V P                  ,          V P
                  VP"                  V4      V n        RV n        V'       d   \/        V4      V n        R# R# )Tz?hidden_size must be divisible by num_heads (got `hidden_size`: z and `num_heads`: z).N)re   rf   rª   r‘   Úattention_dropoutrÅ   rÆ   Ú	num_headsrÁ   r  r  Ú	is_causalÚmathÚsqrtr  Ú
ValueErrorr–   rŸ   Úq_projÚk_projÚv_projÚo_projÚ
rotary_embr¥   ©rk   rª   r‘   rš   Úuse_roperl   s   &&&&&€r5   rf   ÚMoshiAttention.__init__¨  s¼  ø€ Ü‰ÑÔØŒØ"Œà!'×!9Ñ!9ˆÔØ!×-Ñ-ˆÔØ×3Ñ3ˆŒØŸ™ˆŒØ#)×#=Ñ#=ˆÔ Ø$(§N¡N°d×6NÑ6NÕ$NˆÔ!ØˆŒØœ4Ÿ9š9 T§]¡]Ó3Õ3ˆŒà×Ñ˜dŸn™nÕ,°Ô1ÜØQÐRV×RbÑRbÐQcØ$ T§^¡^Ð$4°Bð8óð ô
 "Ø×Ñ˜dŸn™n¨t¯}©}Õ<¸f×>RÑ>RÐTgó
ˆŒô "Ø×Ñ˜d×6Ñ6¸¿¹ÕFÈ×H\ÑH\Ð^qó
ˆŒô "Ø×Ñ˜d×6Ñ6¸¿¹ÕFÈ×H\ÑH\Ð^qó
ˆŒô "Ø�N‰N˜TŸ]™]Õ*¨D×,<Ñ,<¸f×>RÑ>RÐTgó
ˆŒð
 ˆŒßÜ2°6Ó:ˆDŽOñ r8   c                ó  <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[ P                  R,          RS[R,          RS[ P                  R,          RS[S[,          RS[S[ P                  S[ P                  3,          /# )	r#   r+   rY   NrÛ   r,   Úcodebook_idxrÉ   r¾   )r.   r/   r0   r   r   r   r2   )r3   r4   s   "€r5   r6   r#  Î  sŽ   ø€ ÷ ()ñ ()á—|‘|ð()ñ Ÿ™ tÕ+ð()ñ ×&Ñ&¨Õ-ð	()ñ
  �ð()ñ —l‘l TÕ)ð()ñ Ñ+Õ,ð()ñ 
‰u�|‰|™UŸ\™\Ð)Õ	*ñ()r8   c                óN  € VP                   R R p. VORNV P                  N5pV P                  W4      P                  V4      P	                  ^^4      p	V P                  W4      P                  V4      P	                  ^^4      p
V P                  W4      P                  V4      P	                  ^^4      pV P                  e"   V P                  W³4      w  rÍ\        WšWÍ4      w  ršVe   VP                  W«V P                  4      w  r«\        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  ppVP&                  ! . VORN5!  P)                  4       pV P+                  Wõ4      pVV3# )Nr  ç        r  rp   )r}   rÁ   r+  rþ   rŽ   r,  r-  r/  rî   Úupdater‘   r   Úget_interfacerª   Ú_attn_implementationr  r  r%  r  r  r  r.  )rk   r+   rY   rÛ   r,   r4  rÉ   Úinput_shapeÚhidden_shapeÚquery_statesr  r  rÙ   rÚ   Úattention_interfacer  r  s   &&&&&&,          r5   rz   ÚMoshiAttention.forwardÎ  s¡  € ð $×)Ñ)¨#¨2Ð.ˆØ8˜Ð8 bÐ8¨$¯-©-Ñ8ˆà—{‘{ =Ó?×DÑDÀ\ÓR×\Ñ\Ð]^Ð`aÓbˆØ—[‘[ Ó=×BÑBÀ<ÓP×ZÑZÐ[\Ð^_Ó`ˆ
Ø—{‘{ =Ó?×DÑDÀ\ÓR×\Ñ\Ð]^Ð`aÓbˆà�?‰?Ò&Ø—‘ |ÓB‰HˆCÜ';¸LÐVYÓ'_Ñ$ˆLàÒ&Ø'6×'=Ñ'=¸jÐX\×XfÑXfÓ'gÑ$ˆJä(?×(MÒ(MØ�K‰K×,Ñ,Ô.Eó)
Ðñ %8ØØØØØñ	%
ð  $Ÿ}Ÿ}˜}‘C°$×2HÑ2Hð	%
ð —L‘Lð	%
ð ñ	%
Ñ!ˆ�\ð "×)Ò)Ð;¨;Ð;¸Ó;×FÑFÓHˆØ—k‘k +Ó<ˆØ˜LÐ(Ð(r8   )r%  rª   rÁ   rÅ   r'  r,  r‘   r&  r  r  r.  r+  r/  r  r-  )NFT)NNNN)
r:   r;   r<   r=   r>   rf   rz   r@   rA   r�   r‚   s   @@r5   r!  r!  ¥  s"   ù‡ € ÙG÷$;õ $;÷L()÷ ()ò ()r8   r!  c                   óX   a a€ ] tR tRt oRV3R lV 3R llltRV3R lR lltRtVtV ;t# )	ÚMoshiDecoderLayeriû  c                ó,   <€ V ^8„  d   QhRS[ RS[RS[/# )r#   rª   r‘   rš   )r   r`   Úbool)r3   r4   s   "€r5   r6   ÚMoshiDecoderLayer.__annotate__ü  s(   ø€ ÷ @ñ @™{ð @±sð @ÑQUñ @r8   c                ór  <€ \         SV `  4        VP                  V n        W0n        \	        WW4R 7      V n        \        W4      V n        \        V P                  VP                  R7      V n
        \        V P                  VP                  R7      V n        VP                  V n        VP                  V n        R# ))rª   r‘   rš   r1  ©r_   N)re   rf   rÅ   rš   r!  Ú	self_attnrð   Úmlpr\   Úrms_norm_epsÚinput_layernormÚpost_attention_layernormÚsliding_windowr9  r0  s   &&&&&€r5   rf   ÚMoshiDecoderLayer.__init__ü  s”   ø€ Ü‰ÑÔØ!×-Ñ-ˆÔØ#6Ô ä'ØÐDWô
ˆŒô " &Ó>ˆŒÜ+¨D×,<Ñ,<À&×BUÑBUÔVˆÔÜ(4°T×5EÑ5EÈ6×K^ÑK^Ô(_ˆÔ%Ø$×3Ñ3ˆÔà$*×$?Ñ$?ˆÖ!r8   c                ód  <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[ P                  R,          RS[R,          RS[R,          RS[R,          RS[ P                  R,          R	S[S[ P                  S[S[ P                  S[ P                  3,          R,          3,          /# )
r#   r+   rY   NrÛ   r,   Úoutput_attentionsÚ	use_cacher4  r¾   )r.   r/   r0   r   rB  r2   r1   )r3   r4   s   "€r5   r6   rC    s´   ø€ ÷ )ñ )á—|‘|ð)ñ Ÿ™ tÕ+ð)ñ ×&Ñ&¨Õ-ð	)ñ
  �ð)ñ   $�;ð)ñ ˜$•;ð)ñ —l‘l TÕ)ð)ñ 
‰u× Ñ ¡%©×(9Ñ(9¹5×;LÑ;LÐ(LÕ"MÐPTÕ"TÐTÕ	Uñ)r8   c                óF  € Tp	V P                  V4      pV P                  ! RR VRVRVRVRVRVRV/VB w  rW‘,           pTp	V P                  V4      pV P                  '       g   V P	                  V4      MV P	                  W4      pW‘,           pV3pV'       d
   Wº3,          pV# )r+   rY   rÛ   r,   rN  rO  r4  r9   )rI  rF  rJ  rš   rG  )rk   r+   rY   rÛ   r,   rN  rO  r4  rÉ   ÚresidualÚself_attn_weightsÚoutputss   &&&&&&&&,   r5   rz   ÚMoshiDecoderLayer.forward  sæ   € ð !ˆà×,Ñ,¨]Ó;ˆð ,0¯>ª>ñ 	,
Ø'ð	,
à)ð	,
ð &ð	,
ð ,ð		,
ð
 0ð	,
ð  ð	,
ð &ð	,
ð ñ	,
Ñ(ˆð !Õ0ˆð !ˆØ×5Ñ5°mÓDˆà+/×+C×+CÐ+CˆD�H‰H�]Ô#ÈÏÉÐR_ÓInð 	ð !Õ0ˆà Ð"ˆçØÐ+Õ+ˆGàˆr8   )r9  rÅ   rI  rG  rJ  rF  rK  rš   )T)NNNFFNr”   r‚   s   @@r5   r@  r@  û  s    ù‡ € ÷@õ @÷ )÷ )ò )r8   r@  c                   óŒ   a a€ ] tR tRt oRtR	tRtR.tRtRt	Rt
RtRt]P                  ! 4       V 3R l4       tV3R ltRtVtV ;t# )
ÚMoshiPreTrainedModeli8  ÚmodelTr@  rV   c                ó–   <€ \         SV `  V4       \        V\        4      '       d#   \        P
                  ! VP                  4       R # R # rd   )re   Ú_init_weightsrÕ   r„   ÚinitÚnormal_rj   )rk   r  rl   s   &&€r5   rY  Ú"MoshiPreTrainedModel._init_weightsF  s3   ø€ ä‰Ñ˜fÔ%Ü�fÔ1×2Ò2Ü�LŠL˜Ÿ™Ö'ñ 3r8   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # r©   r«   )r3   r4   s   "€r5   r6   Ú!MoshiPreTrainedModel.__annotate__8  s   ø‡ ‚ áÑò r8   r9   ©ÚaudioÚtext)r:   r;   r<   r=   Úbase_model_prefixÚinput_modalitiesÚsupports_gradient_checkpointingÚ_no_split_modulesÚ_supports_flash_attnÚ_supports_sdpaÚ_supports_flex_attnÚ_supports_attention_backendÚmain_input_namer.   râ   rY  r?   r@   rA   r�   r‚   s   @@r5   rV  rV  8  s]   ù‡ € ð  ÐØ(ÐØ&*Ð#Ø,Ð-ÐØÐØ€NØÐØ"&Ðà!€Oà
‡]‚]ƒ_ô(ó ð(÷ … r8   rV  c                   ód   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tV3R ltRtVt	V ;t
# )
ÚMoshiDepthDecoderiM  z•
Transformer depth decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MoshiTransformerLayer`]

Args:
    config: MoshiConfig
c                ó    <€ V ^8„  d   QhRS[ /# r©   ©r   )r3   r4   s   "€r5   r6   ÚMoshiDepthDecoder.__annotate__W  s   ø€ ÷ ñ Ñ/ñ r8   c                óB  <€ \         SV `  V4       \        P                  ! VP                  ^,           VP
                  4      V n        \        P                  ! \        VP                  ^,
          4       Uu. uF5  p\        P                  ! VP                  ^,           VP
                  4      NK7  	  up4      V n        \        VP                  VP
                  VP                  4      V n        \        P                  ! \        VP                  4       Uu. uF  p\!        WRRR7      NK  	  up4      V n        \        VP
                  VP                  VP                  4      V n        VP&                  V n        RV n        Wn        V P-                  4        R# u upi u upi )rò   TF)rš   r1  N)re   rf   rg   Ú	EmbeddingÚ
vocab_sizerÅ   Útext_embed_tokensÚ
ModuleListÚrangerŸ   Úaudio_vocab_sizeÚembed_tokensr„   r‡   Úinput_projectionsÚnum_hidden_layersr@  ÚlayersÚlm_headsr9  Úgradient_checkpointingrª   Ú	post_init)rk   rª   r  r‘   rl   s   &&  €r5   rf   ÚMoshiDepthDecoder.__init__W  sF  ø€ Ü‰Ñ˜Ô ä!#§¢¨f×.?Ñ.?À!Õ.CÀV×EWÑEWÓ!XˆÔô ŸMšMÜTYÐZ`×ZnÑZnÐqrÕZrÔTsÓtÑTsÈqŒR�\Š\˜&×1Ñ1°AÕ5°v×7IÑ7IÖJÑTsÑtó
ˆÔô "5°V×5FÑ5FÈ×HZÑHZÐ\b×\pÑ\pÓ!qˆÔä—m’mô "' v×'?Ñ'?Ô!@óá!@�Iô " &ÈÐX]×^Ù!@ñó
ˆŒô ,¨F×,>Ñ,>À×@WÑ@WÐY_×YmÑYmÓnˆŒØ$*×$?Ñ$?ˆÔ!Ø&+ˆÔ#ØŒà�‰Öùò# uùòs   Á6;FÄFc                ó„  <€ V ^8„  d   QhRS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[R,          RS[ P                  R,          RS[R,          RS[R,          R	S[R,          R
S[R,          RS[ P                  R,          RS[ P                  R,          RS[S[,          /# )r#   rV   NrG   rY   r,   Úinputs_embedsrO  rN  Úoutput_hidden_statesÚreturn_dictrÛ   Úlabelsr¾   )r.   r0   Ú
BoolTensorr   r1   rB  r2   r   )r3   r4   s   "€r5   r6   ro  q  sí   ø€ ÷ l
ñ l
á×#Ñ# dÕ*ðl
ñ !×+Ñ+¨dÕ2ðl
ñ ×(Ñ(¨4Õ/ð	l
ñ
  �ðl
ñ ×(Ñ(¨4Õ/ðl
ñ ˜$•;ðl
ñ   $�;ðl
ñ # T�kðl
ñ ˜D•[ðl
ñ ×&Ñ&¨Õ-ðl
ñ × Ñ  4Õ'ðl
ñ 
Ñ(Õ	(ñl
r8   c                ó<  € Ve   TMV P                   P                  pVe   TMV P                   P                  pVe   TMV P                   P                  pV	e   T	MV P                   P                  p	V P
                  '       d2   V P                  '       d    V'       d   \        P                  R4       RpV'       d   Vf   \        V P                   R7      pVf   ^ MVP                  4       p\        P                  ! VP                  ^,          VP                  R7      V,           pV
f   VP                  ^ 4      p
Vf¦   . pV F…  pVP!                  4       pV^ 8X  d-   VP#                  V P%                  VRV.3,          4      4       KF  VP#                  V P&                  V^,
          ,          ! VRWý,
          .3,          4      4       K‡  	  \        P(                  ! V^R7      pWPP+                  W.4      ,          pRpVe   \-        V P                   VVVV
R7      pV'       d   RMRpV'       d   RMRpTpV P.                   FH  pV'       d   VV3,          pV! VVV
VVVVR	7      pV^ ,          pV'       g   K7  VV^,          3,          pKJ  	  V'       d   VV3,          pV P1                  VV4      pRpVeš   VP3                  4       p\5        4       pVP7                  W°P                   P8                  8H  R4      P;                  R4      pVP=                  VP                  4      pV! VP;                  RV P                   P8                  4      V4      pV	'       g7   \>        ;QJ d    . R
 VVVVV3 4       F  NK  	  5# ! R
 VVVVV3 4       4      # \A        VVVVVR7      # )aŽ  
Args:
    input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
        Indices of input sequence tokens. The first element of the sequence must the text token associated to the audio codebooks.
        The rest of the elements must be flatten audio codebooks.
    last_hidden_state (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`):
        Sequence of hidden-states at the output of the last layer of the main decoder. Used to contextualize `input_ids`
    attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
        Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:

        - 1 for tokens that are **not masked**,
        - 0 for tokens that are **masked**.

        [What are attention masks?](../glossary#attention-mask)

        Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
        [`PreTrainedTokenizer.__call__`] for details.

        If `past_key_values` is used, optionally only the last `input_ids` have to be input (see
        `past_key_values`).

        If you want to change padding behavior, you should read [`modeling_opt._prepare_decoder_attention_mask`]
        and modify to your needs. See diagram 1 in [the paper](https://huggingface.co/papers/1910.13461) for more
        information on the default strategy.

        - 1 indicates the head is **not masked**,
        - 0 indicates the head is **masked**.
    past_key_values (`Cache`, *optional*):
        It is a [`~cache_utils.Cache`] instance. For more details, see our [kv cache guide](https://huggingface.co/docs/transformers/en/kv_cache).

        If `past_key_values` are used, the user can optionally input only the last `input_ids` (those that don't
        have their past key value states given to this model) of shape `(batch_size, 1)` instead of all `input_ids`
        of shape `(batch_size, sequence_length)`.
    inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
        Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation. This
        is useful if you want more control over how to convert the inputs into associated vectors than the
        model's internal embedding lookup matrix.
    use_cache (`bool`, *optional*):
        If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding (see
        `past_key_values`).
    output_attentions (`bool`, *optional*):
        Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
        tensors for more detail.
    output_hidden_states (`bool`, *optional*):
        Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
        more detail.
    return_dict (`bool`, *optional*):
        Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
    position_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
        Indices of positions of each input sequence tokens in the position embeddings. Selected in the range `[0,
        config.n_positions - 1]`.

        [What are position IDs?](../glossary#position-ids)
    labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
        Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
        config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
        (masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
NúX`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`.F©rª   ©r¦   rŒ   rÓ   ©rª   r€  rY   r,   rÛ   )rY   rÛ   r,   rN  rO  r4  c              3   ó0   "  € T F  qf   K  Vx € K  	  R # 5ird   r9   ©Ú.0Úvs   & r5   Ú	<genexpr>Ú,MoshiDepthDecoder.forward.<locals>.<genexpr>  s   é € ð Ù]�a—’Ó]ùó   ‚Œ
)rF   r(   r,   r+   r*   r9   iœÿÿÿrp   )!rª   rN  r�  rO  r‚  r|  r  ÚloggerÚwarning_oncer	   Úget_seq_lengthr.   rÇ   r}   r¦   rè   ÚitemÚappendrs  rw  rØ   rx  r   rz  r{  ra   r   Úmasked_fillrv  r  rÈ   r2   r   )rk   rV   rG   rY   r,   r€  rO  rN  r�  r‚  rÛ   rƒ  rÉ   Úpast_seen_tokensr4  Úposition_idxÚcausal_maskÚall_hidden_statesÚall_self_attnsr+   Údecoder_layerÚlayer_outputsr(   rF   Úloss_fcts   &&&&&&&&&&&&,            r5   rz   ÚMoshiDepthDecoder.forwardq  s[  € ðR 2CÒ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ò$DÑ È$Ï+É+×JjÑJjð 	ð "+Ò!6‘I¸D¿K¹K×<QÑ<Qˆ	à%0Ò%<‘kÀ$Ç+Á+×BYÑBYˆà×&×&Ð&¨4¯=¯=¨=¿YÜ×ÑØjôð ˆIç˜Ò0Ü*°$·+±+Ô>ˆOà /Ò 7™1¸_×=[Ñ=[Ó=]ÐÜ—|’| I§O¡O°AÕ$6¸y×?OÑ?OÔPÐScÕcˆàÒØ'×1Ñ1°!Ó4ˆLð Ò ØˆMÛ ,�Ø+×0Ñ0Ó2�Ø 1Ô$Ø!×(Ñ(¨×)?Ñ)?À	È!ÈlÈ^ÐJ[Õ@\Ó)]Ö^à!×(Ñ(Ø×)Ñ)¨<¸!Õ+;Ö=¸iÈÈLÕLkÐKlÐHlÕ>mÓnöñ !-ô "ŸIšI m¸Ô;ˆMà×/Ñ/Ð0AÓPÕPˆàˆØÒ%Ü,Ø—{‘{Ø+Ø-Ø /Ø)ôˆK÷ #7™B¸DÐß0™°dˆØ%ˆØ!Ÿ[œ[ˆMß#Ø! mÐ%5Õ5Ð!á)ØØ*Ø)Ø /Ø"3Ø#Ø)ôˆMð *¨!Õ,ˆMç Ñ Ø =°Õ#3Ð"5Õ5’ñ# )÷(  Ø -Ð!1Õ1Ðà—‘˜}¨lÓ;ˆàˆØÒà—\‘\“^ˆFÜ'Ó)ˆHà×'Ñ'¨·+±+×2NÑ2NÑ(NÐPTÓU×]Ñ]Ð^`ÓaˆFØ—Y‘Y˜vŸ}™}Ó-ˆFÙ˜FŸN™N¨2¨t¯{©{×/KÑ/KÓLÈfÓUˆDçß”5ñ Ø  &¨/Ð;LÈnÑ]ó—5ð �5ñ Ø  &¨/Ð;LÈnÑ]óó ð ô &ØØØ+Ø)Ø%ô
ð 	
r8   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # r©   rn  )r3   r4   s   "€r5   r6   ro  M  s   ø‡ ‚ ñ Ñò r8   )r9  rª   rw  r|  rx  rz  r{  rs  )NNNNNNNNNNN)r:   r;   r<   r=   r>   rf   rz   r?   r@   rA   r�   r‚   s   @@r5   rl  rl  M  s(   ù‡ € ñ÷ó ÷4l
ò l
÷I … r8   rl  c                   ó^   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4       tRtVtV ;t	# )Ú
MoshiModeli   c                ó    <€ V ^8„  d   QhRS[ /# r©   r«   )r3   r4   s   "€r5   r6   ÚMoshiModel.__annotate__"  s   ø€ ÷ ñ ™{ñ r8   c                ó  <€ \         SV `  V4       VP                  V n        VP                  V n        \
        P                  ! VP                  ^,           VP                  V P                  4      V n        \
        P                  ! \        VP                  4       Uu. uF  p\        WRR7      NK  	  up4      V n        \        VP                  VP                  R7      V n        RV n        V P%                  4        R# u upi )rò   F)rš   rE  N)re   rf   Úpad_token_idÚpadding_idxrr  rg   rq  rÅ   rw  rt  ru  ry  r@  rz  r\   rH  Únormr|  r}  )rk   rª   r‘   rl   s   && €r5   rf   ÚMoshiModel.__init__"  sÌ   ø€ Ü‰Ñ˜Ô Ø!×.Ñ.ˆÔØ ×+Ñ+ˆŒäŸLšL¨×):Ñ):¸QÕ)>À×@RÑ@RÐTX×TdÑTdÓeˆÔÜ—m’mô "' v×'?Ñ'?Ô!@óá!@�Iô " &È×OÙ!@ñó
ˆŒô ! ×!3Ñ!3¸×9LÑ9LÔMˆŒ	Ø&+ˆÔ#ð 	�‰Öùòs   ÂC=c                ó4  <€ V ^8„  d   QhRS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[R,          RS[ P                  R,          RS[R,          RS[R,          R	S[R,          R
S[R,          RS[S[,          /
# )r#   rV   NrY   rÛ   r,   r€  rO  rN  r�  r‚  r¾   )r.   r0   r/   r   r1   rB  r2   r   )r3   r4   s   "€r5   r6   r¤  5  s¿   ø€ ÷ W
ñ W
á×#Ñ# dÕ*ðW
ñ Ÿ™ tÕ+ðW
ñ ×&Ñ&¨Õ-ð	W
ñ
  �ðW
ñ ×(Ñ(¨4Õ/ðW
ñ ˜$•;ðW
ñ   $�;ðW
ñ # T�kðW
ñ ˜D•[ðW
ñ 
Ñ(Õ	(ñW
r8   c
           
     ó’  € Ve   TMV P                   P                  pVe   TMV P                   P                  pVe   TMV P                   P                  pV	e   T	MV P                   P                  p	V P
                  '       d2   V P                  '       d    V'       d   \        P                  R4       RpVf   V P                  V4      pVfb   Ve   VP                  4       M^ p\        P                  ! VP                  ^,          VP                  R7      V,           pVP                  ^ 4      pR pVe   \!        V P                   VVVVR7      pTpV'       d   Vf   \#        V P                   R7      pV'       d   R	MR pV'       d   R	MR pV P$                   FF  pV'       d
   Wí3,          pV! VVVVVVR7      pV^ ,          pV'       g   K5  VV^,          3,          pKH  	  V P'                  V4      pV'       d
   Wí3,          pV	'       g1   \(        ;QJ d    . R WÔWï3 4       F  NK  	  5# ! R WÔWï3 4       4      # \+        VVVVR7      # )
Nr†  Frˆ  r‰  r‡  )rY   rÛ   r,   rN  rO  c              3   ó0   "  € T F  qf   K  Vx € K  	  R # 5ird   r9   r‹  s   & r5   rŽ  Ú%MoshiModel.forward.<locals>.<genexpr>„  s   é € ð Ù^�a—’Ó^ùr�  )rG   r,   r+   r*   r9   )rª   rN  r�  rO  r‚  r|  r  r‘  r’  rw  r“  r.   rÇ   r}   r¦   rè   r   r	   rz  r¨  r2   r   )rk   rV   rY   rÛ   r,   r€  rO  rN  r�  r‚  rÉ   r—  r™  r+   rš  r›  rœ  r�  s   &&&&&&&&&&,       r5   rz   ÚMoshiModel.forward4  s4  € ð 2CÒ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ò$DÑ È$Ï+É+×JjÑJjð 	ð "+Ò!6‘I¸D¿K¹K×<QÑ<Qˆ	Ø%0Ò%<‘kÀ$Ç+Á+×BYÑBYˆà×&×&Ð&¨4¯=¯=¨=¿YÜ×ÑØjôð ˆIàÒ Ø ×-Ñ-¨iÓ8ˆMàÒØCRÒC^˜×=Ñ=Ô?ÐdeÐÜ Ÿ<š<¨×(;Ñ(;¸AÕ(>À}×G[ÑG[Ô\Ð_oÕoˆLØ'×1Ñ1°!Ó4ˆLàˆØÒ%Ü,Ø—{‘{Ø+Ø-Ø /Ø)ôˆKð &ˆç˜Ò0Ü*°$·+±+Ô>ˆO÷ #7™B¸DÐß0™°dˆà!Ÿ[œ[ˆMß#Ø!Ð%5Õ5Ð!á)ØØ*Ø)Ø /Ø"3Ø#ôˆMð *¨!Õ,ˆMç Ñ Ø =°Õ#3Ð"5Õ5’ñ! )ð$ Ÿ	™	 -Ó0ˆ÷  ØÐ!1Õ1Ðçß”5ñ Ø)Ð<MÑ^ó—5ð �5ñ Ø)Ð<MÑ^óó ð ô 'Ø+Ø+Ø+Ø%ô	
ð 	
r8   )rw  r|  rz  r¨  r§  rr  )	NNNNNNNNN)
r:   r;   r<   r=   rf   r   rz   r@   rA   r�   r‚   s   @@r5   r¢  r¢     s1   ù‡ € ÷ó ð$ ÷W
ñ W
ó ÷W
ð W
r8   r¢  zc
    The Moshi decoder model with a text language modelling head on top. Only usable for text.
    c                   óV   a a€ ] tR tRt oRtV 3R lt]RV3R lR ll4       tRtVt	V ;t
# )ÚMoshiForCausalLMi�  c                óì   <€ \         SV `  V4       \        V4      V n        VP                  V n        \
        P                  ! VP                  VP                  R R7      V n        V P                  4        R# )Fr˜   N)
re   rf   r¢  rW  rr  rg   r›   rÅ   Úlm_headr}  )rk   rª   rl   s   &&€r5   rf   ÚMoshiForCausalLM.__init__˜  sU   ø€ Ü‰Ñ˜Ô Ü Ó'ˆŒ
Ø ×+Ñ+ˆŒÜ—y’y ×!3Ñ!3°V×5FÑ5FÈUÔSˆŒð 	�‰Ör8   c                ó†  <€ V ^8„  d   QhRS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[R,          RS[ P                  R,          RS[R,          RS[R,          R	S[R,          R
S[R,          RS[ P                  R,          RS[S[ P                  ,          RS[S[,          /# )r#   rV   NrY   rÛ   r,   r€  rO  rN  r�  r‚  rƒ  Úlogits_to_keepr¾   )	r.   r0   r/   r   r1   rB  r`   r2   rD   )r3   r4   s   "€r5   r6   ÚMoshiForCausalLM.__annotate__¢  sé   ø€ ÷ O
ñ O
á×#Ñ# dÕ*ðO
ñ Ÿ™ tÕ+ðO
ñ ×&Ñ&¨Õ-ð	O
ñ
  �ðO
ñ ×(Ñ(¨4Õ/ðO
ñ ˜$•;ðO
ñ   $�;ðO
ñ # T�kðO
ñ ˜D•[ðO
ñ × Ñ  4Õ'ðO
ñ ™eŸl™lÕ*ðO
ñ 
Ñ,Õ	,ñO
r8   c                ó†  € Ve   TMV P                   P                  pVe   TMV P                   P                  pV	e   T	MV P                   P                  p	V P	                  VVVVVVVVV	R7	      pV^ ,          p\        V\        4      '       d   \        V) R4      MTpV P                  VRVR3,          4      pRpV
e-   V P                  ! R	RVRV
RV P                   P                  /VB pV	'       g#   VV3VR,          ,           pVe   V3V,           # T# \        VVVVP                  VP                  VP                  R7      # )
a¡  
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
    config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
    (masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.

Example:

```python
>>> from transformers import AutoTokenizer, MoshiForCausalLM

>>> model = MoshiForCausalLM.from_pretrained("kmhf/hf-moshiko")
>>> tokenizer = AutoTokenizer.from_pretrained("kmhf/hf-moshiko")

>>> prompt = "What is your favorite condiment?"
>>> inputs = tokenizer(prompt, return_tensors="pt")

>>> # Generate
>>> generate_ids = model.generate(inputs.input_ids, max_length=30)
>>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
"What is your favorite condiment?"
```N)	rV   rY   rÛ   r,   r€  rO  rN  r�  r‚  rŒ   r(   rƒ  rr  ºrò   NN)rF   r(   rG   r,   r+   r*   r9   )rª   rN  r�  r‚  rW  rÕ   r`   Úslicer²  Úloss_functionrr  rD   r,   r+   r*   )rk   rV   rY   rÛ   r,   r€  rO  rN  r�  r‚  rƒ  rµ  rÉ   rS  r+   Úslice_indicesr(   rF   ry   s   &&&&&&&&&&&&,      r5   rz   ÚMoshiForCausalLM.forward¡  sf  € ðL 2CÒ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ò$DÑ È$Ï+É+×JjÑJjð 	ð &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆð —*‘*ØØ)Ø%Ø+Ø'ØØ/Ø!5Ø#ð ó 

ˆð   �
ˆä8BÀ>ÔSV×8WÒ8Wœ˜~˜o¨tÔ4Ð]kˆØ—‘˜m¨A¨}¸aÐ,?Õ@ÓAˆàˆØÒØ×%Ò%Ñp¨VÐp¸FÐpÈtÏ{É{×OeÑOeÐpÐioÑpˆDçàØðð ˜•õˆFð (,Ò'7�D�7˜VÕ#ÐC¸VÐCä*ØØØ+Ø#×3Ñ3Ø!×/Ñ/Ø×)Ñ)ô
ð 	
r8   )r²  rW  rr  )ra  )NNNNNNNNNNrý   )r:   r;   r<   r=   rc  rf   r   rz   r@   rA   r�   r‚   s   @@r5   r°  r°  �  s4   ù‡ € ð !Ðõð ÷O
ñ O
ó ÷O
ð O
r8   r°  zz
    The original Moshi model with an audio encoder, a Moshi depth decoder and a Moshi decoder, for speech-to-speech.
    c                   óŽ  a a€ ] tR tRt oR tRtRtRtRtRt	Rt
V3R lV 3R lltR t]R!V3R lR ll4       tV3R	 lR
 ltR"V3R lR llt]P$                  ! 4       R#V3R lV 3R lll4       tR$V3R lV 3R llltR%V3R lV 3R llltR tR tR tR tR tR t]R 4       tR&V3R lR lltR'R ltR(R lt V3R lt!Rt"Vt#V ;t$# ))ÚMoshiForConditionalGenerationiô  rV   Tc                ó    <€ V ^8„  d   QhRS[ /# r©   r«   )r3   r4   s   "€r5   r6   Ú*MoshiForConditionalGeneration.__annotate__  s   ø€ ÷ ñ ™{ñ r8   c           	     ó  <€ \         SV `  V4       \        P                  ! \	        ^VP
                  ,          4       Uu. uF5  p\        P                  ! VP                  ^,           VP                  4      NK7  	  up4      V n	        \        P                  ! VP                  4      V n        \        V4      V n        \         P#                  VP$                  4      V n        VP
                  V n        V P)                  4        R# u upi )r#   N)re   rf   rg   rt  ru  rŸ   rq  rv  rÅ   rw  r   Úfrom_configÚaudio_encoder_configÚaudio_encoderr°  Údecoderrl  Ú_from_configÚdepth_decoder_configÚdepth_decoderr}  )rk   rª   r  rl   s   && €r5   rf   Ú&MoshiForConditionalGeneration.__init__  sÁ   ø€ Ü‰Ñ˜Ô äŸMšMÜTYÐZ[Ð^d×^rÑ^rÕZrÔTsÓtÑTsÈqŒR�\Š\˜&×1Ñ1°AÕ5°v×7IÑ7IÖJÑTsÑtó
ˆÔô '×2Ò2°6×3NÑ3NÓOˆÔÜ'¨Ó/ˆŒä.×;Ñ;¸F×<WÑ<WÓXˆÔà#×1Ñ1ˆÔØ�‰Öùò us   ¿;Dc                ó   € V P                   # rd   )rÈ  r~   s   &r5   Úget_depth_decoderÚ/MoshiForConditionalGeneration.get_depth_decoder  s   € Ø×!Ñ!Ð!r8   c                óü  <€ V ^8„  d   QhRS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[R,          R	S[ P                  R,          R
S[ P                  R,          RS[ P                  R,          RS[R,          RS[R,          RS[R,          RS[R,          RS[S[,          /# )r#   rV   NrY   Úuser_input_valuesrW   Úmoshi_input_valuesrX   r,   r€  Útext_labelsÚaudio_labelsrO  rN  r�  r‚  r¾   )	r.   r0   r„  r1   r/   r   rB  r2   r   )r3   r4   s   "€r5   r6   rÀ    s*  ø€ ÷ n
ñ n
á×#Ñ# dÕ*ðn
ñ ×(Ñ(¨4Õ/ðn
ñ !×,Ñ,¨tÕ3ð	n
ñ
  Ÿ,™,¨Õ-ðn
ñ "×-Ñ-°Õ4ðn
ñ !Ÿ<™<¨$Õ.ðn
ñ  �ðn
ñ ×(Ñ(¨4Õ/ðn
ñ ×%Ñ%¨Õ,ðn
ñ ×&Ñ&¨Õ-ðn
ñ ˜$•;ðn
ñ   $�;ðn
ñ # T�kðn
ñ ˜D•[ðn
ñ" 
‘Õ	 ñ#n
r8   c                óÒ  a a€ Ve   TMS P                   P                  pVP                  4        UUu/ uF2  w  ppVP                  R4      '       g   K  V\	        R4      ,          VbK4  	  pppVP                  4        UUu/ uF.  w  ppVP                  R4      '       g   K  V\	        R4      R VbK0  	  pppVP                  4        UUu/ uF.  w  ppVP                  R4      '       g   K  V\	        R4      R VbK0  	  pppVEf"   Ve5   Vf1   S P
                  P                  ! V3RS P                  /VB ^ ,          pVe5   Vf1   S P
                  P                  ! V3RS P                  /VB ^ ,          p\        P                  ! Wd.^R7      oVf   Sf   \        R4      hVe&   S P                  P                  P                  V4      pSeY   \        VV 3R l\        SP                   ^,          4       4       4      pVf   TM!VVP#                  VP$                  4      ,           pS P                  ! RR	VR
VRVRVRVRVRRRV	/VB pVP&                  pRpVP(                  pV	Ee   V
Ee   S P+                  V
S P                   P,                  S P                   P,                  V
P                   R,          ^,           R7      ^ ,          p
V	P/                  R^4      p	V
P1                  ^^4      P3                  RV
P                   ^,          4      p
\        P                  ! Wš.^R7      pVRRR13,          pVP/                  R^VP                   R,          4      pS P4                  ! RRVRVR	VRV
/VB pVVP(                  ,          pV'       g.   VP7                  4       pVe   VVP7                  4       ,          pV# \9        VP(                  VP:                  TVP<                  VP>                  VP@                  Vf   RMVP(                  Vf   RMVP:                  Vf   RMVP<                  Vf   RMVP>                  Vf   RR7      # VP@                  R7      # u uppi u uppi u uppi )a™
  
user_input_values (`torch.Tensor `of shape `(batch_size, 1, audio_sequence_length), *optional*):
    The audio waveforms used as audio user prompt for the generation.
user_audio_codes (`torch.Tensor `of shape `(batch_size, num_codebooks, sequence_length), *optional*):
    The audio codes used as audio user prompt for the generation. Has priority over `user_input_values` and represents the audio "tokens" of `user_input_values` once passed through the audio encoder.
moshi_input_values (`torch.Tensor `of shape `(batch_size, 1, audio_sequence_length), *optional*):
    The audio waveforms used as audio Moshi prompt for the generation.
moshi_audio_codes (`torch.Tensor `of shape `(batch_size, num_codebooks, sequence_length), *optional*):
    The audio codes used as audio Moshi prompt for the generation. Has priority over `moshi_input_values` and represents the audio "tokens" of `moshi_input_values` once passed through the audio encoder.
inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
    Optionally, instead of passing `input_ids` you can choose to directly pass an embedded
    representation. If `past_key_values` is used, optionally only the last `inputs_embeds` have to be
    input (see `past_key_values`). This is useful if you want more control over how to convert
    `input_ids` indices into associated vectors than the model's internal embedding lookup matrix.

    If `input_ids` and `inputs_embeds` are both unset, `inputs_embeds` takes the value
    of `inputs_embeds`.
text_labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Labels for text language modeling. Note that the labels **are shifted** inside the model, i.e. you can set
    `labels = input_ids` Indices are selected in `[-100, 0, ..., config.vocab_size]` All labels set to `-100`
    are ignored (masked), the loss is only computed for labels in `[0, ..., config.vocab_size]`
audio_labels (`torch.LongTensor` of shape `(batch_size, num_codebooks, sequence_length)`, *optional*):
    Labels for language modeling. Note that the labels **are shifted** inside the model, i.e. you can set
    `labels = input_ids` Indices are selected in `[-100, 0, ..., config.vocab_size]` All labels set to `-100`
    are ignored (masked), the loss is only computed for labels in `[0, ..., config.audio_vocab_size]`

Examples:
```python
>>> from transformers import MoshiForConditionalGeneration
>>> import torch

>>> model = MoshiForConditionalGeneration.from_pretrained("kmhf/hf-moshiko")
>>> inputs = moshi.get_unconditional_inputs()

>>> logits = model(**inputs, ).logits
>>> logits.shape  # (bsz, seq_len, text_vocab_size)
torch.Size([1, 1, 32000])
```NÚaudio_encoder_Údecoder_Údepth_decoder_Únum_quantizersrÓ   z`You must provide at least one of `input_ids`, `inputs_embeds`, `input_values` and `audio_codes`.c              3   óh   <"  € T F'  pSP                   V,          ! SR V3,          4      x € K)  	  R# 5i©rŒ   N©rw  ©rŒ  Úcodebookr-   rk   s   & €€r5   rŽ  Ú8MoshiForConditionalGeneration.forward.<locals>.<genexpr>v  ó1   øé € ð *ÙZuÈh�D×%Ñ% hÖ/°¸A¸x¸KÕ0H×IÐIÓZuùó   ƒ/2rY   r€  rN  r�  rO  r,   r‚  Trƒ  ©Úbos_token_idr¦  Ú
max_lengthrŒ   rG   rV   )rF   r(   rG   r,   r+   r*   rM   rN   rO   rP   rQ   r9   rp   )!rª   r‚  ÚitemsÚ
startswithÚlenrÄ  ÚencoderŸ   r.   rØ   r*  rÅ  rW  rw  Úsumru  r}   rÈ   r¦   rG   rF   Úbuild_delay_pattern_maskrv  rþ   rŽ   r  rÈ  Úto_tuplerK   r(   r,   r+   r*   )rk   rV   rY   rÎ  rW   rÏ  rX   r,   r€  rÐ  rÑ  rO  rN  r�  r‚  rÉ   Úargumentr  Úkwargs_audio_encoderÚkwargs_decoderÚkwargs_depth_decoderÚaudio_inputs_embedsÚdecoder_outputsÚdecoder_last_hidden_stateÚdepth_decoder_outputsÚ
final_lossÚdepth_input_idsrS  r-   s   f&&&&&&&&&&&&&&,            @r5   rz   Ú%MoshiForConditionalGeneration.forward  sã  ù€ ðr &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆð $*§<¡<¤>ô 
á#1‘�˜%Ø×"Ñ"Ð#3×4ô 3ˆH”SÐ)Ó*Õ+¨UÒ2Ù#1ð 	ñ  
ð GMÇlÁlÄnô
ÙFT±?°8¸UÐX`×XkÑXkÐlv×XwÔ.ˆH”S˜“_Ð&Ð'¨Ò.Ánð 	ñ 
ð $*§<¡<¤>ô 
á#1‘�˜%Ø×"Ñ"Ð#3×4ô 5ˆH”SÐ)Ó*Ð,Ð-¨uÒ4Ù#1ð 	ñ  
ð Ó Ø Ò,Ð1AÒ1IØ#'×#5Ñ#5×#<Ò#<Ø%ñ$Ø6:×6HÑ6Hð$ØL`ñ$àõ$Ð ð "Ò-Ð2CÒ2KØ$(×$6Ñ$6×$=Ò$=Ø&ñ%Ø7;×7IÑ7Ið%ØMañ%àõ%Ð!ô  Ÿ)š)Ð%6Ð$IÈqÔQˆKàÒ  [Ò%8Ü Øvóð ð Ò$Ø $§¡× 2Ñ 2× ?Ñ ?À	Ó J�àÒ&Ü&)õ *ÜZ_Ð`k×`qÑ`qÐrsÕ`tÔZuó*ó 'Ð#ð
 %Ò,ñ (à,¨}×/?Ñ/?Ð@S×@ZÑ@ZÓ/[Õ[ð ð Ÿ,š,ñ 

Ø)ð

à'ð

ð 0ð

ð "6ð	

ð
  ð

ð ,ð

ð ð

ð ð

ð ñ

ˆð %4×$EÑ$EÐ!à $ÐØ$×)Ñ)ˆ
ØÓ" |Ó'?ð  ×8Ñ8ØØ!Ÿ[™[×9Ñ9Ø!Ÿ[™[×9Ñ9Ø'×-Ñ-¨bÕ1°AÕ5ð	 9ó ð
 õˆLð &×*Ñ*¨2¨qÓ1ˆKð (×1Ñ1°!°QÓ7×?Ñ?ÀÀL×DVÑDVÐWXÕDYÓZˆLä#Ÿiši¨Ð(CÈÔKˆOà-¨a°°"°¨fÕ5ˆOð )B×(FÑ(FÀrÈ1ÐNg×NmÑNmÐnpÕNqÓ(rÐ%à$(×$6Ò$6ñ %Ø";ð%à)ð%ð  .ð%ð $ð	%ð
 'ñ%Ð!ð Ð/×4Ñ4Õ4ˆJçØ%×.Ñ.Ó0ˆGØ$Ò0ØÐ0×9Ñ9Ó;Õ;�ØˆNä7Ø ×%Ñ%Ø"×)Ñ)Ø7Ø+×;Ñ;Ø)×7Ñ7Ø&×1Ñ1Ø4Ò<‘tÐBW×B\ÑB\Ø!6Ò!>™ÐDY×D`ÑD`Ø*9Ò*A¡$À×GfÑGfØ(7Ò(?¡À_×EbÑEbØ%4Ò%<˜Tô
ð 	
ð CR×B\ÑB\ô
ð 	
ùóQ 
ùó
ùó 
s#   ²QÁQÂ QÂ!QÃ
Q#Ã+Q#c                óp   <€ V ^8„  d   QhRS[ P                  RS[RS[S[S[3,          RS[ P                  /# )r#   rV   Úgeneration_configrÉ   r¾   )r.   r0   r
   Údictr×   r   )r3   r4   s   "€r5   r6   rÀ  Å  sG   ø€ ÷ ñ á×#Ñ#ðñ ,ðñ ‘S™#�X•ð	ñ
 
×	Ñ	ñr8   c                óô  € VP                   pVP                  p\        P                  ! VP                  \        P
                  VP                  R 7      pVf   V# VRJ;'       d%    \        P                  ! W4      P                  4       pVRJ ;'       g&    \        P                  ! WT4      P                  4       ( pWx,          p	VP                  V4      P                  4       p
W©,          Wi( ,          ,           pV# )rÎ   N)
r¦  Úeos_token_idr.   ri   r}   Úlongr¦   ÚisinÚanyÚne)rk   rV   rõ  rÉ   r¦  rø  Údefault_attention_maskÚis_pad_token_in_inputsÚ&is_pad_token_not_equal_to_eos_token_idÚcan_infer_attention_maskÚattention_mask_from_paddingrY   s   &&&&        r5   Ú&_prepare_attention_mask_for_generationÚDMoshiForConditionalGeneration._prepare_attention_mask_for_generationÅ  sâ   € ð )×5Ñ5ˆØ(×5Ñ5ˆä!&§¢¨I¯O©OÄ5Ç:Á:ÐV_×VfÑVfÔ!gÐØÒØ)Ð)à".°dÐ":×!iÐ!iÄÇ
Â
È9Ó@c×@gÑ@gÓ@iÐØ2>À$Ð2F÷ 2ð 2ÌEÏJÊJØóM
ç
‰#‹%ðLÐ.ð $:Õ#bÐ Ø&/§l¡l°<Ó&@×&EÑ&EÓ&GÐ#ð (ÕBÐE[Ð^wÕEwÕwð 	ð Ðr8   c                óR  <€ V ^8„  d   QhRS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          R	S[R,          R
S[RS[/
# )r#   rV   NrÎ  rW   rÏ  rX   r€  rY   rõ  Úapply_delay_pattern_maskÚconcat_unconditional_inputs)r.   r0   r1   r/   r
   rB  )r3   r4   s   "€r5   r6   rÀ  Þ  sÇ   ø€ ÷ c
ñ c
á×#Ñ# dÕ*ðc
ñ !×,Ñ,¨tÕ3ðc
ñ  Ÿ,™,¨Õ-ð	c
ñ
 "×-Ñ-°Õ4ðc
ñ !Ÿ<™<¨$Õ.ðc
ñ ×(Ñ(¨4Õ/ðc
ñ Ÿ™ tÕ+ðc
ñ ,¨dÕ2ðc
ñ #'ðc
ñ &*ñc
r8   c                ó|  a a€ R pR pVf    Vf   Vf   Vf   Vf   Vf   \        R4      hVe	   V	'       dm   Ve3   Vf/   S P                  P                  VS P                  R7      ^ ,          pVe3   Vf/   S P                  P                  VS P                  R7      ^ ,          pVfÀ   V
'       d¸   S P	                  VP
                  ^ ,          R7      p\        P                  ! VP                  V.^R7      p\        P                  ! VP                  V.^R7      p\        P                  ! VP                  V.^R7      pVe%   \        P                  ! VP                  V.^R7      pVe	   V	'       d«   V	'       dN   VeJ   S P                  VS P                  P                  S P                  P                  VP                  R7      w  r;V	'       dN   VeJ   S P                  VS P                  P                  S P                  P                  VP                  R7      w  r\VEf   R pVeO   VeK   \        P                  ! WS.^R7      o\!        VV 3R l\#        SP
                  ^,          4       4       4      pMmVe4   Vo\!        VV 3R l\#        SP
                  ^,          4       4       4      pM6Ve3   Vo\!        VV 3R l\#        SP
                  ^,          4       4       4      pVe&   S P$                  P&                  P)                  V4      pVe(   Vf   TM WæP+                  VP,                  4      ,           pVVVVVVV3# )	Nz”You must provide at least one of `input_ids`, `user_input_values`, `moshi_input_values`, `user_audio_codes`, `moshi_audio_codes` or `inputs_embeds`.©rÖ  )Únum_samplesrÓ   rß  c              3   óh   <"  € T F'  pSP                   V,          ! SR V3,          4      x € K)  	  R# 5irØ  rÙ  rÚ  s   & €€r5   rŽ  ÚVMoshiForConditionalGeneration._prepare_inputs_embeds_for_generation.<locals>.<genexpr>   rÝ  rÞ  c              3   óh   <"  € T F'  pSP                   V,          ! SR V3,          4      x € K)  	  R# 5irØ  rÙ  rÚ  s   & €€r5   rŽ  r  %  rÝ  rÞ  c              3   óŠ   <"  € T F8  pSP                   V,          ! SR VSP                  ,           3,          4      x € K:  	  R# 5irØ  )rw  rŸ   rÚ  s   & €€r5   rŽ  r  *  s@   øé € ð *á$?˜ð ×%Ñ% hÖ/°¸A¸xÈ$×J\ÑJ\Õ?\Ð<\Õ0]×^Ð^Û$?ùs   ƒA A)r*  rÄ  rå  rŸ   Úget_unconditional_inputsr}   r.   rØ   rX   rW   rV   rY   rç  rª   rv  rá  ræ  ru  rÅ  rW  rw  rÈ   r¦   )rk   rV   rÎ  rW   rÏ  rX   r€  rY   rõ  r  r  Úuser_delay_pattern_maskÚmoshi_delay_pattern_maskÚunconditional_inputsrí  r-   s   f&&&&&&&&&&    @r5   Ú%_prepare_inputs_embeds_for_generationÚCMoshiForConditionalGeneration._prepare_inputs_embeds_for_generationÞ  s?  ù€ ð #'ÐØ#'Ð ð Ò!ØÒ!Ø!Ò)Ø Ò(Ø"Ò*Ø!Ò)äð góð ð
 Ò ×$<Ø Ò,Ð1AÒ1IØ#'×#5Ñ#5×#<Ñ#<Ð=NÐ_c×_qÑ_qÐ#<Ó#rÐstÕ#uÐ à!Ò-Ð2CÒ2KØ$(×$6Ñ$6×$=Ñ$=Ð>PÐae×asÑasÐ$=Ó$tÐuvÕ$wÐ!àÒ ×%@Ø#'×#@Ñ#@ÐM]×McÑMcÐdeÕMfÐ#@Ó#gÐ Ü %§	¢	Ð+?×+QÑ+QÐSdÐ*eÐklÔ mÐÜ$ŸyšyÐ*>×*OÑ*OÐQaÐ)bÐhiÔjÐÜŸ	š	Ð#7×#AÑ#AÀ9Ð"MÐSTÔUˆIØÒ)Ü!&§¢Ð,@×,OÑ,OÐQ_Ð+`ÐfgÔ!h�àÒ ×$<ß'Ð,<Ò,HØ<@×<YÑ<YØ$Ø!%§¡×!=Ñ!=Ø!%§¡×!=Ñ!=Ø0×;Ñ;ð	 =Zó =Ñ9Ð ÷ (Ð,=Ò,IØ>B×>[Ñ>[Ø%Ø!%§¡×!=Ñ!=Ø!%§¡×!=Ñ!=Ø0×;Ñ;ð	 ?\ó ?Ñ;Ð!ð Ó Ø"&ÐØÒ+Ð0AÒ0MÜ#ŸišiÐ):Ð(MÐSTÔU�Ü&)õ *ÜZ_Ð`k×`qÑ`qÐrsÕ`tÔZuó*ó 'Ñ#ð #Ò.Ø/�Ü&)õ *ÜZ_Ð`k×`qÑ`qÐrsÕ`tÔZuó*ó 'Ñ#ð "Ò-Ø.�Ü&)õ *ä$)¨+×*;Ñ*;¸AÕ*>Ô$?ó*ó 'Ð#ð
 Ò$Ø $§¡× 2Ñ 2× ?Ñ ?À	Ó J�à"Ò.ð %Ò,ñ (à,×/?Ñ/?Ð@S×@ZÑ@ZÓ/[Õ[ð ð ØØØØ#Ø$Øð
ð 	
r8   c                ó`  <€ V ^8„  d   QhRS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[R,          R	S[R,          R
S[R,          RS[ P                  /
# )r#   rV   NrÎ  rW   rÏ  rX   r€  Úreturn_audio_waveformsÚreturn_audio_codesr  r¾   )r.   r0   r1   r/   rB  )r3   r4   s   "€r5   r6   rÀ  D  sË   ø€ ÷ {
ñ {
á×#Ñ# dÕ*ð{
ñ !×,Ñ,¨tÕ3ð{
ñ  Ÿ,™,¨Õ-ð	{
ñ
 "×-Ñ-°Õ4ð{
ñ !Ÿ<™<¨$Õ.ð{
ñ ×(Ñ(¨4Õ/ð{
ñ !% t¥ð{
ñ ! 4�Kð{
ñ &*¨D¥[ð{
ñ 
×	Ñ	ñ{
r8   c
                ó<  <€ \        V R4      '       EdM   \        V P                  R4      '       Eg0   / V P                  n        RV P                  9   d   V P                  V P                  n        M¥V P                  P                  4        Uu. uF  q»R#9  g   K  VNK  	  up^ ,          pV P                  P	                  4        UUu/ uF6  w  rÞVP                  R4      '       g   K  V\        R4      R VR#9   d   TMTbK8  	  uppV P                  n        V P                  P	                  4        UUu/ uF   w  rÞVP                  R4      '       d   K  WÞbK"  	  uppV n        V
 Uu0 uF  qÿP                  R4      '       g   K  VkK  	  ppV Uu/ uF   qÿ\        R4      R V
P                  V4      bK"  	  ppV P                  ! V
P                  RR4      3/ V
B w  pp
V P                  VVVVVVV	R7      w  rrYVf   TMTpV	'       d   VP                  R$,          ^,           MVP                  R$,          pV
P                  R4      RJ ;'       d    VP                  RJpV
P                  R	4      RJ ;'       d    VP                  RJpT P                  TTTVf   R
MRVVR7      p\        VR4      '       d   VP                  pM*R	V P                   ^,           RV P                   ^,           RR/pVP#                  V4       TpV
P                  RR4      pVf   V P%                  VVV
R7      pV P'                  VVVVVVVVRV	R7
      w  ppppppp\(        P*                  ! VP                  ^ ,          ^\-        V P.                  P0                  V P.                  P2                  P4                  ,          4      3V P6                  V P8                  R7      pV P:                  P=                  VV P                   R7      ^ ,          pVe   TMV
P                  R4      V
R&   Ve   TMV
P                  R4      V
R&   \(        P>                  ! V\A        VPB                  VPD                  4      ^ R7      V n#        VPB                  ^8„  ;'       g    VPH                  pVPB                  ^8„  ;'       g    VPJ                  p\L        S)V `œ  ! R%R
VRVRVRVRVRVRVRV/V
B pV'       g1   V'       g)   V'       d   VPH                  '       g   VPP                  # V# V'       g   Tp MVPP                  p VPD                  ^8”  d$   \(        P>                  ! VVPD                  ^ R7      pVPB                  ^8”  Ed   VPR                  RRVP                  R$,          ) 13,          p!V PF                  RRVP                  R$,          R13,          p"V!RRR$13,          PU                  ^4      PW                  R$V P                   R$4      p#\(        PX                  ! V"^ V#R7      p"\(        P>                  ! VVPD                  ^ R7      p\(        PZ                  ! VV"3^R7      V n#        \(        P\                  ! V P^                  ^ V!R&,          R7      V n/        V P^                  Pa                  R$^V P^                  P                  R$,          4      p$V P                  PN                  ! R%RV$RV RR$R13,          Pa                  R$^4      /VB p%V%R',          PU                  ^4      p%\(        PZ                  ! V PF                  V%.^R7      V n#        V Pc                  V PF                  V4      p&VV P.                  Pd                  8g  p'V&V',          Pg                  V'P                  ^ ,          V P                   R$4      p&Rp(V'       d&   V P:                  Pi                  V&4      Pj                  p(V'       d   T&MRp&VPH                  '       d   \m        R%R V(R!V&/VB # \m        V(V V&R"7      # u upi u uppi u uppi u upi u upi )(a{
  
Generates sequences of text token ids and audio tokens ids.

Parameters:
    input_ids (`torch.Tensor `of shape `(batch_size, sequence_length), *optional*):
        The sequence used as a text prompt for the generation.
    user_input_values (`torch.Tensor `of shape `(batch_size, 1, audio_sequence_length), *optional*):
        The audio waveforms used as audio user prompt for the generation.
    user_audio_codes (`torch.Tensor `of shape `(batch_size, num_codebooks, sequence_length), *optional*):
        The audio codes used as audio user prompt for the generation. Has priority over `user_input_values` and represents the audio "tokens" of `user_input_values` once passed through the audio encoder.
    moshi_input_values (`torch.Tensor `of shape `(batch_size, 1, audio_sequence_length), *optional*):
        The audio waveforms used as audio Moshi prompt for the generation.
    moshi_audio_codes (`torch.Tensor `of shape `(batch_size, num_codebooks, sequence_length), *optional*):
        The audio codes used as audio Moshi prompt for the generation. Has priority over `moshi_input_values` and represents the audio "tokens" of `moshi_input_values` once passed through the audio encoder.
    inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
        Optionally, instead of passing `input_ids` and the audio inputs you can choose to directly pass an embedded representation. This
        is useful if you want more control over how to convert the inputs into associated vectors than the
        model's internal embedding lookup matrix.
    return_audio_waveforms (`bool`, *optional*, defaults to `True`):
        If `False`, won't generate the audio waveforms.
    return_audio_codes (`bool`, *optional*):
        If `True`, will also returns the generated audio codes, i.e the intermediate audio "tokens" which transforms to `audio_sequences` once passed through the audio decoder.
    concat_unconditional_inputs (`bool`, *optional*, defaults to `True`):
        If `False`, won't concatenate initial audio and text tokens.
    kwargs (`dict[str, Any]`, *optional*):
        Remaining dictionary of keyword arguments that are passed to the `generate` method. Refers to the
        original [`generate` docstrings](https://huggingface.co/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationMixin.generate)
        for more information on how to use them.
        Note that keywords with a *depth_* prefix will be input for the `generate` method of the
        depth decoder. Otherwise, the latter will use its default generation config.
Return:
    [`MoshiConditionalGenerationGenerateOutput`]
Úhf_device_mapÚ rÈ  NrÕ  rõ  )rV   rÎ  rW   rÏ  rX   r€  r  rá  Ú
min_lengthr€  rV   )rõ  Úhas_default_max_lengthÚhas_default_min_lengthÚmodel_input_nameÚinputs_tensorÚinput_ids_lengthrÇ  Úcache_implementationÚstaticrY   )rV   rõ  rÉ   T)
rV   rÎ  rW   rÏ  rX   r€  rY   rõ  r  r  rÎ   r  r  r  rÓ   Úblank_user_audio_codesrì  Úreturn_dict_in_generateÚoutput_scoresrŒ   )r^   ÚindexrG   r$   r-   )r$   r%   r-   )rÐ   Údiskrp   r9   )rŒ   rp   ©rŒ   r¸  )7ÚhasattrrÈ  r  Úvaluesrâ  rã  rä  ÚpopÚ_prepare_generation_configÚ"_check_and_maybe_initialize_inputsr}   Úgetrá  r  Ú_prepare_generated_lengthrÇ  rŸ   r7  r  r  r.   Úzerosr`   rª   Úsampling_raterÃ  Ú
frame_raterÃ   r¦   rÄ  rå  Úrepeat_interleaveÚmaxÚ	num_beamsÚnum_return_sequencesÚgenerated_audio_codesr#  r$  re   Úgenerater%   r)   rè   rÔ   ÚgatherrØ   r�   rG   rþ   r  rv  r  ÚdecodeÚaudio_valuesr!   )*rk   rV   rÎ  rW   rÏ  rX   r€  r  r  r  rÉ   ÚdÚmain_devicer  r  ré  Údepth_decoder_kwargs_keysrì  rõ  Úinputsr  r  r  Údepth_decoder_generation_configrY   r  r  Úblank_input_valuesr"  r#  r$  rS  Úoutput_text_idsr)   r6  Úexpanded_beam_indicesrG   Úlast_generated_audio_codesÚoutput_audio_codesÚmaskÚoutput_valuesrl   s*   &&&&&&&&&&,                              €r5   r7  Ú&MoshiForConditionalGeneration.generateC  sQ  ø€ ô` �4˜×)Ó)´'¸$×:LÑ:LÈo×2^Ó2^Ø/1ˆD×ÑÔ,Ø�T×'Ñ'Ô'Ø37×3EÑ3E�×"Ñ"Õ0à*.×*<Ñ*<×*CÑ*CÔ*EÓbÑ*E QÐRaÑIaŸq˜qÑ*EÑbÐcdÕe�ð '+×&8Ñ&8×&>Ñ&>Ô&@ô4á&@™
˜Ø—~‘~ o×6ô d�Cœ˜OÓ,Ð.Ð/ÀÈÔ@X±Ð^cÒcÙ&@ò4�×"Ñ"Ô0ð .2×-?Ñ-?×-EÑ-EÔ-Gô"Ù-G™z˜sÈsÏ~É~Ð^m×On”
�’
Ñ-Gò"ˆDÔñ ?EÓ$n¹f°(×H[ÑH[Ð\l×Hm§X X¹fÐ!Ð$náTmó 
ÙTmÈ”SÐ)Ó*Ð,Ð-¨v¯z©z¸(Ó/CÒCÑTmð 	ð  
ð
 %)×$CÒ$CÀFÇJÁJÐObÐdhÓDiÑ$tÐmsÑ$tÑ!Ð˜6ð ×3Ñ3Ø#Ø"3Ø!1Ø#5Ø"3Ø+Ø,Gð 4ó ñ 	Tˆ	Ð%6ð #,Ò"3‘¸ˆç3N˜6Ÿ<™<¨Õ+¨aÖ/ÐTZ×T`ÑT`ÐacÕTdÐØ!'§¡¨LÓ!9¸TÐ!A×!nÐ!nÐFW×FbÑFbÐjnÐFnÐØ!'§¡¨LÓ!9¸TÐ!A×!nÐ!nÐFW×FbÑFbÐjnÐFnÐØ ×:Ñ:Ø/Ø#9Ø#9Ø09Ò0A™_À{Ø Ø-ð ;ó 
Ðô Ð$Ð&<×=Ò=Ø.?×.TÑ.TÑ+ð ˜d×0Ñ0°1Õ4Ø˜d×0Ñ0°1Õ4Ø&¨ð/Ð+ð 	(×.Ñ.Ð/CÔDØ>ÐàŸ™Ð$4°dÓ;ˆØÒ!Ø!×HÑHØ#Ø"3Øð Ió ˆNð ×6Ñ6ØØ/Ø-Ø1Ø/Ø'Ø)Ø/Ø%)Ø(Cð 7ó 
ñ	
ØØØØØ#Ø$Øô #Ÿ[š[Ø× Ñ  Õ# Q¬¨D¯K©K×,EÑ,EÈÏÉ×HhÑHh×HsÑHsÕ,sÓ(tÐuØ—*‘*Ø—;‘;ô
Ðð
 "&×!3Ñ!3×!:Ñ!:Ð;MÐ^b×^pÑ^pÐ!:Ó!qÐrsÕ!tÐð (?Ò'JÑ#ÐPV×PZÑPZÐ[tÓPuð 	Ð(Ñ)ð
 (Ò3ñ %à—‘Ð6Ó7ð 	Ð)Ñ*ô &+×%<Ò%<ØœsÐ#4×#>Ñ#>Ð@Q×@fÑ@fÓgÐmnô&
ˆÔ"ð #4×"=Ñ"=ÀÑ"A×"nÐ"nÐEV×EnÑEnÐØ)×3Ñ3°aÑ7×ZÐZÐ;L×;ZÑ;ZˆÜ‘'Ò"ñ 

Ø'ð

àð

ð 0ð

ð $:ð	

ð
 "6ð

ð %<ð

ð (ð

ð *ð

ð ñ

ˆ÷ &×.@ß&Ð/@×/X×/XÐ/XØ×(Ñ(Ð(ØˆN÷ 'Ø%‰Oà%×/Ñ/ˆOà×1Ñ1°AÔ5Ü',×'>Ò'>Ø(Ð*;×*PÑ*PÐVWô(Ð$ð ×&Ñ&¨Õ*ð #×/Ñ/°Ð3QÐ6G×6MÑ6MÈbÕ6QÐ5QÐ3QÐ0QÕRˆLà$(×$>Ñ$>¸qÀ!ÐEV×E\ÑE\Ð]_ÕE`ÑEbÐ?bÕ$cÐ!ð %1°°C°R°C°Õ$8×$BÑ$BÀ1Ó$E×$LÑ$LÈRÐQU×QcÑQcÐegÓ$hÐ!Ü$)§L¢LÐ1FÈAÐUjÔ$kÐ!ô !&× 7Ò 7Ø!Ð#4×#IÑ#IÈqô!Ðô */¯ªÐ4EÐG\Ð3]ÐcdÔ)eˆDÔ&ô &+×%7Ò%7¸×8NÑ8NÐTUÐ]iÐjoÕ]pÔ%qˆDÔ"ð !×2Ñ2×7Ñ7¸¸A¸t×?UÑ?U×?[Ñ?[Ð\^Õ?_Ó`Ðà%)×%7Ñ%7×%@Ò%@ñ &
Ø/ð&
à% a¨© fÕ-×2Ñ2°2°qÓ9ð&
ð #ñ&
Ð"ð &@ÀÕ%F×%PÑ%PÐQRÓ%SÐ"ä%*§Y¢Y°×0JÑ0JÐLfÐ/gÐmnÔ%oˆÔ"ð "×:Ñ:¸4×;UÑ;UÐWoÓpÐð (¨4¯;©;×+GÑ+GÑGˆà/°Õ5×=Ñ=¸d¿j¹jÈ½mÈT×M_ÑM_ÐacÓdÐàˆß!Ø ×.Ñ.×5Ñ5Ø"óç‰lð ÷ 4FÑ/È4Ðà×4×4Ð4Ü;ñ Ø -ðØ;MðØQXñð ô 8Ø)°_ÐRdô
ð 	
ùòK cùó4ùó"ùò %oùò 
s6   Â`Â`Ã`Ã&`Ä2`Å`Å%`Æ`Æ&`c                óB   <€ V ^8„  d   QhRS[ P                  R,          /# )r#   r"  N)r.   r1   )r3   r4   s   "€r5   r6   rÀ  A  s%   ø€ ÷ Fñ Fñ !&× 1Ñ 1°DÕ 8ñFr8   c                ó6  <€ \         SV `  ! V3R VRVRVRVRVRVRVRV	RV
R	VR
V/VB pVR,          Eee   VP                  R4      pVP                  R^VP                  R,          4      pVP                  R4      pV P
                  P                  ! RRVRVP                  R^4      /V
B pVR,          P                  ^4      pV P                  \        P                  ! V P                  VP                  V P                  P                  4      .^R7      V4      RRRR13,          pV P                  \        P                  ! V P                  V.^R7      V	4      V n        V P                  WP                  RRRR13,          VR7      w  p     pRVR&   WNR&   V# )r,   rY   r€  rÛ   rO  rµ  r  r  rì  Úis_first_iterationr"  rV   NrG   rŒ   rÓ   )rX   rW   rp   r9   r'  )re   Úprepare_inputs_for_generationr*  rþ   r}   rÈ  r7  rè   r  r.   rØ   r6  rÈ   r¦   r  )rk   rV   r,   rY   r€  rÛ   rO  rµ  r  r  rì  rJ  r"  rÉ   Úmodel_inputsrG   r6  rW   r  rl   s   &&&&&&&&&&&&&,     €r5   rK  Ú;MoshiForConditionalGeneration.prepare_inputs_for_generationA  s  ø€ ô$ ‘wÒ<Øñ
à+ð
ð *ð
ð (ð	
ð
 &ð
ð  ð
ð *ð
ð %<ð
ð &>ð
ð "6ð
ð  2ð
ð $:ð
ð ñ
ˆð& ˜Õ$Ó0Ø &§
¡
Ð+>Ó ?Ðà 1× 6Ñ 6°r¸1Ð>O×>UÑ>UÐVXÕ>YÓ ZÐà$×(Ñ(¨Ó5ˆIà$(×$6Ñ$6×$?Ò$?ñ %Ø"3ð%à#Ÿ.™.¨¨QÓ/ð%ð 'ñ%Ð!ð %:¸%Õ$@×$JÑ$JÈ1Ó$MÐ!à#×<Ñ<Ü—	’	Ø×/Ñ/Ð1G×1JÑ1JÈ4×KeÑKe×KlÑKlÓ1mÐnÐtuôð (ó	 ð
 ��B‘Cˆiõ Ðð *.×)FÑ)FÜ—	’	˜4×5Ñ5Ð7LÐMÐSTÔUÐWoó*ˆDÔ&ð /3×.XÑ.XØ×-GÑ-GÈÈ1ÈbÉcÈ	Õ-RÐeuð /Yó /Ñ+ˆM˜1˜a  A q¨!ð )-ˆL˜Ñ%Ø,9˜Ñ)àÐr8   c                ód   <€ V ^8„  d   QhRS[ RS[S[S[3,          RS[RS[RS[S[S[3,          /# )r#   rS  Úmodel_kwargsÚis_encoder_decoderÚnum_new_tokensr¾   )r   rö  r×   r   rB  r`   )r3   r4   s   "€r5   r6   rÀ  ‰  sM   ø€ ÷ ñ áðñ ™3¡˜8•nðñ !ð	ñ
 ðñ 
‰c‘3ˆh�ñr8   c                ó�   <€ \         SV `  WW44      pVP                  R 4      RRR13,          P                  4       pWRR &   WPn        V# )rG   rŒ   Nrp   )re   Ú#_update_model_kwargs_for_generationr-  r¹   rG   )rk   rS  rO  rP  rQ  rG   rl   s   &&&&& €r5   rS  ÚAMoshiForConditionalGeneration._update_model_kwargs_for_generation‰  sU   ø€ ô ‘wÑBØÐ#5ó
ˆð $ŸK™KÐ(;Ó<¸QÀÁ¸VÕD×JÑJÓLÐØ,=Ð(Ñ)à!2ÔØÐr8   c                ó6   € V P                   P                  4       # rd   )rÅ  Úget_input_embeddingsr~   s   &r5   rV  Ú2MoshiForConditionalGeneration.get_input_embeddings�  s   € Ø�|‰|×0Ñ0Ó2Ð2r8   c                ó<   € V P                   P                  V4       R # rd   )rÅ  Úset_input_embeddings)rk   r  s   &&r5   rY  Ú2MoshiForConditionalGeneration.set_input_embeddings   s   € Ø�‰×)Ñ)¨%Ö0r8   c                ó6   € V P                   P                  4       # rd   )rÅ  Úget_output_embeddingsr~   s   &r5   r\  Ú3MoshiForConditionalGeneration.get_output_embeddings£  s   € Ø�|‰|×1Ñ1Ó3Ð3r8   c                ó<   € V P                   P                  V4       R # rd   )rÅ  Úset_output_embeddings)rk   Únew_embeddingss   &&r5   r_  Ú3MoshiForConditionalGeneration.set_output_embeddings¦  s   € Ø�‰×*Ñ*¨>Ö:r8   c                óx   € V P                   P                  4        F
  pRVn        K  	  RV P                   n        R# )z#
Freeze the audio encoder weights.
FN)rÄ  Ú
parametersÚrequires_gradÚ_requires_grad©rk   Úparams   & r5   Úfreeze_audio_encoderÚ2MoshiForConditionalGeneration.freeze_audio_encoder©  ó3   € ð ×'Ñ'×2Ñ2Ö4ˆEØ"'ˆEÖñ 5à,1ˆ×ÑÖ)r8   c                óx   € V P                   P                  4        F
  pRVn        K  	  RV P                   n        R# )z#
Freeze the depth encoder weights.
FN)rÈ  rc  rd  re  rf  s   & r5   Úfreeze_depth_decoderÚ2MoshiForConditionalGeneration.freeze_depth_decoder±  rj  r8   c                óz   € V P                   R,          pVRRV13,          p\        P                  ! VR8H  W4      p V # )z¦Apply a delay pattern mask to the decoder input ids, only preserving predictions where
the mask is set to -1, and otherwise setting to the value detailed in the mask..Nrp   )r}   r.   Úwhere)rV   Údecoder_pad_token_maskÚseq_lens   && r5   r  Ú6MoshiForConditionalGeneration.apply_delay_pattern_mask¹  sA   € ð
 —/‘/ "Õ%ˆØ!7¸¸X¸g¸X¸Õ!FÐÜ—K’KÐ 6¸"Ñ <¸iÓ`ˆ	ØÐr8   c          	      óT   <€ V ^8„  d   QhRS[ P                  RS[RS[RS[R,          /# )r#   rV   rà  r¦  rá  N)r.   r0   r`   )r3   r4   s   "€r5   r6   rÀ  Ã  s9   ø€ ÷ +'ñ +'Ù×)Ñ)ð+'Ù9<ð+'ÙLOð+'Ù]`ÐcgÕ]gñ+'r8   c                óŠ  € VP                   w  rVpVe   TMV P                  P                  p\        P                  ! WVV3\        P
                  VP                  R7      R,          p\        Wt^,
          4      p	VR^ RV	13,          VR^ RV	13&   VRRRV	13,          VRR^V	^,           13&   W(R&   W8R&   Tp
VRRV	13,          pW3# )	aÁ  Build a delayed pattern mask to the input_ids. Each codebook, except the first one, is offset by
one, giving a delayed pattern mask at the start of sequence and end of sequence. Take the example where there
are 4 codebooks and a max sequence length of 6, we have the delayed pattern mask of shape `(codebooks,
seq_len)`:
- [-1, -1, -1, -1, -1,  P]
- [ B, -1, -1, -1, -1, -1]
- [ B, -1, -1, -1, -1, -1]
- [ B, -1, -1, -1, -1, -1]
where B is the beginning-of-sentence token, P is the special padding token id and -1 indicates that the token is valid for prediction. If we include
a prompt (input ids), the -1 positions indicate where new tokens should be predicted. Otherwise, the
mask is set to the value in the prompt:
- [ a0, a1, -1, -1, -1,  P]
- [ B,  b0, b1, -1, -1, -1]
- [ B,  c0, c1, -1, -1, -1]
- [ B,  d0, d1, -1, -1, -1]
where a-d indicate the codebook channel and 0/1 indicates the temporality. Now, we only override the -1
tokens in our prediction.
NrÎ   rŒ   r¸  .rp   )rŒ   r¸  rý   )rŒ   rý   rp   )r}   rõ  rá  r.   ri   rù  r¦   Úmin)rk   rV   rà  r¦  rá  ÚbszrŸ   rq  Úinput_ids_shiftedÚseq_len_to_keepÚpattern_masks   &&&&&      r5   rç  Ú6MoshiForConditionalGeneration.build_delay_pattern_maskÃ  s÷   € ð* '0§o¡oÑ#ˆ˜Gà#-Ò#9‘Z¸t×?UÑ?U×?`Ñ?`ˆ
ä�JŠJ˜¨JÐ7¼u¿z¹zÐR[×RbÑRbÔcÐfhÕhð 	ô
 ˜g°A¥~Ó6ˆØ4=¸aÀÐDTÀ_ÐDTÐ>TÕ4UÐ˜!˜QÐ 0 Ð 0Ð0Ñ1ð =FÀaÈÐM]ÈoÐM]ÐF]Õ<^Ð˜!˜R  _°qÕ%8Ð!8Ð8Ñ9ð '3˜(Ñ#Ø&2˜(Ñ#ð )ˆà% cÐ+;¨OÐ+;Ð&;Õ<ˆ	ØÐ&Ð&r8   c                ó‚  € \         P                  ! V^3V P                  \         P                  R7      V P                  P
                  ,          p\         P                  ! WP                  ^3V P                  \         P                  R7      V P                  P                  ,          p\         P                  ! WP                  ^3V P                  \         P                  R7      V P                  P                  ,          p\         P                  ! V^3V P                  \         P                  R7      p\        VVVVR7      # )a`  
Helper function to get null inputs for unconditional generation, enabling the model to be used without the
feature extractor or tokenizer.

Args:
    num_samples (int, *optional*):
        Number of audio samples to unconditionally generate.
    max_new_tokens (int, *optional*):
        Number of tokens to generate for each sample. More tokens means longer audio samples, at the expense of
        longer inference (since more audio tokens need to be generated per sample).

Example:
```python
>>> from transformers import MoshiForConditionalGeneration

>>> model = MoshiForConditionalGeneration.from_pretrained("kmhf/hf-moshiko-pytorch-bf16")

>>> # get the unconditional (or 'null') inputs for the model
>>> unconditional_inputs = model.get_unconditional_inputs(num_samples=1)
>>> audio_samples = model.generate(**unconditional_inputs, max_new_tokens=256)
```)r¦   rÃ   )rV   rW   rX   rY   )
r.   ri   r¦   Úint64rª   rr  rŸ   rv  rù  rT   )rk   r	  rV   rW   rX   rY   s   &&    r5   r  Ú6MoshiForConditionalGeneration.get_unconditional_inputsð  sî   € ô. —J’J ¨QÐ/¸¿¹Ì5Ï;É;ÔWÐZ^×ZeÑZe×ZpÑZpÕpˆ	ä�JŠJ˜×%7Ñ%7¸Ð;ÀDÇKÁKÔW\×WbÑWbÔcØ�k‰k×*Ñ*õ+ð 	ô
 �JŠJ˜×%7Ñ%7¸Ð;ÀDÇKÁKÔW\×WbÑWbÔcØ�k‰k×*Ñ*õ+ð 	ô Ÿš [°!Ð$4¸T¿[¹[ÔPU×PZÑPZÔ[ˆä&ØØ-Ø/Ø)ô	
ð 	
r8   c                óZ  € Vf   TMTpVf   TMTp	Vf   TMTp
V	R J;'       g    V
R J;'       g    VR JpT;'       d    VR J;'       d    VR J '       * pV'       d   V	f   \        R4      hV'       d   V
f   \        R4      hV'       d   Vf   \        R4      hV'       g8   V P                  4       pVP                  pVP                  pVP                  pRpMÑV	P
                  R,          pV
P
                  R,          pVP
                  ^,          pV P                  P                  P                  V P                  P                  ,          pVf   \        P                  ! VV,          4      MTpVf   \        P                  ! VV,          4      MTpWþ8w  g   Wý8w  d   \        R4      hWWW3# )Na  No user audio inputs have been passed alongside the other inputs. Make sure either `user_input_values` or `user_audio_codes` is passed or use `MoshiForConditionalGeneration.get_unconditional_inputs`. Check the `MoshiForConditionalGeneration` docstrings for more information.a  No Moshi audio inputs have been passed alongside the other inputs. Make sure either `moshi_input_values` or `moshi_audio_codes` is passed or use `MoshiForConditionalGeneration.get_unconditional_inputs`. Check the `MoshiForConditionalGeneration` docstrings for more information.zúNo `input_ids` or `inputs_embeds` have been passed alongside the other inputs. Make sure `input_ids` is passed or use `MoshiForConditionalGeneration.get_unconditional_inputs`. Check the `MoshiForConditionalGeneration` docstrings for more information.FzõAt least one of the 3 inputs of `MoshiForConditionalGeneration` doesn't have the same sequence length as the others.Make sure that they all have the same sequence length. Check the `MoshiForConditionalGeneration` docstrings for more information.rp   )r*  r  rV   rW   rX   r}   rª   rÃ  r1  r0  r(  Úceil)rk   rV   rÎ  rW   rÏ  rX   r€  r  r>  Ú
user_inputÚmoshi_inputÚone_input_has_been_passedr  Úuser_seq_lengthÚmoshi_seq_lengthÚtokens_seq_lengthÚratios   &&&&&&&&         r5   r,  Ú@MoshiForConditionalGeneration._check_and_maybe_initialize_inputs  sÑ  € ð ,Ò3‘¸ˆØ):Ò)BÑ%ÐHYˆ
Ø+=Ò+EÑ'ÐK]ˆà%/°tÐ%;×$qÐ$qÀÐTXÐAX×$qÐ$qÐ^dÐlpÐ^pÐ!ð 'B÷ '
ð '
Ø Ð%×;Ð;¨)°tÐ*;ôG
Ð#÷
 %¨*Ò*<Üð eóð ÷ '¨KÒ,?Üð hóð ÷ '¨FªNÜð Móð ÷ +à#'×#@Ñ#@Ó#BÐ Ø,×6Ñ6ˆIØ3×DÑDÐØ 4× FÑ FÐð +0Ñ'ð )×.Ñ.¨rÕ2ˆOØ*×0Ñ0°Õ4ÐØ &§¡¨Q¥Ðà—K‘K×4Ñ4×?Ñ?À$Ç+Á+×B[ÑB[Õ[ˆEØFWÒF_œtŸyšyÐ)9¸EÕ)AÔBÐeuÐØDTÒD\œdŸiši¨¸%Õ(?Ô@ÐbqˆOà Ô4Ð8IÔ8\Ü ðXóð ð
 Ð,=ÐZÐZr8   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # r©   r«   )r3   r4   s   "€r5   r6   rÀ  ô  s   ø‡ ‚ ñ Ñò r8   )rÄ  rÅ  rÈ  rw  r6  r  rG   rŸ   r_  )NNNNNNNNNNNNNN)
NNNNNNNNFF)	NNNNNNTNT)NNNNTrý   NNNFN)Frò   rd   ©rò   )NNNNNNN)%r:   r;   r<   r=   Úoutput_modalitiesrj  rd  rf  rg  rh  ri  rf   rË  r   rz   r  r  r.   râ   r7  rK  rS  rV  rY  r\  r_  rh  rl  rá   r  rç  r  r,  r?   r@   rA   r�   r‚   s   @@r5   r¾  r¾  ô  sý   ù‡ € ð *ÐØ!€OØ&*Ð#ØÐØ€NØÐØ"&Ð÷ó ò"ð ÷n
ñ n
ó ðn
÷`ð ÷2c
ò c
ðJ ‡]‚]ƒ_÷{
ô {
ó ð{
÷zFõ F÷Põ ò(3ò1ò4ò;ò2ò2ð ñó ð÷+'ò +'ôZ'
ôR;[÷K … r8   r¾  r‰  )r6  )r°  r¾  r¢  rV  )Nr>   r(  Úcollections.abcr   Údataclassesr   Útypingr   r.   Útorch.nnrg   r   r  r   rZ  Úactivationsr   Úcache_utilsr   r	   Ú
generationr
   r   Úmasking_utilsr   Úmodeling_layersr   Úmodeling_outputsr   r   r   r   Úmodeling_rope_utilsr   r   Úmodeling_utilsr   r   Úprocessing_utilsr   Úutilsr   r   r   Úutils.deprecationr   Úutils.genericr   Úauto.modeling_autor   Úconfiguration_moshir   r   Ú
get_loggerr:   r‘  r!   rD   rK   rT   r  r\   r„   r–   r¥   ræ   rî   rð   r
  r  r!  r@  rV  rl  r¢  r°  r¾  Ú__all__r9   r8   r5   Ú<module>rŸ     sQ  ðñ ã Ý $Ý !Ý ã Ý Ý %å &Ý !ß .ß ;Ý /Ý 9ß mÓ mß Kß FÝ &ß @Ñ @Ý 0Ý +Ý *ß >ð 
×	Ò	˜HÓ	%€ñ ðôð
 ô+0¨{ó +0ó óð+0ñ\ ðôð
 ô< +ó <ó óð<ñ* ðôð
 ô"B¨{ó "Bó óð"BðJ Ø
ô3˜kó 3ó ó ð3ô(=�2—9‘9ô =ô&$˜"Ÿ)™)ô $ôN"�"—)‘)ô "ô&6<˜2Ÿ9™9ô 6<òt(ôô2�R—Y‘Yô õ4	U÷%ô2Q)�R—Y‘Yô Q)ôl:Ð2ô :ðz ô(˜?ó (ó ð(ô(P
Ð,¨oô P
ðf ôk
Ð%ó k
ó ðk
ñ\ ðôô
]
Ð+¨_ó ]
óð
]
ñ@ ðôô
[[Ð$8¸/ó [[óð
[[ò| f‚r8   