Ë
    T^(h™B ã                   óL  — d Z ddlZddlZddlmZmZmZmZ ddlZddl	Zddlm
Z
 ddlmZmZmZ ddlmZ ddlmZ dd	lmZmZmZmZ dd
lmZmZmZmZmZmZ ddlm Z  ddl!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z' ddl(m)Z)  e&jT                  e+«      Z,dZ-dZ.dej^                  de0fd„Z1 G d„ de
jd                  «      Z3 G d„ de
jd                  «      Z4 G d„ de
jj                  «      Z6 G d„ de
jj                  «      Z7de6iZ8 G d„ de
jj                  «      Z9 G d„ d e
jj                  «      Z: G d!„ d"e «      Z;d#Z<d$Z=d%Z> G d&„ d'e;«      Z? G d(„ d)e;«      Z@ e$d*e<«       G d+„ d,e;«      «       ZA e$d-e<«       G d.„ d/e;e«      «       ZB e$d0e<«       G d1„ d2e;«      «       ZC G d3„ d4e;«      ZD G d5„ d6e;e«      ZEg d7¢ZFy)8zPyTorch PLBART model.é    N)ÚListÚOptionalÚTupleÚUnion)Únn)ÚBCEWithLogitsLossÚCrossEntropyLossÚMSELossé   )ÚACT2FN)ÚGenerationMixin)Ú_prepare_4d_attention_maskÚ#_prepare_4d_attention_mask_for_sdpaÚ!_prepare_4d_causal_attention_maskÚ*_prepare_4d_causal_attention_mask_for_sdpa)ÚBaseModelOutputÚ)BaseModelOutputWithPastAndCrossAttentionsÚ!CausalLMOutputWithCrossAttentionsÚSeq2SeqLMOutputÚSeq2SeqModelOutputÚSeq2SeqSequenceClassifierOutput)ÚPreTrainedModel)Úadd_code_sample_docstringsÚadd_end_docstringsÚadd_start_docstringsÚ%add_start_docstrings_to_model_forwardÚloggingÚreplace_return_docstringsé   )ÚPLBartConfigzuclanlp/plbart-baser    Ú	input_idsÚpad_token_idc                 óf  — | j                  «       }|€t        d«      ‚|j                  |dk(  |«       |j                  |«      j	                  d¬«      dz
  j                  d«      }|j                  d|«      j                  «       }|dd…dd…f   j                  «       |dd…dd…f<   ||dd…df<   |S )zÎ
    Shift input ids one token to the right, and wrap the last non pad token (the <LID> token) Note that MBart does not
    have a single `decoder_start_token_id` in contrast to other Bart-like models.
    Nz1self.model.config.pad_token_id has to be defined.iœÿÿÿr   ©Údiméÿÿÿÿr   )ÚcloneÚ
ValueErrorÚmasked_fill_ÚneÚsumÚ	unsqueezeÚgatherÚsqueeze)r!   r"   Úprev_output_tokensÚindex_of_eosÚdecoder_start_tokenss        úh/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/plbart/modeling_plbart.pyÚshift_tokens_rightr3   =   sÀ   € ð
 #Ÿ™Ó*ÐàÐÜÐLÓMÐMà×#Ñ#Ð$6¸$Ñ$>ÀÔMà&×)Ñ)¨,Ó7×;Ñ;ÀÐ;ÓBÀQÑF×QÑQÐRTÓU€LØ-×4Ñ4°Q¸ÓE×MÑMÓOÐØ 2²1°c°r°c°6Ñ :× @Ñ @Ó BÐ’q˜!™"�uÑØ3Ð’q˜!�tÑàÐó    c                   óV   ‡ — e Zd ZdZdedefˆ fd„Zddej                  defˆ fd„Zˆ xZ	S )	Ú PLBartLearnedPositionalEmbeddingzN
    This module learns positional embeddings up to a fixed maximum size.
    Únum_embeddingsÚembedding_dimc                 óN   •— d| _         t        ‰| �	  || j                   z   |«       y )Né   )ÚoffsetÚsuperÚ__init__)Úselfr7   r8   Ú	__class__s      €r2   r=   z)PLBartLearnedPositionalEmbedding.__init__W   s$   ø€ ð ˆŒÜ‰Ñ˜¨$¯+©+Ñ5°}ÕEr4   r!   Úpast_key_values_lengthc                 óü   •— |j                   dd \  }}t        j                  |||z   t        j                  | j                  j
                  ¬«      j                  |d«      }t        ‰| �!  || j                  z   «      S )z3`input_ids' shape is expected to be [bsz x seqlen].Nr:   )ÚdtypeÚdevicer&   )
ÚshapeÚtorchÚarangeÚlongÚweightrC   Úexpandr<   Úforwardr;   )r>   r!   r@   ÚbszÚseq_lenÚ	positionsr?   s         €r2   rJ   z(PLBartLearnedPositionalEmbedding.forward]   so   ø€ ð !—‘ r¨Ð*‰ˆˆWÜ—L‘LØ"Ð$:¸WÑ$DÌEÏJÉJÐ_c×_jÑ_j×_qÑ_qô
ç
‰&��b‹/ð 	ô ‰w‰˜y¨4¯;©;Ñ6Ó7Ð7r4   )r   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úintr=   rE   ÚTensorrJ   Ú__classcell__©r?   s   @r2   r6   r6   R   s:   ø„ ñðF sð F¸3õ Fñ8 §¡ð 8Às÷ 8ñ 8r4   r6   c            
       ó`   ‡ — e Zd ZdZd	dedededee   fˆ fd„Zdej                  fˆ fd„Z
ˆ xZS )
ÚPLBartScaledWordEmbeddingz\
    This module overrides nn.Embeddings' forward by multiplying with embeddings scale.
    r7   r8   Úpadding_idxÚembed_scalec                 ó6   •— t         ‰| �  |||«       || _        y ©N)r<   r=   rY   )r>   r7   r8   rX   rY   r?   s        €r2   r=   z"PLBartScaledWordEmbedding.__init__n   s   ø€ Ü‰Ñ˜¨¸ÔDØ&ˆÕr4   r!   c                 ó<   •— t         ‰| �  |«      | j                  z  S r[   )r<   rJ   rY   )r>   r!   r?   s     €r2   rJ   z!PLBartScaledWordEmbedding.forwardr   s   ø€ Ü‰w‰˜yÓ)¨D×,<Ñ,<Ñ<Ð<r4   )ç      ð?)rN   rO   rP   rQ   rR   r   Úfloatr=   rE   rS   rJ   rT   rU   s   @r2   rW   rW   i   sE   ø„ ññ' sð '¸3ð 'ÈSð 'Ð_gÐhmÑ_nõ 'ð= §¡÷ =ñ =r4   rW   c                   ó†  ‡ — e Zd ZdZ	 	 	 	 	 ddededededededee   fˆ fd	„Z	d
e
j                  dedefd„Z	 	 	 	 	 dde
j                  dee
j                     deee
j                        dee
j                     dee
j                     dedee
j                  ee
j                     eee
j                        f   fd„Zˆ xZS )ÚPLBartAttentionz=Multi-headed attention from 'Attention Is All You Need' paperÚ	embed_dimÚ	num_headsÚdropoutÚ
is_decoderÚbiasÚ	is_causalÚconfigc                 ó
  •— t         ‰| �  «        || _        || _        || _        ||z  | _        || _        | j
                  |z  | j                  k7  rt        d| j                  › d|› d�«      ‚| j
                  dz  | _        || _	        || _
        t        j                  |||¬«      | _        t        j                  |||¬«      | _        t        j                  |||¬«      | _        t        j                  |||¬«      | _        y )Nz;embed_dim must be divisible by num_heads (got `embed_dim`: z and `num_heads`: z).g      à¿©re   )r<   r=   ra   rb   rc   Úhead_dimrg   r(   Úscalingrd   rf   r   ÚLinearÚk_projÚv_projÚq_projÚout_proj)	r>   ra   rb   rc   rd   re   rf   rg   r?   s	           €r2   r=   zPLBartAttention.__init__z   sä   ø€ ô 	‰ÑÔØ"ˆŒØ"ˆŒØˆŒØ! YÑ.ˆŒØˆŒà�M‰M˜IÑ%¨$¯.©.Ò8ÜØMÈdÏnÉnÐM]Ø$ Y K¨rð3óð ð —}‘} dÑ*ˆŒØ$ˆŒØ"ˆŒä—i‘i 	¨9¸4Ô@ˆŒÜ—i‘i 	¨9¸4Ô@ˆŒÜ—i‘i 	¨9¸4Ô@ˆŒÜŸ	™	 )¨Y¸TÔBˆ�r4   ÚtensorrL   rK   c                 óŽ   — |j                  ||| j                  | j                  «      j                  dd«      j	                  «       S )Nr   r:   )Úviewrb   rj   Ú	transposeÚ
contiguous)r>   rq   rL   rK   s       r2   Ú_shapezPLBartAttention._shape™   s7   € Ø�{‰{˜3 ¨¯©¸¿¹ÓG×QÑQÐRSÐUVÓW×bÑbÓdÐdr4   Úhidden_statesÚkey_value_statesÚpast_key_valueÚattention_maskÚlayer_head_maskÚoutput_attentionsÚreturnc                 ó
  — |du}|j                  «       \  }}	}
| j                  |«      | j                  z  }|r0|�.|d   j                  d   |j                  d   k(  r|d   }|d   }�n
|rE| j	                  | j                  |«      d|«      }| j	                  | j                  |«      d|«      }nÃ|�}| j	                  | j                  |«      d|«      }| j	                  | j                  |«      d|«      }t        j                  |d   |gd¬«      }t        j                  |d   |gd¬«      }nD| j	                  | j                  |«      d|«      }| j	                  | j                  |«      d|«      }| j                  r||f}|| j                  z  d| j                  f} | j	                  ||	|«      j                  |Ž } |j                  |Ž } |j                  |Ž }|j                  d«      }t        j                  ||j                  dd«      «      }|j                  «       || j                  z  |	|fk7  r/t!        d|| j                  z  |	|f› d|j                  «       › �«      ‚|�{|j                  «       |d|	|fk7  r#t!        d	|d|	|f› d|j                  «       › �«      ‚|j                  || j                  |	|«      |z   }|j                  || j                  z  |	|«      }t"        j$                  j'                  |d¬«      }|�›|j                  «       | j                  fk7  r*t!        d
| j                  f› d|j                  «       › �«      ‚|j                  dddd«      |j                  || j                  |	|«      z  }|j                  || j                  z  |	|«      }|r?|j                  || j                  |	|«      }|j                  || j                  z  |	|«      }nd}t"        j$                  j)                  || j(                  | j*                  ¬«      }t        j                  ||«      }|j                  «       || j                  z  |	| j                  fk7  r9t!        d|| j                  z  |	| j                  f› d|j                  «       › �«      ‚|j                  || j                  |	| j                  «      }|j                  dd«      }|j                  ||	| j,                  «      }| j/                  |«      }|||fS )z#Input shape: Batch x Time x ChannelNr   r:   r   r&   r$   z$Attention weights should be of size z	, but is z!Attention mask should be of size z/Head mask for a single layer should be of size ©ÚpÚtrainingz `attn_output` should be of size )Úsizero   rk   rD   rv   rm   rn   rE   Úcatrd   rb   rj   rs   ÚreshapeÚbmmrt   r(   r   Ú
functionalÚsoftmaxrc   r�   ra   rp   )r>   rw   rx   ry   rz   r{   r|   Úis_cross_attentionrK   Útgt_lenÚ_Úquery_statesÚ
key_statesÚvalue_statesÚ
proj_shapeÚsrc_lenÚattn_weightsÚattn_weights_reshapedÚ
attn_probsÚattn_outputs                       r2   rJ   zPLBartAttention.forwardœ   s  € ð .°TÐ9Ðà'×,Ñ,Ó.‰ˆˆW�að —{‘{ =Ó1°D·L±LÑ@ˆñ ØÐ*Ø˜qÑ!×'Ñ'¨Ñ*Ð.>×.DÑ.DÀQÑ.GÒGð (¨Ñ*ˆJØ)¨!Ñ,ŠLÙàŸ™ T§[¡[Ð1AÓ%BÀBÈÓLˆJØŸ;™; t§{¡{Ð3CÓ'DÀbÈ#ÓN‰LØÐ'àŸ™ T§[¡[°Ó%?ÀÀSÓIˆJØŸ;™; t§{¡{°=Ó'AÀ2ÀsÓKˆLÜŸ™ N°1Ñ$5°zÐ#BÈÔJˆJÜ Ÿ9™9 n°QÑ&7¸Ð%FÈAÔN‰Lð Ÿ™ T§[¡[°Ó%?ÀÀSÓIˆJØŸ;™; t§{¡{°=Ó'AÀ2ÀsÓKˆLà�?Š?ð )¨,Ð7ˆNà˜DŸN™NÑ*¨B°·±Ð>ˆ
ØC�t—{‘{ <°¸#Ó>×CÑCÀZÐPˆØ'�Z×'Ñ'¨Ð4ˆ
Ø+�|×+Ñ+¨ZÐ8ˆà—/‘/ !Ó$ˆÜ—y‘y ¨z×/CÑ/CÀAÀqÓ/IÓJˆà×ÑÓ 3¨¯©Ñ#7¸À'Ð"JÒJÜØ6¸¸d¿n¹nÑ8LÈgÐW^Ð7_Ð6`ð aØ ×%Ñ%Ó'Ð(ð*óð ð
 Ð%Ø×"Ñ"Ó$¨¨a°¸'Ð(BÒBÜ Ø7¸¸aÀÈ'Ð8RÐ7SÐS\Ð]k×]pÑ]pÓ]rÐ\sÐtóð ð (×,Ñ,¨S°$·.±.À'È7ÓSÐVdÑdˆLØ'×,Ñ,¨S°4·>±>Ñ-AÀ7ÈGÓTˆLä—}‘}×,Ñ,¨\¸rÐ,ÓBˆàÐ&Ø×#Ñ#Ó%¨$¯.©.Ð):Ò:Ü ØEÀtÇ~Á~ÐFWÐEXð YØ'×,Ñ,Ó.Ð/ð1óð ð +×/Ñ/°°2°q¸!Ó<¸|×?PÑ?PÐQTÐVZ×VdÑVdÐfmÐovÓ?wÑwˆLØ'×,Ñ,¨S°4·>±>Ñ-AÀ7ÈGÓTˆLáð
 %1×$5Ñ$5°c¸4¿>¹>È7ÐT[Ó$\Ð!Ø0×5Ñ5°c¸D¿N¹NÑ6JÈGÐU\Ó]‰Là$(Ð!ä—]‘]×*Ñ*¨<¸4¿<¹<ÐRV×R_ÑR_Ð*Ó`ˆ
ä—i‘i 
¨LÓ9ˆà×ÑÓ #¨¯©Ñ"6¸ÀÇÁÐ!OÒOÜØ2°C¸$¿.¹.Ñ4HÈ'ÐSW×S`ÑS`Ð3aÐ2bð cØ×$Ñ$Ó&Ð'ð)óð ð
 "×&Ñ& s¨D¯N©N¸GÀTÇ]Á]ÓSˆØ!×+Ñ+¨A¨qÓ1ˆð "×)Ñ)¨#¨w¸¿¹ÓGˆà—m‘m KÓ0ˆàÐ1°>ÐAÐAr4   )ç        FTFN)NNNNF)rN   rO   rP   rQ   rR   r^   Úboolr   r    r=   rE   rS   rv   r   rJ   rT   rU   s   @r2   r`   r`   w   sM  ø„ ÙGð Ø ØØØ)-ñCàðCð ðCð ð	Cð
 ðCð ðCð ðCð ˜Ñ&õCð>e˜UŸ\™\ð e°Cð e¸có eð 48Ø8<Ø15Ø26Ø"'ñvBà—|‘|ðvBð # 5§<¡<Ñ0ðvBð !  u§|¡|Ñ!4Ñ5ð	vBð
 ! §¡Ñ.ðvBð " %§,¡,Ñ/ðvBð  ðvBð 
ˆu�|‰|˜X e§l¡lÑ3°X¸eÀEÇLÁLÑ>QÑ5RÐRÑ	S÷vBr4   r`   c                   ó¾   ‡ — e Zd Zdefˆ fd„Z	 d	dej                  dej                  dej                  dee   de	ej                  eej                     f   f
d„Z
ˆ xZS )
ÚPLBartEncoderLayerrg   c                 ó‚  •— t         ‰| �  «        |j                  | _        t	        |j
                     | j                  |j                  |j                  |¬«      | _        t        j                  | j                  «      | _        |j                  | _        t        |j                     | _        |j                   | _        t        j"                  | j                  |j$                  «      | _        t        j"                  |j$                  | j                  «      | _        t        j                  | j                  «      | _        y )N)ra   rb   rc   rg   )r<   r=   Úd_modelra   ÚPLBART_ATTENTION_CLASSESÚ_attn_implementationÚencoder_attention_headsÚattention_dropoutÚ	self_attnr   Ú	LayerNormÚself_attn_layer_normrc   r   Úactivation_functionÚactivation_fnÚactivation_dropoutrl   Úencoder_ffn_dimÚfc1Úfc2Úfinal_layer_norm©r>   rg   r?   s     €r2   r=   zPLBartEncoderLayer.__init__  sÜ   ø€ Ü‰ÑÔØŸ™ˆŒä1°&×2MÑ2MÑNØ—n‘nØ×4Ñ4Ø×,Ñ,Øô	
ˆŒô %'§L¡L°·±Ó$@ˆÔ!Ø—~‘~ˆŒÜ# F×$>Ñ$>Ñ?ˆÔØ"(×";Ñ";ˆÔÜ—9‘9˜TŸ^™^¨V×-CÑ-CÓDˆŒÜ—9‘9˜V×3Ñ3°T·^±^ÓDˆŒÜ "§¡¨T¯^©^Ó <ˆÕr4   rw   rz   r{   r|   r}   c                 ó¤  — |}| j                  ||||¬«      \  }}}t        j                  j                  || j                  | j                  ¬«      }||z   }| j                  |«      }|}| j                  | j                  |«      «      }t        j                  j                  || j                  | j                  ¬«      }| j                  |«      }t        j                  j                  || j                  | j                  ¬«      }||z   }| j                  |«      }|j                  t        j                  k(  r‹t        j                  |«      j                  «       s#t        j                   |«      j                  «       rEt        j"                  |j                  «      j$                  dz
  }t        j&                  || |¬«      }|f}	|r|	|fz  }	|	S )a§  
        Args:
            hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
            attention_mask (`torch.FloatTensor`): attention mask of size
                `(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
            layer_head_mask (`torch.FloatTensor`): mask for attention heads in a given layer of size
                `(encoder_attention_heads,)`.
            output_attentions (`bool`, *optional*):
                Whether or not to return the attentions tensors of all attention layers. See `attentions` under
                returned tensors for more detail.
        )rw   rz   r{   r|   r   iè  )ÚminÚmax)rž   r   r†   rc   r�   r    r¢   r¥   r£   r¦   r§   rB   rE   Úfloat16ÚisinfÚanyÚisnanÚfinfor«   Úclamp)
r>   rw   rz   r{   r|   Úresidualr�   rŠ   Úclamp_valueÚoutputss
             r2   rJ   zPLBartEncoderLayer.forward)  s�  € ð$ !ˆØ)-¯©Ø'Ø)Ø+Ø/ð	 *8ó *
Ñ&ˆ�| Qô Ÿ™×-Ñ-¨m¸t¿|¹|ÐVZ×VcÑVcÐ-ÓdˆØ  =Ñ0ˆØ×1Ñ1°-Ó@ˆà ˆØ×*Ñ*¨4¯8©8°MÓ+BÓCˆÜŸ™×-Ñ-¨m¸t×?VÑ?VÐae×anÑanÐ-ÓoˆØŸ™ Ó/ˆÜŸ™×-Ñ-¨m¸t¿|¹|ÐVZ×VcÑVcÐ-ÓdˆØ  =Ñ0ˆØ×-Ñ-¨mÓ<ˆà×Ñ¤%§-¡-Ò/Ü�K‰K˜Ó&×*Ñ*Ô,´·±¸MÓ0J×0NÑ0NÔ0PäŸ+™+ m×&9Ñ&9Ó:×>Ñ>ÀÑEˆKÜ!ŸK™K¨¸K¸<È[ÔYˆMà Ð"ˆáØ˜�Ñ&ˆGàˆr4   )F)rN   rO   rP   r    r=   rE   ÚFloatTensorr   r•   r   rJ   rT   rU   s   @r2   r—   r—     sz   ø„ ð=˜|õ =ð. -2ñ0à×(Ñ(ð0ð ×)Ñ)ð0ð ×*Ñ*ð	0ð
 $ D™>ð0ð 
ˆu× Ñ  (¨5×+<Ñ+<Ñ"=Ð=Ñ	>÷0r4   r—   Úeagerc                   ó~  ‡ — e Zd Zdefˆ fd„Z	 	 	 	 	 	 	 	 ddej                  deej                     deej                     deej                     deej                     deej                     d	eeej                        d
ee	   dee	   deej                  eeej                  ej                  f      f   fd„Zˆ xZS )ÚPLBartDecoderLayerrg   c                 óN  •— t         ‰| �  «        |j                  | _        t	        |j
                     | j                  |j                  |j                  dd|¬«      | _        |j                  | _	        t        |j                     | _        |j                  | _        t        j                  | j                  «      | _        t	        |j
                     | j                  |j                  |j                  d|¬«      | _        t        j                  | j                  «      | _        t        j&                  | j                  |j(                  «      | _        t        j&                  |j(                  | j                  «      | _        t        j                  | j                  «      | _        y )NT)ra   rb   rc   rd   rf   rg   )rc   rd   rg   )r<   r=   r™   ra   rš   r›   Údecoder_attention_headsr�   rž   rc   r   r¡   r¢   r£   r   rŸ   r    Úencoder_attnÚencoder_attn_layer_normrl   Údecoder_ffn_dimr¥   r¦   r§   r¨   s     €r2   r=   zPLBartDecoderLayer.__init__b  s0  ø€ Ü‰ÑÔØŸ™ˆŒä1°&×2MÑ2MÑNØ—n‘nØ×4Ñ4Ø×,Ñ,ØØØô
ˆŒð —~‘~ˆŒÜ# F×$>Ñ$>Ñ?ˆÔØ"(×";Ñ";ˆÔä$&§L¡L°·±Ó$@ˆÔ!Ü4°V×5PÑ5PÑQØ�N‰NØ×*Ñ*Ø×,Ñ,ØØô
ˆÔô (*§|¡|°D·N±NÓ'CˆÔ$Ü—9‘9˜TŸ^™^¨V×-CÑ-CÓDˆŒÜ—9‘9˜V×3Ñ3°T·^±^ÓDˆŒÜ "§¡¨T¯^©^Ó <ˆÕr4   rw   rz   Úencoder_hidden_statesÚencoder_attention_maskr{   Úcross_attn_layer_head_maskry   r|   Ú	use_cacher}   c
                 ót  — |}
|�|dd nd}| j                  |||||¬«      \  }}}t        j                  j                  || j                  | j                  ¬«      }|
|z   }| j                  |«      }d}d}|�w|}
|�|dd nd}| j                  ||||||¬«      \  }}}t        j                  j                  || j                  | j                  ¬«      }|
|z   }| j                  |«      }||z   }|}
| j                  | j                  |«      «      }t        j                  j                  || j                  | j                  ¬«      }| j                  |«      }t        j                  j                  || j                  | j                  ¬«      }|
|z   }| j                  |«      }|f}|r|||fz  }|	r||fz  }|S )a  
        Args:
            hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)`
            attention_mask (`torch.FloatTensor`): attention mask of size
                `(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
            encoder_hidden_states (`torch.FloatTensor`):
                cross attention input to the layer of shape `(batch, seq_len, embed_dim)`
            encoder_attention_mask (`torch.FloatTensor`): encoder attention mask of size
                `(batch, 1, tgt_len, src_len)` where padding elements are indicated by very large negative values.
            layer_head_mask (`torch.FloatTensor`): mask for attention heads in a given layer of size
                `(encoder_attention_heads,)`.
            cross_attn_layer_head_mask (`torch.FloatTensor`): mask for cross-attention heads in a given layer of
                size `(decoder_attention_heads,)`.
            past_key_value (`Tuple(torch.FloatTensor)`): cached past key and value projection states
            output_attentions (`bool`, *optional*):
                Whether or not to return the attentions tensors of all attention layers. See `attentions` under
                returned tensors for more detail.
        Nr:   )rw   ry   rz   r{   r|   r   éþÿÿÿ)rw   rx   rz   r{   ry   r|   )rž   r   r†   rc   r�   r    r»   r¼   r¢   r¥   r£   r¦   r§   )r>   rw   rz   r¾   r¿   r{   rÀ   ry   r|   rÁ   r²   Úself_attn_past_key_valueÚself_attn_weightsÚpresent_key_valueÚcross_attn_present_key_valueÚcross_attn_weightsÚcross_attn_past_key_valuer´   s                     r2   rJ   zPLBartDecoderLayer.forward  s  € ð< !ˆð :HÐ9S >°"°1Ñ#5ÐY]Ð à>B¿n¹nØ'Ø3Ø)Ø+Ø/ð ?Mó ?
Ñ;ˆÐ(Ð*;ô Ÿ™×-Ñ-¨m¸t¿|¹|ÐVZ×VcÑVcÐ-ÓdˆØ  =Ñ0ˆØ×1Ñ1°-Ó@ˆð (,Ð$Ø!ÐØ Ð,Ø$ˆHð @NÐ?Y¨°r°sÑ(;Ð_cÐ%ØNR×N_ÑN_Ø+Ø!6Ø5Ø :Ø8Ø"3ð O`ó OÑKˆMÐ-Ð/Kô ŸM™M×1Ñ1°-À4Ç<Á<ÐZ^×ZgÑZgÐ1ÓhˆMØ$ }Ñ4ˆMØ ×8Ñ8¸ÓGˆMð !2Ð4PÑ PÐð !ˆØ×*Ñ*¨4¯8©8°MÓ+BÓCˆÜŸ™×-Ñ-¨m¸t×?VÑ?VÐae×anÑanÐ-ÓoˆØŸ™ Ó/ˆÜŸ™×-Ñ-¨m¸t¿|¹|ÐVZ×VcÑVcÐ-ÓdˆØ  =Ñ0ˆØ×-Ñ-¨mÓ<ˆà Ð"ˆáØÐ)Ð+=Ð>Ñ>ˆGáØÐ)Ð+Ñ+ˆGàˆr4   )NNNNNNFT)rN   rO   rP   r    r=   rE   rS   r   r   r•   rµ   rJ   rT   rU   s   @r2   r¸   r¸   a  s  ø„ ð=˜|õ =ð@ 26Ø8<Ø9=Ø26Ø=AØ8<Ø,1Ø$(ñWà—|‘|ðWð ! §¡Ñ.ðWð  (¨¯©Ñ5ð	Wð
 !)¨¯©Ñ 6ðWð " %§,¡,Ñ/ðWð %-¨U¯\©\Ñ$:ðWð !  u§|¡|Ñ!4Ñ5ðWð $ D™>ðWð ˜D‘>ðWð 
ˆu× Ñ  (¨5°×1BÑ1BÀE×DUÑDUÐ1UÑ+VÑ"WÐWÑ	X÷Wr4   r¸   c                   ól   ‡ — e Zd ZdZdedededefˆ fd„Zdej                  dej                  fd	„Z	ˆ xZ
S )
ÚPLBartClassificationHeadz-Head for sentence-level classification tasks.Ú	input_dimÚ	inner_dimÚnum_classesÚpooler_dropoutc                 óÄ   •— t         ‰| �  «        t        j                  ||«      | _        t        j
                  |¬«      | _        t        j                  ||«      | _        y )N)r€   )r<   r=   r   rl   ÚdenseÚDropoutrc   rp   )r>   rÌ   rÍ   rÎ   rÏ   r?   s        €r2   r=   z!PLBartClassificationHead.__init__Ý  sD   ø€ ô 	‰ÑÔÜ—Y‘Y˜y¨)Ó4ˆŒ
Ü—z‘z NÔ3ˆŒÜŸ	™	 )¨[Ó9ˆ�r4   rw   r}   c                 ó¸   — | j                  |«      }| j                  |«      }t        j                  |«      }| j                  |«      }| j	                  |«      }|S r[   )rc   rÑ   rE   Útanhrp   )r>   rw   s     r2   rJ   z PLBartClassificationHead.forwardé  sN   € ØŸ™ ]Ó3ˆØŸ
™
 =Ó1ˆÜŸ
™
 =Ó1ˆØŸ™ ]Ó3ˆØŸ™ mÓ4ˆØÐr4   )rN   rO   rP   rQ   rR   r^   r=   rE   rS   rJ   rT   rU   s   @r2   rË   rË   Ú  sL   ø„ Ù7ð
:àð
:ð ð
:ð ð	
:ð
 õ
:ð U§\¡\ð °e·l±l÷ r4   rË   c                   ó&   — e Zd ZeZdZdZddgZd„ Zy)ÚPLBartPreTrainedModelÚmodelTr¸   r—   c                 ó  — | j                   j                  }t        |t        j                  «      rY|j
                  j                  j                  d|¬«       |j                  �%|j                  j                  j                  «        y y t        |t        j                  «      rf|j
                  j                  j                  d|¬«       |j                  �2|j
                  j                  |j                     j                  «        y y y )Nr”   )ÚmeanÚstd)rg   Úinit_stdÚ
isinstancer   rl   rH   ÚdataÚnormal_re   Úzero_Ú	EmbeddingrX   )r>   ÚmodulerÚ   s      r2   Ú_init_weightsz#PLBartPreTrainedModel._init_weightsø  sÃ   € Ø�k‰k×"Ñ"ˆÜ�fœbŸi™iÔ(Ø�M‰M×Ñ×&Ñ&¨C°SÐ&Ô9Ø�{‰{Ð&Ø—‘× Ñ ×&Ñ&Õ(ð 'ä˜¤§¡Ô-Ø�M‰M×Ñ×&Ñ&¨C°SÐ&Ô9Ø×!Ñ!Ð-Ø—‘×"Ñ" 6×#5Ñ#5Ñ6×<Ñ<Õ>ð .ð .r4   N)	rN   rO   rP   r    Úconfig_classÚbase_model_prefixÚsupports_gradient_checkpointingÚ_no_split_modulesrâ   © r4   r2   rÖ   rÖ   ò  s$   „ Ø€LØÐØ&*Ð#Ø-Ð/CÐDÐó	?r4   rÖ   aK  
    This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
    library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
    etc.)

    This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass.
    Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
    and behavior.

    Parameters:
        config ([`PLBartConfig`]):
            Model configuration class with all the parameters of the model. Initializing with a config file does not
            load the weights associated with the model, only the configuration. Check out the
            [`~PreTrainedModel.from_pretrained`] method to load the model weights.
aA  
    Mask-filling example:

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

    >>> model = PLBartForConditionalGeneration.from_pretrained("uclanlp/plbart-base")
    >>> tokenizer = AutoTokenizer.from_pretrained("uclanlp/plbart-base")

    >>> # en_XX is the language symbol id <LID> for English
    >>> TXT = "<s> Is 0 the <mask> Fibonacci number ? </s> en_XX"
    >>> input_ids = tokenizer([TXT], add_special_tokens=False, return_tensors="pt").input_ids

    >>> logits = model(input_ids).logits
    >>> masked_index = (input_ids[0] == tokenizer.mask_token_id).nonzero().item()
    >>> probs = logits[0, masked_index].softmax(dim=0)
    >>> values, predictions = probs.topk(5)

    >>> tokenizer.decode(predictions).split()
    ['first', 'same', 'highest', 'result', 'number']
    ```
a¯  
    Args:
        input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
            Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
            it.

            Indices can be obtained using [`AutoTokenizer`] or [`PLBartMultiTokenizer`] depending on the checkpoint.
            See [`PreTrainedTokenizer.encode`] and [`PreTrainedTokenizer.__call__`] for details.

            [What are input IDs?](../glossary#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)
        decoder_input_ids (`torch.LongTensor` of shape `(batch_size, target_sequence_length)`, *optional*):
            Indices of decoder input sequence tokens in the vocabulary.

            Indices can be obtained using [`AutoTokenizer`] or [`PLBartMultiTokenizer`] depending on the checkpoint.
            See [`PreTrainedTokenizer.encode`] and [`PreTrainedTokenizer.__call__`] for details.

            [What are decoder input IDs?](../glossary#decoder-input-ids)

            PLBart uses a specific language id token as the starting token for `decoder_input_ids` generation that
            varies according to source and target language, *e.g.* 50003 for *en_XX*, and 50001 for *java*. If
            `past_key_values` is used, optionally only the last `decoder_input_ids` have to be input (see
            `past_key_values`).

            For translation and summarization training, `decoder_input_ids` should be provided. If no
            `decoder_input_ids` is provided, the model will create this tensor by shifting the `input_ids` to the right
            for denoising pre-training following the paper.
        decoder_attention_mask (:
            obj:*torch.LongTensor* of shape `(batch_size, target_sequence_length)`, *optional*): Default behavior:
            generate a tensor that ignores pad tokens in `decoder_input_ids`. Causal mask will also be used by default.
        head_mask (`torch.Tensor` of shape `(encoder_layers, encoder_attention_heads)`, *optional*):
            Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in `[0, 1]`:

            - 1 indicates the head is **not masked**,
            - 0 indicates the head is **masked**.

        decoder_head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
            Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in `[0, 1]`:

            - 1 indicates the head is **not masked**,
            - 0 indicates the head is **masked**.

        cross_attn_head_mask (:
            obj:*torch.Tensor* of shape `(decoder_layers, decoder_attention_heads)`, *optional*): Mask to nullify
            selected heads of the cross-attention modules in the decoder. Mask values selected in `[0, 1]`:

            - 1 indicates the head is **not masked**,
            - 0 indicates the head is **masked**.

        encoder_outputs (`tuple(tuple(torch.FloatTensor)`, *optional*):
            Tuple consists of (`last_hidden_state`, *optional*: `hidden_states`, *optional*: `attentions`)
            `last_hidden_state` of shape `(batch_size, sequence_length, hidden_size)`, *optional*) is a sequence of
            hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
        past_key_values (:
            obj:*tuple(tuple(torch.FloatTensor))*, *optional*, returned when `use_cache=True` is passed or when
            `config.use_cache=True`): Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple
            having 2 tensors of shape `(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional
            tensors of shape `(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)`.

            Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
            blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.

            If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those that
            don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of all
            `decoder_input_ids` of shape `(batch_size, sequence_length)`.
        inputs_embeds (:
            obj:*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 `input_ids` indices into associated vectors than the model's
            internal embedding lookup matrix.
        decoder_inputs_embeds (:
            obj:*torch.FloatTensor* of shape `(batch_size, target_sequence_length, hidden_size)`, *optional*):
            Optionally, instead of passing `decoder_input_ids` you can choose to directly pass an embedded
            representation. If `past_key_values` is used, optionally only the last `decoder_inputs_embeds` have to be
            input (see `past_key_values`). This is useful if you want more control over how to convert
            `decoder_input_ids` indices into associated vectors than the model's internal embedding lookup matrix.

            If `decoder_input_ids` and `decoder_inputs_embeds` are both unset, `decoder_inputs_embeds` takes the value
            of `inputs_embeds`.
        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.
c                   ó  ‡ — e Zd ZdZddedeej                     fˆ fd„Zd„ Z	d„ Z
	 	 	 	 	 	 	 ddeej                     deej                     d	eej                     d
eej                     dee   dee   dee   deeef   fd„Zˆ xZS )ÚPLBartEncoderzä
    Transformer encoder consisting of *config.encoder_layers* self attention layers. Each layer is a
    [`PLBartEncoderLayer`].

    Args:
        config: PLBartConfig
        embed_tokens (nn.Embedding): output embedding
    rg   Úembed_tokensc                 ó  •— t         ‰| �  |«       |j                  | _        |j                  | _        |j
                  }|j                  | _        |j                  | _	        |j                  rt        j                  |«      nd}t        |j                  || j                  |¬«      | _        |�|j                   | j                  _        t#        |j                  |«      | _        t'        j(                  t+        |j,                  «      D �cg c]  }t/        |«      ‘Œ c}«      | _        |j2                  dk(  | _        |j2                  dk(  | _        t'        j8                  |«      | _        d| _        | j?                  «        y c c}w ©Nr]   ©rY   Úflash_attention_2ÚsdpaF) r<   r=   rc   Úencoder_layerdropÚ	layerdropr™   r"   rX   Úmax_position_embeddingsÚmax_source_positionsÚscale_embeddingÚmathÚsqrtrW   Ú
vocab_sizerê   rH   r6   Úembed_positionsr   Ú
ModuleListÚrangeÚencoder_layersr—   Úlayersr›   Ú_use_flash_attention_2Ú	_use_sdparŸ   Úlayernorm_embeddingÚgradient_checkpointingÚ	post_init)r>   rg   rê   ra   rY   rŠ   r?   s         €r2   r=   zPLBartEncoder.__init__™  s9  ø€ Ü‰Ñ˜Ô à—~‘~ˆŒØ×1Ñ1ˆŒà—N‘Nˆ	Ø!×.Ñ.ˆÔØ$*×$BÑ$BˆÔ!Ø.4×.DÒ.D”d—i‘i 	Ô*È#ˆä5Ø×Ñ˜y¨$×*:Ñ*:Èô
ˆÔð Ð#Ø'3×':Ñ':ˆD×ÑÔ$ä?Ø×*Ñ*Øó 
ˆÔô —m‘mÌÈv×OdÑOdÓIeÖ$fÀAÔ%7¸Õ%?Ò$fÓgˆŒØ&,×&AÑ&AÐEXÑ&XˆÔ#Ø×4Ñ4¸Ñ>ˆŒÜ#%§<¡<°	Ó#:ˆÔ à&+ˆÔ#à�‰Õùò %gs   Ä
Fc                 ó   — | j                   S r[   ©rê   ©r>   s    r2   Úget_input_embeddingsz"PLBartEncoder.get_input_embeddings¸  ó   € Ø× Ñ Ð r4   c                 ó   — || _         y r[   r  ©r>   Úvalues     r2   Úset_input_embeddingsz"PLBartEncoder.set_input_embeddings»  ó
   € Ø!ˆÕr4   r!   rz   Ú	head_maskÚinputs_embedsr|   Úoutput_hidden_statesÚreturn_dictr}   c                 ó¬  — |�|n| j                   j                  }|�|n| j                   j                  }|�|n| j                   j                  }|�|�t	        d«      ‚|�"|}|j                  d|j                  d   «      }n|�|dd…dd…df   }nt	        d«      ‚|€| j                  |«      }| j                  |«      }	|	j                  |j                  «      }	||	z   }
| j                  |
«      }
t        j                  j                  |
| j                  | j                  ¬«      }
|�R| j                   r	d|v r|nd}n=| j"                  r|€|st%        ||j&                  «      }nt)        ||j&                  «      }|rdnd}|rdnd}|�_|j+                  «       d   t-        | j.                  «      k7  r6t	        dt-        | j.                  «      › d	|j+                  «       d   › d
�«      ‚t1        | j.                  «      D ]©  \  }}|r||
fz   }d}| j                  r&t3        j4                  g «      }|| j6                  k  rd}|rd}nW| j8                  r3| j                  r'| j;                  |j<                  |
||�||   nd|«      }n ||
||�||   nd|¬«      }|d   }
|sŒ¡||d   fz   }Œ« |r||
fz   }|st?        d„ |
||fD «       «      S tA        |
||¬«      S )a~  
        Args:
            input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
                Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
                provide it.

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

                [What are input IDs?](../glossary#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)
            head_mask (`torch.Tensor` of shape `(encoder_layers, encoder_attention_heads)`, *optional*):
                Mask to nullify selected heads of the attention modules. Mask values selected in `[0, 1]`:

                - 1 indicates the head is **not masked**,
                - 0 indicates the head is **masked**.

            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 `input_ids` indices into associated vectors
                than the model's internal embedding lookup matrix.
            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.
        NzDYou cannot specify both input_ids and inputs_embeds at the same timer&   z5You have to specify either input_ids or inputs_embedsr   r   rç   z&The head_mask should be specified for ú layers, but it is for ú.FT)NN)r{   r|   r   c              3   ó&   K  — | ]	  }|€Œ|–— Œ y ­wr[   rç   ©Ú.0Úvs     r2   ú	<genexpr>z(PLBartEncoder.forward.<locals>.<genexpr>E  s   è ø€ Òe˜qÐWXÑWdœÑeùs   ‚Š©Úlast_hidden_staterw   Ú
attentions)!rg   r|   r  Úuse_return_dictr(   rs   rD   rê   rø   ÚtorC   rÿ   r   r†   rc   r�   rý   rþ   r   rB   r   r‚   Úlenrü   Ú	enumeraterE   Úrandrñ   r   Ú_gradient_checkpointing_funcÚ__call__Útupler   )r>   r!   rz   r  r  r|   r  r  ÚinputÚ	embed_posrw   Úencoder_statesÚall_attentionsÚidxÚencoder_layerÚto_dropÚdropout_probabilityÚlayer_outputss                     r2   rJ   zPLBartEncoder.forward¾  s$  € ð\ 2CÐ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ð$DÑ È$Ï+É+×JjÑJjð 	ð &1Ð%<‘kÀ$Ç+Á+×B]ÑB]ˆð Ð  ]Ð%>ÜÐcÓdÐdØÐ"ØˆEØ!Ÿ™ r¨9¯?©?¸2Ñ+>Ó?‰IØÐ&Ø!¢!¢Q¨ (Ñ+‰EäÐTÓUÐUàÐ Ø ×-Ñ-¨iÓ8ˆMà×(Ñ(¨Ó/ˆ	Ø—L‘L ×!5Ñ!5Ó6ˆ	à%¨	Ñ1ˆØ×0Ñ0°Ó?ˆÜŸ™×-Ñ-¨m¸t¿|¹|ÐVZ×VcÑVcÐ-Ódˆð Ð%Ø×*Ò*Ø34¸Ñ3F¡ÈD‘Ø—’ IÐ$5Ñ>Oô "EÀ^ÐUb×UhÑUhÓ!i‘ô "<¸NÈM×L_ÑL_Ó!`�á3™¸ˆÙ0™°dˆð Ð Ø�~‰~Ó Ñ"¤s¨4¯;©;Ó'7Ò8Ü Ø<¼SÀÇÁÓ=MÐ<Nð OØ!Ÿ™Ó(¨Ñ+Ð,¨Að/óð ô
 #,¨D¯K©KÓ"8ò  	FÑˆC�Ù#Ø!/°=Ð2BÑ!B�àˆGØ�}Š}Ü&+§j¡j°£nÐ#Ø&¨¯©Ò7Ø"�GáØ ,‘à×.Ò.°4·=²=Ø$(×$EÑ$EØ%×.Ñ.Ø%Ø&Ø+4Ð+@˜ 3šÀdØ)ó%‘Mñ %2Ø%Ø&Ø;DÐ;P¨°3ªÐVZØ*;ô	%�Mð !.¨aÑ 0�â Ø!/°=ÀÑ3CÐ2EÑ!E‘ðA 	FñD  Ø+¨}Ð.>Ñ>ˆNáÜÑe ]°NÀNÐ$SÔeÓeÐeÜØ+¸>ÐVdô
ð 	
r4   r[   )NNNNNNN)rN   rO   rP   rQ   r    r   r   rà   r=   r  r
  rE   Ú
LongTensorrS   rµ   r•   r   r   r   rJ   rT   rU   s   @r2   ré   ré   �  sß   ø„ ññ˜|ð ¸8ÀBÇLÁLÑ;Qõ ò>!ò"ð
 15Ø15Ø,0Ø59Ø,0Ø/3Ø&*ñJ
à˜E×,Ñ,Ñ-ðJ
ð ! §¡Ñ.ðJ
ð ˜EŸL™LÑ)ð	J
ð
   × 1Ñ 1Ñ2ðJ
ð $ D™>ðJ
ð ' t™nðJ
ð ˜d‘^ðJ
ð 
ˆu�oÐ%Ñ	&÷J
r4   ré   c                   ó¢  ‡ — e Zd ZdZddedeej                     fˆ fd„Zd„ Z	d„ Z
	 	 	 	 	 	 	 	 	 	 	 	 ddeej                     deej                     d	eej                     d
eej                     deej                     deej                     deeej                        deej                     dee   dee   dee   dee   deeef   fd„Zˆ xZS )ÚPLBartDecoderzÐ
    Transformer decoder consisting of *config.decoder_layers* layers. Each layer is a [`PLBartDecoderLayer`]

    Args:
        config: PLBartConfig
        embed_tokens (nn.Embedding): output embedding
    rg   rê   c                 óF  •— t         ‰| �  |«       |j                  | _        |j                  | _        |j
                  | _        |j                  | _        |j                  rt        j                  |j                  «      nd}t        |j                  |j                  | j                  |¬«      | _        |�|j                   | j                  _        t#        |j                  |j                  «      | _        t'        j(                  t+        |j,                  «      D �cg c]  }t/        |«      ‘Œ c}«      | _        |j2                  dk(  | _        |j2                  dk(  | _        t'        j8                  |j                  «      | _        d| _        | j?                  «        y c c}w rì   ) r<   r=   rc   Údecoder_layerdroprñ   r"   rX   rò   Úmax_target_positionsrô   rõ   rö   r™   rW   r÷   rê   rH   r6   rø   r   rù   rú   Údecoder_layersr¸   rü   r›   rý   rþ   rŸ   rÿ   r   r  )r>   rg   rê   rY   rŠ   r?   s        €r2   r=   zPLBartDecoder.__init__U  s@  ø€ Ü‰Ñ˜Ô Ø—~‘~ˆŒØ×1Ñ1ˆŒØ!×.Ñ.ˆÔØ$*×$BÑ$BˆÔ!Ø39×3IÒ3I”d—i‘i §¡Ô/Èsˆä5Ø×Ñ˜vŸ~™~¨t×/?Ñ/?È[ô
ˆÔð Ð#Ø'3×':Ñ':ˆD×ÑÔ$ä?Ø×*Ñ*Ø�N‰Nó 
ˆÔô —m‘mÌÈv×OdÑOdÓIeÖ$fÀAÔ%7¸Õ%?Ò$fÓgˆŒØ&,×&AÑ&AÐEXÑ&XˆÔ#Ø×4Ñ4¸Ñ>ˆŒä#%§<¡<°·±Ó#?ˆÔ à&+ˆÔ#à�‰Õùò %gs   ÄFc                 ó   — | j                   S r[   r  r  s    r2   r  z"PLBartDecoder.get_input_embeddingsr  r  r4   c                 ó   — || _         y r[   r  r  s     r2   r
  z"PLBartDecoder.set_input_embeddingsu  r  r4   r!   rz   r¾   r¿   r  Úcross_attn_head_maskÚpast_key_valuesr  rÁ   r|   r  r  r}   c                 ó  — |
�|
n| j                   j                  }
|�|n| j                   j                  }|	�|	n| j                   j                  }	|�|n| j                   j                  }|�|�t        d«      ‚|�$|}|j                  }|j                  d|d   «      }n-|� |j                  «       dd }|dd…dd…df   }nt        d«      ‚|�|d   d   j                  d   nd}|€| j                  |«      }| j                  r|�d|v r|nd}n-| j                  r|
s|€t        ||||«      }nt        ||||«      }|�^|�\| j                  r	d|v r|nd}nG| j                  r |€|
st        ||j                  |d   ¬«      }nt!        ||j                  |d   ¬«      }| j#                  ||«      }|j%                  |j&                  «      }||z   }| j)                  |«      }t*        j,                  j/                  || j.                  | j0                  ¬«      }| j2                  r%| j0                  r|	rt4        j7                  d	«       d
}	|rdnd}|
rdnd}|
r|�dnd}|	rdnd}t9        ||gddg«      D ]j  \  }}|€Œ	|j                  «       d   t;        | j<                  «      k7  sŒ3t        d|› dt;        | j<                  «      › d|j                  «       d   › d�«      ‚ t?        | j<                  «      D ]Ý  \  }}|r||fz  }| j0                  r%tA        jB                  g «      }|| jD                  k  rŒ?|�||   nd}| j2                  r?| j0                  r3| jG                  |jH                  |||||�||   nd|�||   ndd|
|	«
      }n ||||||�||   nd|�||   nd||
|	¬«	      }|d   }|	r|||
rdnd   fz  }|
sŒÉ||d   fz  }|€ŒÕ||d   fz  }Œß |r||fz  }|	r|nd}|stK        d„ |||||fD «       «      S tM        |||||¬«      S )a  
        Args:
            input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
                Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
                provide it.

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

                [What are input IDs?](../glossary#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)
            encoder_hidden_states (`torch.FloatTensor` of shape `(batch_size, encoder_sequence_length, hidden_size)`, *optional*):
                Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
                of the decoder.
            encoder_attention_mask (`torch.LongTensor` of shape `(batch_size, encoder_sequence_length)`, *optional*):
                Mask to avoid performing cross-attention on padding tokens indices of encoder input_ids. 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)
            head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
                Mask to nullify selected heads of the attention modules. Mask values selected in `[0, 1]`:

                - 1 indicates the head is **not masked**,
                - 0 indicates the head is **masked**.

            cross_attn_head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
                Mask to nullify selected heads of the cross-attention modules in the decoder to avoid performing
                cross-attention on hidden heads. Mask values selected in `[0, 1]`:

                - 1 indicates the head is **not masked**,
                - 0 indicates the head is **masked**.

            past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
                Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of
                shape `(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional tensors of
                shape `(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)`.

                Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
                cross-attention blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.

                If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those
                that don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of
                all `decoder_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 `input_ids` indices into associated vectors
                than the model's internal embedding lookup matrix.
            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.
        NzTYou cannot specify both decoder_input_ids and decoder_inputs_embeds at the same timer&   zEYou have to specify either decoder_input_ids or decoder_inputs_embedsr   r:   )r‰   r   zZ`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`...Frç   r  r5  zThe `z` should be specified for r  r  )rz   r¾   r¿   r{   rÀ   ry   r|   rÁ   r   r   c              3   ó$   K  — | ]  }|�|–— Œ
 y ­wr[   rç   r  s     r2   r  z(PLBartDecoder.forward.<locals>.<genexpr>]  s   è ø€ ò àØ�=ô ñùs   ‚)r  r6  rw   r  Úcross_attentions)'rg   r|   r  rÁ   r  r(   rD   rs   r‚   rê   rý   rþ   r   r   r   rB   r   rø   r  rC   rÿ   r   r†   rc   r�   r   ÚloggerÚwarning_onceÚzipr  rü   r  rE   r  rñ   r   r!  r"  r   )r>   r!   rz   r¾   r¿   r  r5  r6  r  rÁ   r|   r  r  r#  Úinput_shaper@   rM   rw   Úall_hidden_statesÚall_self_attnsÚall_cross_attentionsÚnext_decoder_cacheÚ	attn_maskÚ	mask_namer'  Údecoder_layerr*  ry   r+  Ú
next_caches                                 r2   rJ   zPLBartDecoder.forwardx  s
  € ð` 2CÐ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ð$DÑ È$Ï+É+×JjÑJjð 	ð "+Ð!6‘I¸D¿K¹K×<QÑ<Qˆ	Ø%0Ð%<‘kÀ$Ç+Á+×B]ÑB]ˆð Ð  ]Ð%>ÜÐsÓtÐtØÐ"ØˆEØŸ+™+ˆKØ!Ÿ™ r¨;°r©?Ó;‰IØÐ&Ø'×,Ñ,Ó.¨s°Ð3ˆKØ!¢!¢Q¨ (Ñ+‰EäÐdÓeÐeð DSÐC^ °Ñ!3°AÑ!6×!<Ñ!<¸QÒ!?ÐdeÐàÐ Ø ×-Ñ-¨eÓ4ˆMà×&Ò&à0>Ð0JÈqÐTbÑOb™^Ðim‰NØ�^Š^Ñ$5Ð:NÐ:Vô HØØØØ&ó	‰Nô ?Ø ¨]Ð<RóˆNð
 !Ð,Ð1GÐ1SØ×*Ò*ØCDÐH^ÑC^Ñ)?ÐdhÑ&Ø—’Ð$8Ð$@ÑIZô *MØ*Ø!×'Ñ'Ø'¨™Oô*Ñ&ô *DØ*¨M×,?Ñ,?ÈÐUWÉô*Ð&ð
 ×(Ñ(¨Ð0FÓGˆ	Ø—L‘L ×!5Ñ!5Ó6ˆ	à%¨	Ñ1ˆØ×0Ñ0°Ó?ˆäŸ™×-Ñ-¨m¸t¿|¹|ÐVZ×VcÑVcÐ-Ódˆà×&Ò&¨4¯=ª=ÙÜ×#Ñ#Øpôð "�	ñ #7™B¸DÐÙ0™°dˆÙ&7Ð<QÐ<]™rÐdhÐÙ#,™R°$Ðô %(¨Ð4HÐ(IÈKÐYoÐKpÓ$qò 	Ñ ˆI�yØÑ$Ø—>‘>Ó# AÑ&¬3¨t¯{©{Ó+;Ó<Ü$Ø 	˜{Ð*DÄSÈÏÉÓEUÐDVð WØ%ŸN™NÓ,¨QÑ/Ð0°ð3óð ð	ô #,¨D¯K©KÓ"8ò /	@ÑˆC�á#Ø! mÐ%5Ñ5Ð!Ø�}Š}Ü&+§j¡j°£nÐ#Ø&¨¯©Ò7Øà5DÐ5P˜_¨SÒ1ÐVZˆNà×*Ò*¨t¯}ª}Ø $× AÑ AØ!×*Ñ*Ø!Ø"Ø)Ø*Ø&/Ð&;�I˜c’NÀØ1EÐ1QÐ(¨Ò-ÐW[ØØ%Øó!‘ñ !.Ø!Ø#1Ø*?Ø+AØ7@Ð7L Y¨s¢^ÐRVà5IÐ5UÐ,¨SÒ1Ð[_à#1Ø&7Ø'ô!�ð *¨!Ñ,ˆMáØ" }Ñ:K±QÐQRÑ'SÐ&UÑUÐ"â Ø =°Ñ#3Ð"5Ñ5�à(Ñ4Ø(¨]¸1Ñ-=Ð,?Ñ?Ñ(ð_/	@ñd  Ø -Ð!1Ñ1Ðá+4Ñ'¸$ˆ
ÙÜñ à'¨Ð5FÈÐXlÐmôó ð ô
 9Ø+Ø&Ø+Ø%Ø1ô
ð 	
r4   r[   )NNNNNNNNNNNN)rN   rO   rP   rQ   r    r   r   rà   r=   r  r
  rE   r,  rS   rµ   r   r•   r   r   r   rJ   rT   rU   s   @r2   r.  r.  L  sY  ø„ ññ˜|ð ¸8ÀBÇLÁLÑ;Qõ ò:!ò"ð
 15Ø15Ø=AØ=AØ,0Ø7;Ø=AØ59Ø$(Ø,0Ø/3Ø&*ñp
à˜E×,Ñ,Ñ-ðp
ð ! §¡Ñ.ðp
ð  (¨×(9Ñ(9Ñ:ð	p
ð
 !)¨×)9Ñ)9Ñ :ðp
ð ˜EŸL™LÑ)ðp
ð ' u§|¡|Ñ4ðp
ð " $ u×'8Ñ'8Ñ"9Ñ:ðp
ð   × 1Ñ 1Ñ2ðp
ð ˜D‘>ðp
ð $ D™>ðp
ð ' t™nðp
ð ˜d‘^ðp
ð 
ˆuÐ?Ð?Ñ	@÷p
r4   r.  zTThe bare PLBART Model outputting raw hidden-states without any specific head on top.c            %       óJ  ‡ — e Zd ZddgZdefˆ fd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
 ee«       eeee¬
«      	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddeej&                     deej&                     deej&                     deej(                     deej(                     deej&                     deej(                     deeej,                        deeej,                        deej,                     deej,                     dee   dee   dee   dee   deeej(                     ef   f d„«       «       Zˆ xZS )ÚPLBartModelúencoder.embed_tokens.weightúdecoder.embed_tokens.weightrg   c                 óv  •— t         ‰| �  |«       |j                  |j                  }}|j                  rt        j                  |j                  «      nd}t        ||j                  ||¬«      | _	        t        || j                  «      | _        t        || j                  «      | _        | j                  «        y )Nr]   rí   )r<   r=   r"   r÷   rô   rõ   rö   r™   rW   Úsharedré   Úencoderr.  ÚdecoderÚinit_weights)r>   rg   rX   r÷   rY   r?   s        €r2   r=   zPLBartModel.__init__r  sˆ   ø€ Ü‰Ñ˜Ô à"(×"5Ñ"5°v×7HÑ7H�ZˆØ39×3IÒ3I”d—i‘i §¡Ô/ÈsˆÜ/°
¸F¿N¹NÈKÐepÔqˆŒä$ V¨T¯[©[Ó9ˆŒÜ$ V¨T¯[©[Ó9ˆŒà×ÑÕr4   c                 ó   — | j                   S r[   )rK  r  s    r2   r  z PLBartModel.get_input_embeddings~  s   € Ø�{‰{Ðr4   c                 ó~   — || _         | j                   | j                  _        | j                   | j                  _        y r[   )rK  rL  rê   rM  r  s     r2   r
  z PLBartModel.set_input_embeddings�  s)   € ØˆŒØ$(§K¡Kˆ�‰Ô!Ø$(§K¡Kˆ�‰Õ!r4   c                 óò   — | j                   j                  ra| j                  | j                  j                  | j
                  «       | j                  | j                  j                  | j
                  «       y y r[   )rg   Útie_word_embeddingsÚ_tie_or_clone_weightsrL  rê   rK  rM  r  s    r2   Ú_tie_weightszPLBartModel._tie_weights†  sP   € Ø�;‰;×*Ò*Ø×&Ñ& t§|¡|×'@Ñ'@À$Ç+Á+ÔNØ×&Ñ& t§|¡|×'@Ñ'@À$Ç+Á+ÕNð +r4   c                 ó   — | j                   S r[   )rL  r  s    r2   Úget_encoderzPLBartModel.get_encoder‹  ó   € Ø�|‰|Ðr4   c                 ó   — | j                   S r[   ©rM  r  s    r2   Úget_decoderzPLBartModel.get_decoderŽ  rW  r4   ©Ú
checkpointÚoutput_typerã   r!   rz   Údecoder_input_idsÚdecoder_attention_maskr  Údecoder_head_maskr5  Úencoder_outputsr6  r  Údecoder_inputs_embedsrÁ   r|   r  r  r}   c                 óö  — |�|n| j                   j                  }|�|n| j                   j                  }|�|n| j                   j                  }|�|n| j                   j                  }|€"|€ t        || j                   j                  «      }|€| j                  ||||
|||¬«      }nI|rGt        |t        «      s7t        |d   t        |«      dkD  r|d   nd t        |«      dkD  r|d   nd ¬«      }| j                  |||d   ||||	|||||¬«      }|s||z   S t        |j                  |j                  |j                  |j                   |j"                  |j                  |j                  |j                   ¬«      S )N)r!   rz   r  r  r|   r  r  r   r   r:   r  ©r!   rz   r¾   r¿   r  r5  r6  r  rÁ   r|   r  r  )r  r6  Údecoder_hidden_statesÚdecoder_attentionsr9  Úencoder_last_hidden_stater¾   Úencoder_attentions)rg   r|   r  rÁ   r  r3   r"   rL  rÜ   r   r  rM  r   r  r6  rw   r  r9  )r>   r!   rz   r^  r_  r  r`  r5  ra  r6  r  rb  rÁ   r|   r  r  Údecoder_outputss                    r2   rJ   zPLBartModel.forward‘  s«  € ð0 2CÐ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ð$DÑ È$Ï+É+×JjÑJjð 	ð "+Ð!6‘I¸D¿K¹K×<QÑ<Qˆ	Ø%0Ð%<‘kÀ$Ç+Á+×B]ÑB]ˆð Ð$Ð)>Ð)FÜ 2°9¸d¿k¹k×>VÑ>VÓ WÐàÐ"Ø"Ÿl™lØ#Ø-Ø#Ø+Ø"3Ø%9Ø'ð +ó ‰Oñ ¤¨O¼_Ô!MÜ-Ø"1°!Ñ"4Ü47¸Ó4HÈ1Ò4L˜o¨aÒ0ÐRVÜ14°_Ó1EÈÒ1I˜?¨1Ò-ÈtôˆOð Ÿ,™,Ø'Ø1Ø"1°!Ñ"4Ø#1Ø'Ø!5Ø+Ø/ØØ/Ø!5Ø#ð 'ó 
ˆñ Ø" _Ñ4Ð4ä!Ø-×?Ñ?Ø+×;Ñ;Ø"1×"?Ñ"?Ø.×9Ñ9Ø,×=Ñ=Ø&5×&GÑ&GØ"1×"?Ñ"?Ø.×9Ñ9ô	
ð 		
r4   ©NNNNNNNNNNNNNNN)rN   rO   rP   Ú_tied_weights_keysr    r=   r  r
  rT  rV  rZ  r   ÚPLBART_INPUTS_DOCSTRINGr   Ú_CHECKPOINT_FOR_DOCr   Ú_CONFIG_FOR_DOCr   rE   r,  rS   r   rµ   r•   r   r   rJ   rT   rU   s   @r2   rG  rG  k  sè  ø„ ð
 8Ð9VÐWÐð
˜|õ 
òò0ò
Oò
òñ +Ð+BÓCÙØ&Ø&Ø$ôð 15Ø59Ø8<Ø9=Ø,0Ø8<Ø7;Ø=AØ=AØ59Ø=AØ$(Ø,0Ø/3Ø&*ñ!L
à˜E×,Ñ,Ñ-ðL
ð ! ×!1Ñ!1Ñ2ðL
ð $ E×$4Ñ$4Ñ5ð	L
ð
 !)¨¯©Ñ 6ðL
ð ˜EŸL™LÑ)ðL
ð $ E×$4Ñ$4Ñ5ðL
ð ' u§|¡|Ñ4ðL
ð " $ u×'8Ñ'8Ñ"9Ñ:ðL
ð " $ u×'8Ñ'8Ñ"9Ñ:ðL
ð   × 1Ñ 1Ñ2ðL
ð  (¨×(9Ñ(9Ñ:ðL
ð ˜D‘>ðL
ð $ D™>ðL
ð ' t™nðL
ð  ˜d‘^ð!L
ð" 
ˆu�U—\‘\Ñ"Ð$6Ð6Ñ	7ò#L
óó DôL
r4   rG  zlThe PLBART Model with a language modeling head. Can be used for code-to-text, text-to-code and code-to-code.c            (       óü  ‡ — e Zd ZdZdgZg d¢Zdefˆ fd„Zd„ Zd„ Z		 d%d	e
d
ee
   dedej                  fˆ fd„Zd	e
ddfd„Zd„ Zd„ Z ee«       eee¬«       ee«      	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d&deej6                     deej6                     deej6                     deej8                     deej8                     deej6                     deej8                     deeej<                        deeej<                        deej<                     deej<                     deej8                     dee   dee   d ee   d!ee   dee ej8                     ef   f"d"„«       «       «       Z!dej8                  fd#„Z"e#d$„ «       Z$ˆ xZ%S )'ÚPLBartForConditionalGenerationr×   Úfinal_logits_bias)rH  rI  úlm_head.weightrg   c                 óx  •— t         ‰| �  |«       t        |«      | _        | j	                  dt        j                  d| j                  j                  j                  f«      «       t        j                  |j                  | j                  j                  j                  d¬«      | _        | j                  «        y )Nrq  r   Fri   )r<   r=   rG  r×   Úregister_bufferrE   ÚzerosrK  r7   r   rl   r™   Úlm_headrN  r¨   s     €r2   r=   z'PLBartForConditionalGeneration.__init__ï  s€   ø€ Ü‰Ñ˜Ô Ü  Ó(ˆŒ
Ø×ÑÐ0´%·+±+¸qÀ$Ç*Á*×BSÑBS×BbÑBbÐ>cÓ2dÔeÜ—y‘y §¡°·±×1BÑ1B×1QÑ1QÐX]Ô^ˆŒà×ÑÕr4   c                 ó6   — | j                   j                  «       S r[   )r×   rV  r  s    r2   rV  z*PLBartForConditionalGeneration.get_encoder÷  ó   € Ø�z‰z×%Ñ%Ó'Ð'r4   c                 ó6   — | j                   j                  «       S r[   )r×   rZ  r  s    r2   rZ  z*PLBartForConditionalGeneration.get_decoderú  rx  r4   NÚnew_num_tokensÚpad_to_multiple_ofÚmean_resizingr}   c                 óz   •— t         ‰| �  |||«      }| j                  |j                  j                  d   «       |S )Nr   )r<   Úresize_token_embeddingsÚ_resize_final_logits_biasrH   rD   )r>   rz  r{  r|  Únew_embeddingsr?   s        €r2   r~  z6PLBartForConditionalGeneration.resize_token_embeddingsý  s?   ø€ ô ™Ñ8¸ÐI[Ð]jÓkˆØ×&Ñ& ~×'<Ñ'<×'BÑ'BÀ1Ñ'EÔFØÐr4   c                 ó6  — | j                   j                  d   }||k  r| j                   d d …d |…f   }nSt        j                  d||z
  f| j                   j                  ¬«      }t        j
                  | j                   |gd¬«      }| j                  d|«       y )Nr&   r   )rC   r$   rq  )rq  rD   rE   ru  rC   rƒ   rt  )r>   rz  Úold_num_tokensÚnew_biasÚ
extra_biass        r2   r  z8PLBartForConditionalGeneration._resize_final_logits_bias  sŒ   € Ø×/Ñ/×5Ñ5°bÑ9ˆØ˜^Ò+Ø×-Ñ-ªa°°.°Ð.@ÑA‰HäŸ™ a¨¸.Ñ)HÐ%IÐRV×RhÑRh×RoÑRoÔpˆJÜ—y‘y $×"8Ñ"8¸*Ð!EÈ1ÔMˆHØ×ÑÐ0°(Õ;r4   c                 ó   — | j                   S r[   ©rv  r  s    r2   Úget_output_embeddingsz4PLBartForConditionalGeneration.get_output_embeddings  rW  r4   c                 ó   — || _         y r[   r†  ©r>   r€  s     r2   Úset_output_embeddingsz4PLBartForConditionalGeneration.set_output_embeddings  ó	   € Ø%ˆ�r4   ©r]  rã   r!   rz   r^  r_  r  r`  r5  ra  r6  r  rb  ÚlabelsrÁ   r|   r  r  c                 ó¬  — |�|n| j                   j                  }|�$|€"|€ t        || j                   j                  «      }| j	                  |||||||||	|
|||||¬«      }| j                  |d   «      }|| j                  j                  |j                  «      z   }d}|�Ft        «       } ||j                  d| j                   j                  «      |j                  d«      «      }|s|f|dd z   }|�|f|z   S |S t        |||j                  |j                  |j                  |j                   |j"                  |j$                  |j&                  ¬«	      S )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]`.

        Returns:

        N)rz   r^  ra  r_  r  r`  r5  r6  r  rb  rÁ   r|   r  r  r   r&   r   ©	ÚlossÚlogitsr6  re  rf  r9  rg  r¾   rh  )rg   r  r3   r"   r×   rv  rq  r  rC   r	   rs   r÷   r   r6  re  rf  r9  rg  r¾   rh  )r>   r!   rz   r^  r_  r  r`  r5  ra  r6  r  rb  r�  rÁ   r|   r  r  r´   Ú	lm_logitsÚmasked_lm_lossÚloss_fctÚoutputs                         r2   rJ   z&PLBartForConditionalGeneration.forward  sy  € ð> &1Ð%<‘kÀ$Ç+Á+×B]ÑB]ˆàÐØ Ð(Ð-BÐ-JÜ$6°v¸t¿{¹{×?WÑ?WÓ$XÐ!à—*‘*ØØ)Ø/Ø+Ø#9ØØ/Ø!5Ø+Ø'Ø"7ØØ/Ø!5Ø#ð ó 
ˆð" —L‘L ¨¡Ó,ˆ	Ø × 6Ñ 6× 9Ñ 9¸)×:JÑ:JÓ KÑKˆ	àˆØÐÜ'Ó)ˆHÙ% i§n¡n°R¸¿¹×9OÑ9OÓ&PÐRX×R]ÑR]Ð^`ÓRaÓbˆNáØ�\ G¨A¨B KÑ/ˆFØ3AÐ3M�^Ð%¨Ñ.ÐYÐSYÐYäØØØ#×3Ñ3Ø")×"?Ñ"?Ø&×9Ñ9Ø$×5Ñ5Ø&-×&GÑ&GØ")×"?Ñ"?Ø&×9Ñ9ô

ð 
	
r4   c                 óB   — t        || j                  j                  «      S r[   )r3   rg   r"   )r>   r�  s     r2   Ú%prepare_decoder_input_ids_from_labelszDPLBartForConditionalGeneration.prepare_decoder_input_ids_from_labelsa  s   € Ü! &¨$¯+©+×*BÑ*BÓCÐCr4   c                 ó\   ‡— d}| D ]#  }|t        ˆfd„|d d D «       «      |dd  z   fz  }Œ% |S )Nrç   c              3   ót   •K  — | ]/  }|j                  d ‰j                  |j                  «      «      –— Œ1 y­w©r   N©Úindex_selectr  rC   ©r  Ú
past_stateÚbeam_idxs     €r2   r  z@PLBartForConditionalGeneration._reorder_cache.<locals>.<genexpr>j  s.   øè ø€ ÒrÐU_�j×-Ñ-¨a°·±¸Z×=NÑ=NÓ1O×PÑrùó   ƒ58r:   ©r"  ©r6  rŸ  Úreordered_pastÚ
layer_pasts    `  r2   Ú_reorder_cachez-PLBartForConditionalGeneration._reorder_cached  sT   ø€ àˆØ)ò 	ˆJàÜÓrÐcmÐnpÐopÐcqÔrÓrØ˜Q˜R�.ñ!ðñ ‰Nð	ð Ðr4   )NT)NNNNNNNNNNNNNNNN)&rN   rO   rP   rä   Ú_keys_to_ignore_on_load_missingrk  r    r=   rV  rZ  rR   r   r•   r   rà   r~  r  r‡  rŠ  r   rl  r   r   rn  r   ÚPLBART_GENERATION_EXAMPLErE   r,  rS   r   rµ   r   r   rJ   r—  Ústaticmethodr¥  rT   rU   s   @r2   rp  rp  æ  sw  ø„ ð
  ÐØ':Ð&;Ð#ÚiÐð˜|õ ò(ò(ð dhñØ!ðØ7?À±}ðØ\`ðà	�‰õð<¸ð <Àó <òò&ñ +Ð+BÓCÙ¨?ÈÔYÙÐ1Ó2ð 15Ø59Ø8<Ø9=Ø,0Ø8<Ø7;Ø=AØ=AØ59Ø=AØ)-Ø$(Ø,0Ø/3Ø&*ñ#I
à˜E×,Ñ,Ñ-ðI
ð ! ×!1Ñ!1Ñ2ðI
ð $ E×$4Ñ$4Ñ5ð	I
ð
 !)¨¯©Ñ 6ðI
ð ˜EŸL™LÑ)ðI
ð $ E×$4Ñ$4Ñ5ðI
ð ' u§|¡|Ñ4ðI
ð " $ u×'8Ñ'8Ñ"9Ñ:ðI
ð " $ u×'8Ñ'8Ñ"9Ñ:ðI
ð   × 1Ñ 1Ñ2ðI
ð  (¨×(9Ñ(9Ñ:ðI
ð ˜Ÿ™Ñ&ðI
ð ˜D‘>ðI
ð $ D™>ðI
ð  ' t™nð!I
ð" ˜d‘^ð#I
ð$ 
ˆu�U—\‘\Ñ" OÐ3Ñ	4ò%I
ó 3ó Zó DðI
ðVD¸E¿L¹Ló Dð ñó ôr4   rp  z�
    PLBart model with a sequence classification/head on top (a linear layer on top of the pooled output) e.g. for code
    classification.
    c            %       ó  ‡ — e Zd ZddgZdefˆ fd„Z ee«       ee	e
e¬«      	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddeej                     deej                     deej                     d	eej                     d
eej                     deej                     deej                     deeej"                        deej"                     deej"                     deej                     dee   dee   dee   dee   deee
f   f d„«       «       Zˆ xZS )ÚPLBartForSequenceClassificationrH  rI  rg   c                 óÜ   •— t        ‰| �  |fi |¤Ž t        |«      | _        t	        |j
                  |j
                  |j                  |j                  «      | _        | j                  «        y r[   )
r<   r=   rG  r×   rË   r™   Ú
num_labelsÚclassifier_dropoutÚclassification_headr  )r>   rg   Úkwargsr?   s      €r2   r=   z(PLBartForSequenceClassification.__init__z  sZ   ø€ Ü‰Ñ˜Ñ* 6Ò*Ü  Ó(ˆŒ
Ü#;Ø�N‰NØ�N‰NØ×ÑØ×%Ñ%ó	$
ˆÔ ð 	�‰Õr4   r[  r!   rz   r^  r_  r  r`  r5  ra  r  rb  r�  rÁ   r|   r  r  r}   c                 óæ  — |�|n| j                   j                  }|�d}|€$|	�"t        d| j                  j                  › �«      ‚| j                  |||||||||	|
||||¬«      }|d   }|j                  | j                   j                  «      j                  |j                  «      }t        t        j                  |j                  d«      «      «      dkD  rt        d«      ‚||dd…f   j                  |j!                  d«      d|j!                  d«      «      dd…ddd…f   }| j#                  |«      }d}|��Ê|j                  |j                  «      }| j                   j$                  €¡| j                   j&                  dk(  rd	| j                   _        nv| j                   j&                  dkD  rL|j(                  t        j*                  k(  s|j(                  t        j,                  k(  rd
| j                   _        nd| j                   _        | j                   j$                  d	k(  rSt/        «       }| j                   j&                  dk(  r& ||j1                  «       |j1                  «       «      }n– |||«      }nŒ| j                   j$                  d
k(  rGt3        «       } ||j                  d| j                   j&                  «      |j                  d«      «      }n,| j                   j$                  dk(  rt5        «       } |||«      }|s|f|dd z   }|�|f|z   S |S t7        |||j8                  |j:                  |j<                  |j>                  |j@                  |jB                  |jD                  ¬«	      S )a3  
        labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
            Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
            config.num_labels - 1]`. If `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
        NFz8Passing input embeddings is currently not supported for )rz   r^  r_  r  r`  r5  ra  r  rb  rÁ   r|   r  r  r   r   z7All examples must have the same number of <eos> tokens.r&   Ú
regressionÚsingle_label_classificationÚmulti_label_classificationr�  )#rg   r  ÚNotImplementedErrorr?   rN   r×   ÚeqÚeos_token_idr  rC   r  rE   Úunique_consecutiver+   r(   rs   r‚   r®  Úproblem_typer¬  rB   rG   rR   r
   r.   r	   r   r   r6  re  rf  r9  rg  r¾   rh  )r>   r!   rz   r^  r_  r  r`  r5  ra  r  rb  r�  rÁ   r|   r  r  r´   rw   Úeos_maskÚsentence_representationr‘  r�  r”  r•  s                           r2   rJ   z'PLBartForSequenceClassification.forward‡  s  € ð< &1Ð%<‘kÀ$Ç+Á+×B]ÑB]ˆØÐØˆIàÐ Ð!:Ü%ØJÈ4Ï>É>×KbÑKbÐJcÐdóð ð —*‘*ØØ)Ø/Ø#9ØØ/Ø!5Ø+Ø'Ø"7ØØ/Ø!5Ø#ð ó 
ˆð    ™
ˆà—<‘< §¡× 8Ñ 8Ó9×<Ñ<¸]×=QÑ=QÓRˆäŒu×'Ñ'¨¯©°Q«Ó8Ó9¸AÒ=ÜÐVÓWÐWØ"/°º!°Ñ"<×"AÑ"AÀ-×BTÑBTÐUVÓBWÐY[Ð]j×]oÑ]oÐprÓ]sÓ"tÚˆr’1ˆHñ#
Ðð ×)Ñ)Ð*AÓBˆàˆØÑØ—Y‘Y˜vŸ}™}Ó-ˆFØ�{‰{×'Ñ'Ð/Ø—;‘;×)Ñ)¨QÒ.Ø/;�D—K‘KÕ,Ø—[‘[×+Ñ+¨aÒ/°V·\±\ÄUÇZÁZÒ5OÐSY×S_ÑS_Ôch×clÑclÒSlØ/L�D—K‘KÕ,à/K�D—K‘KÔ,à�{‰{×'Ñ'¨<Ò7Ü"›9�Ø—;‘;×)Ñ)¨QÒ.Ù# F§N¡NÓ$4°f·n±nÓ6FÓG‘Dá# F¨FÓ3‘DØ—‘×)Ñ)Ð-JÒJÜ+Ó-�Ù §¡¨B°·±×0FÑ0FÓ GÈÏÉÐUWËÓY‘Ø—‘×)Ñ)Ð-IÒIÜ,Ó.�Ù ¨Ó/�ÙØ�Y ¨¨ Ñ,ˆFØ)-Ð)9�T�G˜fÑ$ÐE¸vÐEä.ØØØ#×3Ñ3Ø")×"?Ñ"?Ø&×9Ñ9Ø$×5Ñ5Ø&-×&GÑ&GØ")×"?Ñ"?Ø&×9Ñ9ô

ð 
	
r4   rj  )rN   rO   rP   rk  r    r=   r   rl  r   rm  r   rn  r   rE   r,  rS   r   rµ   r•   r   r   rJ   rT   rU   s   @r2   rª  rª  p  s¾  ø„ ð 8Ð9VÐWÐð˜|õ ñ +Ð+BÓCÙØ&Ø3Ø$ôð 15Ø15Ø8<Ø=AØ,0Ø48Ø7;Ø=AØ59Ø=AØ-1Ø$(Ø,0Ø/3Ø&*ñ!`
à˜E×,Ñ,Ñ-ð`
ð ! §¡Ñ.ð`
ð $ E×$4Ñ$4Ñ5ð	`
ð
 !)¨×)9Ñ)9Ñ :ð`
ð ˜EŸL™LÑ)ð`
ð $ E§L¡LÑ1ð`
ð ' u§|¡|Ñ4ð`
ð " $ u×'8Ñ'8Ñ"9Ñ:ð`
ð   × 1Ñ 1Ñ2ð`
ð  (¨×(9Ñ(9Ñ:ð`
ð ˜×)Ñ)Ñ*ð`
ð ˜D‘>ð`
ð $ D™>ð`
ð ' t™nð`
ð  ˜d‘^ð!`
ð" 
ˆuÐ5Ð5Ñ	6ò#`
óó Dô`
r4   rª  c                   ó(   ‡ — e Zd ZdZˆ fd„Zd„ Zˆ xZS )ÚPLBartDecoderWrapperz½
    This wrapper class is a helper class to correctly load pretrained checkpoints when the causal language model is
    used in combination with the [`EncoderDecoderModel`] framework.
    c                 óD   •— t         ‰| �  |«       t        |«      | _        y r[   )r<   r=   r.  rM  r¨   s     €r2   r=   zPLBartDecoderWrapper.__init__ø  s   ø€ Ü‰Ñ˜Ô Ü$ VÓ,ˆ�r4   c                 ó&   —  | j                   |i |¤ŽS r[   rY  )r>   Úargsr¯  s      r2   rJ   zPLBartDecoderWrapper.forwardü  s   € Øˆt�|‰|˜TÐ, VÑ,Ð,r4   )rN   rO   rP   rQ   r=   rJ   rT   rU   s   @r2   r¼  r¼  ò  s   ø„ ñô
-ö-r4   r¼  c                    óà  ‡ — e Zd ZdgZˆ fd„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
 eee¬	«      	 	 	 	 	 	 	 	 	 	 	 	 	 dd
eej                      deej"                     deej$                     deej$                     deej"                     deej"                     deeej$                        deej$                     deej                      dee   dee   dee   dee   deeef   fd„«       Zed„ «       Zˆ xZS )ÚPLBartForCausalLMrr  c                 ó  •— t        j                  |«      }d|_        d|_        t        ‰| �  |«       t        |«      | _        t        j                  |j                  |j                  d¬«      | _        | j                  «        y )NTFri   )ÚcopyÚdeepcopyrd   Úis_encoder_decoderr<   r=   r¼  r×   r   rl   Úhidden_sizer÷   rv  r  r¨   s     €r2   r=   zPLBartForCausalLM.__init__  sf   ø€ Ü—‘˜vÓ&ˆØ ˆÔØ$)ˆÔ!Ü‰Ñ˜Ô Ü)¨&Ó1ˆŒ
ä—y‘y ×!3Ñ!3°V×5FÑ5FÈUÔSˆŒð 	�‰Õr4   c                 óB   — | j                   j                  j                  S r[   ©r×   rM  rê   r  s    r2   r  z&PLBartForCausalLM.get_input_embeddings  s   € Ø�z‰z×!Ñ!×.Ñ.Ð.r4   c                 ó:   — || j                   j                  _        y r[   rÈ  r  s     r2   r
  z&PLBartForCausalLM.set_input_embeddings  s   € Ø*/ˆ�
‰
×ÑÕ'r4   c                 ó   — | j                   S r[   r†  r  s    r2   r‡  z'PLBartForCausalLM.get_output_embeddings  rW  r4   c                 ó   — || _         y r[   r†  r‰  s     r2   rŠ  z'PLBartForCausalLM.set_output_embeddings  r‹  r4   c                 ó&   — || j                   _        y r[   ©r×   rM  )r>   rM  s     r2   Úset_decoderzPLBartForCausalLM.set_decoder  s   € Ø$ˆ�
‰
Õr4   c                 ó.   — | j                   j                  S r[   rÍ  r  s    r2   rZ  zPLBartForCausalLM.get_decoder  s   € Ø�z‰z×!Ñ!Ð!r4   rŒ  r!   rz   r¾   r¿   r  r5  r6  r  r�  rÁ   r|   r  r  r}   c                 óz  — |�|n| j                   j                  }|�|n| j                   j                  }|�|n| j                   j                  }| j                  j                  |||||||||
|||¬«      }| j                  |d   «      }d}|	�a|	j                  |j                  «      }	t        «       } ||j                  d| j                   j                  «      |	j                  d«      «      }|s|f|dd z   }|�|f|z   S |S t        |||j                  |j                  |j                  |j                   ¬«      S )aì  
        Args:
            input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
                Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
                provide it.

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

                [What are input IDs?](../glossary#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)
            encoder_hidden_states  (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
                Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
                if the model is configured as a decoder.
            encoder_attention_mask (`torch.FloatTensor` of shape `(batch_size, sequence_length)`, *optional*):
                Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used
                in the cross-attention if the model is configured as a decoder. Mask values selected in `[0, 1]`:
            head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
                Mask to nullify selected heads of the attention modules. Mask values selected in `[0, 1]`:

                - 1 indicates the head is **not masked**,
                - 0 indicates the head is **masked**.

            cross_attn_head_mask (`torch.Tensor` of shape `(decoder_layers, decoder_attention_heads)`, *optional*):
                Mask to nullify selected heads of the cross-attention modules. Mask values selected in `[0, 1]`:

                - 1 indicates the head is **not masked**,
                - 0 indicates the head is **masked**.

            past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
                Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of
                shape `(batch_size, num_heads, sequence_length, embed_size_per_head)`) and 2 additional tensors of
                shape `(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)`. The two additional
                tensors are only required when the model is used as a decoder in a Sequence to Sequence model.

                Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
                cross-attention blocks) that can be used (see `past_key_values` input) to speed up sequential decoding.

                If `past_key_values` are used, the user can optionally input only the last `decoder_input_ids` (those
                that don't have their past key value states given to this model) of shape `(batch_size, 1)` instead of
                all `decoder_input_ids` of shape `(batch_size, sequence_length)`.
            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]`.
            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`).

                - 1 for tokens that are **not masked**,
                - 0 for tokens that are **masked**.
            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.

        Returns:

        Example:

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

        >>> tokenizer = AutoTokenizer.from_pretrained("uclanlp/plbart-base")
        >>> model = PLBartForCausalLM.from_pretrained("uclanlp/plbart-base", add_cross_attention=False)
        >>> assert model.config.is_decoder, f"{model.__class__} has to be configured as a decoder."
        >>> inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
        >>> outputs = model(**inputs)

        >>> logits = outputs.logits
        >>> expected_shape = [1, inputs.input_ids.shape[-1], model.config.vocab_size]
        >>> list(logits.shape) == expected_shape
        True
        ```Nrd  r   r&   r   )r�  r‘  r6  rw   r  r9  )rg   r|   r  r  r×   rM  rv  r  rC   r	   rs   r÷   r   r6  rw   r  r9  )r>   r!   rz   r¾   r¿   r  r5  r6  r  r�  rÁ   r|   r  r  r´   r‘  r�  r”  r•  s                      r2   rJ   zPLBartForCausalLM.forward"  sX  € ðL 2CÐ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ð$DÑ È$Ï+É+×JjÑJjð 	ð &1Ð%<‘kÀ$Ç+Á+×B]ÑB]ˆð —*‘*×$Ñ$ØØ)Ø"7Ø#9ØØ!5Ø+Ø'ØØ/Ø!5Ø#ð %ó 
ˆð —‘˜g a™jÓ)ˆàˆØÐØ—Y‘Y˜vŸ}™}Ó-ˆFÜ'Ó)ˆHÙ˜FŸK™K¨¨D¯K©K×,BÑ,BÓCÀVÇ[Á[ÐQSÃ_ÓUˆDáØ�Y ¨¨ Ñ,ˆFØ'+Ð'7�D�7˜VÑ#ÐC¸VÐCä0ØØØ#×3Ñ3Ø!×/Ñ/Ø×)Ñ)Ø$×5Ñ5ô
ð 	
r4   c                 óJ   ‡— d}| D ]  }|t        ˆfd„|D «       «      fz  }Œ |S )Nrç   c              3   ót   •K  — | ]/  }|j                  d ‰j                  |j                  «      «      –— Œ1 y­wrš  r›  r�  s     €r2   r  z3PLBartForCausalLM._reorder_cache.<locals>.<genexpr>¸  s.   øè ø€ ÒnÐU_�j×-Ñ-¨a°·±¸Z×=NÑ=NÓ1O×PÑnùr   r¡  r¢  s    `  r2   r¥  z PLBartForCausalLM._reorder_cache³  s=   ø€ àˆØ)ò 	ˆJØÜÓnÐcmÔnÓnðñ ‰Nð	ð Ðr4   )NNNNNNNNNNNNN)rN   rO   rP   rk  r=   r  r
  r‡  rŠ  rÎ  rZ  r   r   rn  r   rE   r,  rS   rµ   r   r•   r   r   rJ   r¨  r¥  rT   rU   s   @r2   rÁ  rÁ    s¢  ø„ Ø*Ð+Ðô
ò/ò0òò&ò%ò"ñ Ð+LÐ[jÔkð 15Ø15Ø=AØ>BØ,0Ø7;Ø=AØ59Ø-1Ø$(Ø,0Ø/3Ø&*ñN
à˜E×,Ñ,Ñ-ðN
ð ! §¡Ñ.ðN
ð  (¨×(9Ñ(9Ñ:ð	N
ð
 !)¨×):Ñ):Ñ ;ðN
ð ˜EŸL™LÑ)ðN
ð ' u§|¡|Ñ4ðN
ð " $ u×'8Ñ'8Ñ"9Ñ:ðN
ð   × 1Ñ 1Ñ2ðN
ð ˜×)Ñ)Ñ*ðN
ð ˜D‘>ðN
ð $ D™>ðN
ð ' t™nðN
ð ˜d‘^ðN
ð 
ˆuÐ7Ð7Ñ	8òN
ó lðN
ð` ñó ôr4   rÁ  )rÁ  rp  rª  rG  rÖ   )GrQ   rÃ  rõ   Útypingr   r   r   r   rE   Útorch.utils.checkpointr   Útorch.nnr   r	   r
   Úactivationsr   Ú
generationr   Úmodeling_attn_mask_utilsr   r   r   r   Úmodeling_outputsr   r   r   r   r   r   Úmodeling_utilsr   Úutilsr   r   r   r   r   r   Úconfiguration_plbartr    Ú
get_loggerrN   r:  rm  rn  rS   rR   r3   rà   r6   rW   ÚModuler`   r—   rš   r¸   rË   rÖ   ÚPLBART_START_DOCSTRINGr§  rl  ré   r.  rG  rp  rª  r¼  rÁ  Ú__all__rç   r4   r2   ú<module>rá     sô  ðñ ã Û ß /Ó /ã Û Ý ß AÑ Aå !Ý )÷ó ÷÷ õ .÷÷ õ /ð 
ˆ×	Ñ	˜HÓ	%€à+Ð Ø €ð %§,¡,ð ¸có ô*8 r§|¡|ô 8ô.
= §¡ô 
=ô[B�b—i‘iô [Bô~C˜Ÿ™ô CðN $ _Ð5Ð ôu˜Ÿ™ô uôr˜rŸy™yô ô0?˜Oô ?ð$Ð ð Ð ð.`Ð ôHy
Ð)ô y
ôz\
Ð)ô \
ñ~ ØZØóôt
Ð'ó t
ó	ðt
ñn ØrØóôCÐ%:¸Oó Có	ðCñL ðð óôw
Ð&;ó w
óðw
ôv-Ð0ô -ôyÐ-¨ô yòx�r4   