+
    œ°³ju{  ã                   óÆ  € R t ^ RIt^ RIHt ^ RIHtHtHt ^RIHt	 ^RI
Ht ^RIHt ^RIHtHtHtHtHtHtHt ^RIHt ^RIHt ^R	IHtHtHt ^R
IHt ^RI H!t!H"t"H#t#H$t$H%t% ^RI&H't' ]PP                  ! ])4      t* ! R R]"4      t+ ! R R]%4      t, ! R R]!4      t- ! R R]#4      t.] ! R R]4      4       t/ ! R R]$4      t0]! RR7       ! R R]/]4      4       t1] ! R R]/4      4       t2 ! R R ]Pf                  4      t4]! R!R7       ! R" R#]/4      4       t5] ! R$ R%]/4      4       t6] ! R& R']/4      4       t7 ! R( R)]Pf                  4      t8] ! R* R+]/4      4       t9. R,Ot:R# )-zPyTorch RoBERTa model.N)ÚBCEWithLogitsLossÚCrossEntropyLossÚMSELoss)Úinitialization)Úgelu)ÚGenerationMixin)Ú,BaseModelOutputWithPoolingAndCrossAttentionsÚ!CausalLMOutputWithCrossAttentionsÚMaskedLMOutputÚMultipleChoiceModelOutputÚQuestionAnsweringModelOutputÚSequenceClassifierOutputÚTokenClassifierOutput)ÚPreTrainedModel)ÚUnpack)ÚTransformersKwargsÚauto_docstringÚlogging)Úcan_return_tuple)ÚBertCrossAttentionÚBertEmbeddingsÚ	BertLayerÚ	BertModelÚBertSelfAttention)ÚRobertaConfigc                   ól   a a€ ] tR t^,t oV 3R ltRV3R lR llt]R 4       t]RR l4       tRt	Vt
V ;t# )	ÚRobertaEmbeddingsc                óÈ   <€ \         SV `  V4       V =V =VP                  V n        \
        P                  ! VP                  VP                  V P                  R 7      V n        R# ))Úpadding_idxN)	ÚsuperÚ__init__Úpad_token_idÚposition_embeddingsr   ÚnnÚ	EmbeddingÚmax_position_embeddingsÚhidden_size©ÚselfÚconfigÚ	__class__s   &&€Úl/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/roberta/modular_roberta.pyr    ÚRobertaEmbeddings.__init__-   sT   ø€ Ü‰Ñ˜Ô àÐØÐ$à!×.Ñ.ˆÔÜ#%§<¢<Ø×*Ñ*¨F×,>Ñ,>ÈD×L\ÑL\ô$
ˆÖ ó    c          
      óÀ   <€ V ^8„  d   QhRS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[ P                  R,          RS[/# )é   Ú	input_idsNÚtoken_type_idsÚposition_idsÚinputs_embedsÚpast_key_values_length)ÚtorchÚ
LongTensorÚFloatTensorÚint)ÚformatÚ__classdict__s   "€r+   Ú__annotate__ÚRobertaEmbeddings.__annotate__8   si   ø€ ÷ .ñ .á×#Ñ# dÕ*ð.ñ ×(Ñ(¨4Õ/ð.ñ ×&Ñ&¨Õ-ð	.ñ
 ×(Ñ(¨4Õ/ð.ñ !$ñ.r-   c                ó4  € Vf=   Ve   V P                  WP                  V4      pMV P                  W@P                  4      pVe   VP                  4       pMVP                  4       R R pVw  rxVf¿   \	        V R4      '       dr   V P
                  P                  VP                  4      P                  VP                  ^ ,          R4      p	\        P                  ! V	^VR7      p	V	P                  Wx4      pM;\        P                  ! V\        P                  V P                  P                  R7      pVf   V P                  V4      pV P!                  V4      p
WJ,           pV P#                  V4      pW¼,           pV P%                  V4      pV P'                  V4      pV# )Nr1   )ÚdimÚindex©ÚdtypeÚdeviceéÿÿÿÿ)Ú"create_position_ids_from_input_idsr   Ú&create_position_ids_from_inputs_embedsÚsizeÚhasattrr1   ÚtorB   ÚexpandÚshaper5   ÚgatherÚzerosÚlongr2   Úword_embeddingsÚtoken_type_embeddingsr"   Ú	LayerNormÚdropout)r(   r0   r1   r2   r3   r4   Úinput_shapeÚ
batch_sizeÚ
seq_lengthÚbuffered_token_type_idsrO   Ú
embeddingsr"   s   &&&&&&       r+   ÚforwardÚRobertaEmbeddings.forward8   st  € ð ÒØÒ$à#×FÑFØ×/Ñ/Ð1Gó ‘ð  $×JÑJÈ=×ZjÑZjÓk�àÒ Ø#Ÿ.™.Ó*‰Kà'×,Ñ,Ó.¨s°Ð3ˆKà!,Ñˆ
ð
 Ò!Ü�tÐ-×.Ò.à*.×*=Ñ*=×*@Ñ*@À×ATÑATÓ*U×*\Ñ*\Ð]i×]oÑ]oÐpqÕ]rÐtvÓ*wÐ'Ü*/¯,ª,Ð7NÐTUÐ]iÔ*jÐ'Ø!8×!?Ñ!?À
Ó!W‘ä!&§¢¨[ÄÇ
Á
ÐSW×SdÑSd×SkÑSkÔ!l�àÒ Ø ×0Ñ0°Ó;ˆMØ $× :Ñ :¸>Ó JÐØ"Õ:ˆ
à"×6Ñ6°|ÓDÐØÕ5ˆ
à—^‘^ JÓ/ˆ
Ø—\‘\ *Ó-ˆ
ØÐr-   c                ó  € V P                  4       RR pV^,          p\        P                  ! V^,           W1,           ^,           \        P                  V P                  R7      pVP                  ^ 4      P                  V4      # )z¯
We are provided embeddings directly. We cannot infer which are padded so just generate sequential position ids.

Args:
    inputs_embeds: torch.Tensor

Returns: torch.Tensor
Nr@   rC   )rF   r5   ÚarangerM   rB   Ú	unsqueezerI   )r3   r   rR   Úsequence_lengthr2   s   &&   r+   rE   Ú8RobertaEmbeddings.create_position_ids_from_inputs_embedsh   sn   € ð $×(Ñ(Ó*¨3¨BÐ/ˆØ% a�.ˆä—|’|Ø˜!�O˜_Õ:¸QÕ>ÄeÇjÁjÐYf×YmÑYmô
ˆð ×%Ñ% aÓ(×/Ñ/°Ó<Ð<r-   c                óØ   € V P                  V4      P                  4       p\        P                  ! V^R7      P	                  V4      V,           V,          pVP                  4       V,           # )zí
Replace non-padding symbols with their position numbers. Position numbers begin at padding_idx+1. Padding symbols
are ignored. This is modified from fairseq's `utils.make_positions`.

Args:
    x: torch.Tensor x:

Returns: torch.Tensor
©r>   )Úner8   r5   ÚcumsumÚtype_asrM   )r0   r   r4   ÚmaskÚincremental_indicess   &&&  r+   rD   Ú4RobertaEmbeddings.create_position_ids_from_input_idsz   sW   € ð �|‰|˜KÓ(×,Ñ,Ó.ˆÜ$Ÿ|š|¨D°aÔ8×@Ñ@ÀÓFÐI_Õ_ÐcgÕgÐØ"×'Ñ'Ó)¨KÕ7Ð7r-   )r   r"   )NNNNé    )rf   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r    rW   ÚstaticmethodrE   rD   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r*   r:   s   @@r+   r   r   ,   sB   ù‡ € õ	
÷.ò .ð` ñ=ó ð=ð" ó8ó ÷8ð 8r-   r   c                   ó   € ] tR t^‹tRtR# )ÚRobertaSelfAttention© N©rg   rh   ri   rj   rl   rr   r-   r+   rq   rq   ‹   ó   † Ûr-   rq   c                   ó   € ] tR t^�tRtR# )ÚRobertaCrossAttentionrr   Nrs   rr   r-   r+   rv   rv   �   rt   r-   rv   c                   ó   € ] tR t^“tRtR# )ÚRobertaLayerrr   Nrs   rr   r-   r+   rx   rx   “   rt   r-   rx   c                   ó†   a a€ ] tR t^—t o]tRtRtRtRt	Rt
RtR]R]R]/t]P"                  ! 4       V 3R l4       tRtVtV ;t# )ÚRobertaPreTrainedModelÚrobertaTÚhidden_statesÚ
attentionsÚcross_attentionsc                óÄ  <€ \         SV `  V4       \        V\        4      '       d#   \        P
                  ! VP                  4       R# \        V\        4      '       d‚   \        P                  ! VP                  \        P                  ! VP                  P                  R,          4      P                  R4      4       \        P
                  ! VP                  4       R# R# )zInitialize the weightsNrC   )é   rC   )r   Ú_init_weightsÚ
isinstanceÚRobertaLMHeadÚinitÚzeros_Úbiasr   Úcopy_r2   r5   rZ   rJ   rI   r1   )r(   Úmoduler*   s   &&€r+   r�   Ú$RobertaPreTrainedModel._init_weights¦   s�   ø€ ô 	‰Ñ˜fÔ%Ü�fœm×,Ò,Ü�KŠK˜Ÿ™Ö$Ü˜Ô 1×2Ò2Ü�JŠJ�v×*Ñ*¬E¯LªL¸×9LÑ9L×9RÑ9RÐSUÕ9VÓ,W×,^Ñ,^Ð_fÓ,gÔhÜ�KŠK˜×-Ñ-Ö.ñ 3r-   rr   )rg   rh   ri   rj   r   Úconfig_classÚbase_model_prefixÚsupports_gradient_checkpointingÚ_supports_flash_attnÚ_supports_sdpaÚ_supports_flex_attnÚ_supports_attention_backendrx   rq   rv   Ú_can_record_outputsr5   Úno_gradr�   rl   rm   rn   ro   s   @@r+   rz   rz   —   se   ù‡ € à €LØ!ÐØ&*Ð#ØÐØ€NØÐØ"&Ðà˜ØÐ*ØÐ1ðÐð ‡]‚]ƒ_ô/ó ÷/ð /r-   rz   c                   ó6   a a€ ] tR t^±t oRV 3R lltRtVtV ;t# )ÚRobertaModelc                ó&   <€ \         SV `  W4       R # ©N)r   r    )r(   r)   Úadd_pooling_layerr*   s   &&&€r+   r    ÚRobertaModel.__init__²   s   ø€ Ü‰Ñ˜Ö&r-   rr   )T)rg   rh   ri   rj   r    rl   rm   rn   ro   s   @@r+   r”   r”   ±   s   ù‡ € ÷'÷ 'r-   r”   zS
    RoBERTa Model with a `language modeling` head on top for CLM fine-tuning.
    )Úcustom_introc                   ót   a a€ ] tR t^¶t oRRRR/tV 3R ltR tR t]]	RV3R lR	 ll4       4       t
R
tVtV ;t# )ÚRobertaForCausalLMúlm_head.decoder.weightú)roberta.embeddings.word_embeddings.weightúlm_head.decoder.biasúlm_head.biasc                óØ   <€ \         SV `  V4       VP                  '       g   \        P	                  R 4       \        VRR7      V n        \        V4      V n        V P                  4        R# )zOIf you want to use `RobertaLMHeadModel` as a standalone, add `is_decoder=True.`F©r—   N©
r   r    Ú
is_decoderÚloggerÚwarningr”   r{   rƒ   Úlm_headÚ	post_initr'   s   &&€r+   r    ÚRobertaForCausalLM.__init__Á   sO   ø€ Ü‰Ñ˜Ô à× × Ð Ü�N‰NÐlÔmä# F¸eÔDˆŒÜ$ VÓ,ˆŒð 	�‰Ör-   c                ó.   € V P                   P                  # r–   ©r¦   Údecoder©r(   s   &r+   Úget_output_embeddingsÚ(RobertaForCausalLM.get_output_embeddingsÍ   ó   € Ø�|‰|×#Ñ#Ð#r-   c                ó&   € WP                   n        R # r–   rª   ©r(   Únew_embeddingss   &&r+   Úset_output_embeddingsÚ(RobertaForCausalLM.set_output_embeddingsÐ   ó   € Ø-�‰Ör-   c                ó0  <€ 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[ P                  R,          R
S[S[S[ P                  ,          ,          R,          RS[R,          RS[S[ P                  ,          RS[S[,          RS[S[ P                  ,          S[	,          /# )r/   r0   NÚattention_maskr1   r2   r3   Úencoder_hidden_statesÚencoder_attention_maskÚlabelsÚpast_key_valuesÚ	use_cacheÚlogits_to_keepÚkwargsÚreturn)
r5   r6   r7   ÚtupleÚboolr8   ÚTensorr   r   r	   )r9   r:   s   "€r+   r;   ÚRobertaForCausalLM.__annotate__Õ   s+  ø€ ÷ O
ñ O
á×#Ñ# dÕ*ðO
ñ ×)Ñ)¨DÕ0ðO
ñ ×(Ñ(¨4Õ/ð	O
ñ
 ×&Ñ&¨Õ-ðO
ñ ×(Ñ(¨4Õ/ðO
ñ  %×0Ñ0°4Õ7ðO
ñ !&× 1Ñ 1°DÕ 8ðO
ñ × Ñ  4Õ'ðO
ñ ™u¡U×%6Ñ%6Õ7Õ8¸4Õ?ðO
ñ ˜$•;ðO
ñ ™eŸl™lÕ*ðO
ñ Ñ+Õ,ðO
ñ 
‰u�|‰|Õ	Ñ@Õ	@ñO
r-   c                óÆ  € Ve   Rp
V P                   ! V3RVRVRVRVRVRVR	V	R
V
RR/	VB pVP                  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VVP                  VP                  VP                  VP                  R7      # )aµ  
token_type_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Segment token indices to indicate first and second portions of the inputs. Indices are selected in `[0,1]`:

    - 0 corresponds to a *sentence A* token,
    - 1 corresponds to a *sentence B* token.
    This parameter can only be used when the model is initialized with `type_vocab_size` parameter with value
    >= 2. All the value in this tensor should be always < type_vocab_size.

    [What are token type IDs?](../glossary#token-type-ids)
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
    `[-100, 0, ..., config.vocab_size]` (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, RobertaForCausalLM, AutoConfig
>>> import torch

>>> tokenizer = AutoTokenizer.from_pretrained("FacebookAI/roberta-base")
>>> config = AutoConfig.from_pretrained("FacebookAI/roberta-base")
>>> config.is_decoder = True
>>> model = RobertaForCausalLM.from_pretrained("FacebookAI/roberta-base", config=config)

>>> inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
>>> outputs = model(**inputs)

>>> prediction_logits = outputs.logits
```NFr·   r1   r2   r3   r¸   r¹   r»   r¼   Úreturn_dictTºNNNÚlogitsrº   Ú
vocab_size)ÚlossrÇ   r»   r|   r}   r~   rr   )r{   Úlast_hidden_stater‚   r8   Úslicer¦   Úloss_functionr)   rÈ   r	   r»   r|   r}   r~   )r(   r0   r·   r1   r2   r3   r¸   r¹   rº   r»   r¼   r½   r¾   Úoutputsr|   Úslice_indicesrÇ   rÉ   s   &&&&&&&&&&&&,     r+   rW   ÚRobertaForCausalLM.forwardÓ   sB  € ð` ÒØˆIà@DÇÂØñA
à)ðA
ð *ðA
ð &ð	A
ð
 (ðA
ð #8ðA
ð $:ðA
ð ,ðA
ð  ðA
ð ðA
ð ñA
ˆð  ×1Ñ1ˆä8BÀ>ÔSV×8WÒ8Wœ˜~˜o¨tÔ4Ð]kˆØ—‘˜m¨A¨}¸aÐ,?Õ@ÓAˆàˆØÒØ×%Ò%Ñp¨VÐp¸FÐpÈtÏ{É{×OeÑOeÐpÐioÑpˆDä0ØØØ#×3Ñ3Ø!×/Ñ/Ø×)Ñ)Ø$×5Ñ5ô
ð 	
r-   ©r¦   r{   )NNNNNNNNNNrf   ©rg   rh   ri   rj   Ú_tied_weights_keysr    r­   r³   r   r   rW   rl   rm   rn   ro   s   @@r+   r›   r›   ¶   sS   ù‡ € ð 	!Ð"MØ ðÐõ

ò$ò.ð Ø÷O
ñ O
ó ó ÷O
ð O
r-   r›   c                   ót   a a€ ] tR tRt oRRRR/tV 3R ltR tR t]]	RV3R	 lR
 ll4       4       t
RtVtV ;t# )ÚRobertaForMaskedLMi'  rœ   r�   rž   rŸ   c                óØ   <€ \         SV `  V4       VP                  '       d   \        P	                  R 4       \        VRR7      V n        \        V4      V n        V P                  4        R# )znIf you want to use `RobertaForMaskedLM` make sure `config.is_decoder=False` for bi-directional self-attention.Fr¡   Nr¢   r'   s   &&€r+   r    ÚRobertaForMaskedLM.__init__.  sU   ø€ Ü‰Ñ˜Ô à××ÐÜ�N‰Nð1ôô
 $ F¸eÔDˆŒÜ$ VÓ,ˆŒð 	�‰Ör-   c                ó.   € V P                   P                  # r–   rª   r¬   s   &r+   r­   Ú(RobertaForMaskedLM.get_output_embeddings=  r¯   r-   c                ó&   € WP                   n        R # r–   rª   r±   s   &&r+   r³   Ú(RobertaForMaskedLM.set_output_embeddings@  rµ   r-   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[ P                  R,          R	S[ P                  R,          R
S[S[,          RS[S[ P                  ,          S[,          /
# )r/   r0   Nr·   r1   r2   r3   r¸   r¹   rº   r¾   r¿   )r5   r6   r7   r   r   rÀ   rÂ   r
   )r9   r:   s   "€r+   r;   ÚRobertaForMaskedLM.__annotate__E  sÛ   ø€ ÷ 5
ñ 5
á×#Ñ# dÕ*ð5
ñ ×)Ñ)¨DÕ0ð5
ñ ×(Ñ(¨4Õ/ð	5
ñ
 ×&Ñ&¨Õ-ð5
ñ ×(Ñ(¨4Õ/ð5
ñ  %×0Ñ0°4Õ7ð5
ñ !&× 1Ñ 1°DÕ 8ð5
ñ × Ñ  4Õ'ð5
ñ Ñ+Õ,ð5
ñ 
‰u�|‰|Õ	™~Õ	-ñ5
r-   c	                óŒ  € V P                   ! V3RVRVRVRVRVRVRR/V	B p
V
^ ,          pV P                  V4      pR	pVeb   VP                  VP                  4      p\	        4       pV! VP                  RV P                  P                  4      VP                  R4      4      p\        VVV
P                  V
P                  R
7      # )a”  
token_type_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Segment token indices to indicate first and second portions of the inputs. Indices are selected in `[0,1]`:

    - 0 corresponds to a *sentence A* token,
    - 1 corresponds to a *sentence B* token.
    This parameter can only be used when the model is initialized with `type_vocab_size` parameter with value
    >= 2. All the value in this tensor should be always < type_vocab_size.

    [What are token type IDs?](../glossary#token-type-ids)
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Labels for computing the masked language modeling loss. Indices should be in `[-100, 0, ...,
    config.vocab_size]` (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]`
r·   r1   r2   r3   r¸   r¹   rÅ   TN©rÉ   rÇ   r|   r}   rC   )r{   r¦   rH   rB   r   Úviewr)   rÈ   r
   r|   r}   )r(   r0   r·   r1   r2   r3   r¸   r¹   rº   r¾   rÍ   Úsequence_outputÚprediction_scoresÚmasked_lm_lossÚloss_fcts   &&&&&&&&&,     r+   rW   ÚRobertaForMaskedLM.forwardC  sû   € ð: —,’,Øñ

à)ð

ð *ð

ð &ð	

ð
 (ð

ð #8ð

ð $:ð

ð ð

ð ñ

ˆð " !�*ˆØ ŸL™L¨Ó9ÐàˆØÒà—Y‘YÐ0×7Ñ7Ó8ˆFÜ'Ó)ˆHÙ%Ð&7×&<Ñ&<¸RÀÇÁ×AWÑAWÓ&XÐZ`×ZeÑZeÐfhÓZiÓjˆNäØØ$Ø!×/Ñ/Ø×)Ñ)ô	
ð 	
r-   rÐ   )NNNNNNNNrÑ   ro   s   @@r+   rÔ   rÔ   '  sO   ù‡ € ð 	!Ð"MØ ðÐõ
ò$ò.ð Ø÷5
ñ 5
ó ó ÷5
ð 5
r-   rÔ   c                   ó<   a a€ ] tR tRt oRtV 3R ltR tRtVtV ;t	# )rƒ   i}  z*Roberta Head for masked language modeling.c                ó¸  <€ \         SV `  4        \        P                  ! VP                  VP                  4      V n        \        P                  ! VP                  VP                  R 7      V n        \        P                  ! VP                  VP                  4      V n
        \        P                  ! \        P                  ! VP                  4      4      V n        R# ))ÚepsN)r   r    r#   ÚLinearr&   ÚdenserP   Úlayer_norm_epsÚ
layer_normrÈ   r«   Ú	Parameterr5   rL   r†   r'   s   &&€r+   r    ÚRobertaLMHead.__init__€  s‡   ø€ Ü‰ÑÔÜ—Y’Y˜v×1Ñ1°6×3EÑ3EÓFˆŒ
ÜŸ,š, v×'9Ñ'9¸v×?TÑ?TÔUˆŒä—y’y ×!3Ñ!3°V×5FÑ5FÓGˆŒÜ—L’L¤§¢¨V×->Ñ->Ó!?Ó@ˆŽ	r-   c                ó‚   € V P                  V4      p\        V4      pV P                  V4      pV P                  V4      pV# r–   )ré   r   rë   r«   ©r(   Úfeaturesr¾   Úxs   &&, r+   rW   ÚRobertaLMHead.forwardˆ  s;   € Ø�J‰J�xÓ ˆÜ�‹GˆØ�O‰O˜AÓˆð �L‰L˜‹Oˆàˆr-   )r†   r«   ré   rë   ©
rg   rh   ri   rj   Ú__doc__r    rW   rl   rm   rn   ro   s   @@r+   rƒ   rƒ   }  s   ù‡ € Ù4õA÷ò r-   rƒ   zŸ
    RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
    pooled output) e.g. for GLUE tasks.
    c                   ó\   a a€ ] tR tRt oV 3R lt]]RV3R lR ll4       4       tRtVt	V ;t
# )Ú RobertaForSequenceClassificationi“  c                ó¸   <€ \         SV `  V4       VP                  V n        Wn        \	        VR R7      V n        \        V4      V n        V P                  4        R# ©Fr¡   N)	r   r    Ú
num_labelsr)   r”   r{   ÚRobertaClassificationHeadÚ
classifierr§   r'   s   &&€r+   r    Ú)RobertaForSequenceClassification.__init__š  sH   ø€ Ü‰Ñ˜Ô Ø ×+Ñ+ˆŒØŒä# F¸eÔDˆŒÜ3°FÓ;ˆŒð 	�‰Ör-   c                óZ  <€ 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[S[,          R	S[S[ P                  ,          S[,          /# ©
r/   r0   Nr·   r1   r2   r3   rº   r¾   r¿   )r5   r6   r7   r   r   rÀ   rÂ   r   )r9   r:   s   "€r+   r;   Ú-RobertaForSequenceClassification.__annotate__§  s¼   ø€ ÷ C
ñ C
á×#Ñ# dÕ*ðC
ñ ×)Ñ)¨DÕ0ðC
ñ ×(Ñ(¨4Õ/ð	C
ñ
 ×&Ñ&¨Õ-ðC
ñ ×(Ñ(¨4Õ/ðC
ñ × Ñ  4Õ'ðC
ñ Ñ+Õ,ðC
ñ 
‰u�|‰|Õ	Ñ7Õ	7ñC
r-   c                ó(  € V P                   ! V3RVRVRVRVRR/VB pV^ ,          p	V P                  V	4      p
RpVEe³   VP                  V
P                  4      pV P                  P
                  f–   V P                  ^8X  d   RV P                  n        MrV P                  ^8”  dQ   VP                  \        P                  8X  g    VP                  \        P                  8X  d   R	V P                  n        MR
V P                  n        V P                  P
                  R8X  dK   \        4       pV P                  ^8X  d'   V! V
P                  4       VP                  4       4      pMŽV! W¦4      pM…V P                  P
                  R	8X  d>   \        4       pV! V
P                  RV P                  4      VP                  R4      4      pM-V P                  P
                  R
8X  d   \        4       pV! W¦4      p\!        VV
VP"                  VP$                  R7      # )a  
token_type_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Segment token indices to indicate first and second portions of the inputs. Indices are selected in `[0,1]`:

    - 0 corresponds to a *sentence A* token,
    - 1 corresponds to a *sentence B* token.
    This parameter can only be used when the model is initialized with `type_vocab_size` parameter with value
    >= 2. All the value in this tensor should be always < type_vocab_size.

    [What are token type IDs?](../glossary#token-type-ids)
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 regression loss is computed (Mean-Square loss), If
    `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
r·   r1   r2   r3   rÅ   TNÚ
regressionÚsingle_label_classificationÚmulti_label_classificationrÞ   rC   )r{   rû   rH   rB   r)   Úproblem_typerù   rA   r5   rM   r8   r   Úsqueezer   rß   r   r   r|   r}   ©r(   r0   r·   r1   r2   r3   rº   r¾   rÍ   rà   rÇ   rÉ   rã   s   &&&&&&&,     r+   rW   Ú(RobertaForSequenceClassification.forward¥  sÃ  € ð6 —,’,Øñ
à)ð
ð *ð
ð &ð	
ð
 (ð
ð ð
ð ñ
ˆð " !�*ˆØ—‘ Ó1ˆàˆØÓà—Y‘Y˜vŸ}™}Ó-ˆFØ�{‰{×'Ñ'Ò/Ø—?‘? aÔ'Ø/;�D—K‘KÕ,Ø—_‘_ qÔ(¨f¯l©l¼e¿j¹jÔ.HÈFÏLÉLÔ\a×\eÑ\eÔLeØ/L�D—K‘KÕ,à/K�D—K‘KÔ,à�{‰{×'Ñ'¨<Ô7Ü"›9�Ø—?‘? aÔ'Ù# F§N¡NÓ$4°f·n±nÓ6FÓG‘Dá# FÓ3‘DØ—‘×)Ñ)Ð-JÔJÜ+Ó-�Ù §¡¨B°·±Ó @À&Ç+Á+ÈbÃ/ÓR‘Ø—‘×)Ñ)Ð-IÔIÜ,Ó.�Ù Ó/�ä'ØØØ!×/Ñ/Ø×)Ñ)ô	
ð 	
r-   )rû   r)   rù   r{   ©NNNNNN©rg   rh   ri   rj   r    r   r   rW   rl   rm   rn   ro   s   @@r+   rö   rö   “  s4   ù‡ € õ	ð Ø÷C
ñ C
ó ó ÷C
ð C
r-   rö   c                   ó\   a a€ ] tR tRt oV 3R lt]]RV3R lR ll4       4       tRtVt	V ;t
# )ÚRobertaForMultipleChoiceií  c                óü   <€ \         SV `  V4       \        V4      V n        \        P
                  ! VP                  4      V n        \        P                  ! VP                  ^4      V n
        V P                  4        R# )r€   N)r   r    r”   r{   r#   ÚDropoutÚhidden_dropout_probrQ   rè   r&   rû   r§   r'   s   &&€r+   r    Ú!RobertaForMultipleChoice.__init__ï  sV   ø€ Ü‰Ñ˜Ô ä# FÓ+ˆŒÜ—z’z &×"<Ñ"<Ó=ˆŒÜŸ)š) F×$6Ñ$6¸Ó:ˆŒð 	�‰Ör-   c                óZ  <€ 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[S[,          R	S[S[ P                  ,          S[,          /# )
r/   r0   Nr1   r·   rº   r2   r3   r¾   r¿   )r5   r6   r7   r   r   rÀ   rÂ   r   )r9   r:   s   "€r+   r;   Ú%RobertaForMultipleChoice.__annotate__û  s¼   ø€ ÷ P
ñ P
á×#Ñ# dÕ*ðP
ñ ×(Ñ(¨4Õ/ðP
ñ ×)Ñ)¨DÕ0ð	P
ñ
 × Ñ  4Õ'ðP
ñ ×&Ñ&¨Õ-ðP
ñ ×(Ñ(¨4Õ/ðP
ñ Ñ+Õ,ðP
ñ 
‰u�|‰|Õ	Ñ8Õ	8ñP
r-   c                ó^  € Ve   VP                   ^,          MVP                   ^,          pVe"   VP                  R	VP                  R	4      4      MRp	Ve"   VP                  R	VP                  R	4      4      MRp
Ve"   VP                  R	VP                  R	4      4      MRpVe"   VP                  R	VP                  R	4      4      MRpVe2   VP                  R	VP                  R
4      VP                  R	4      4      MRpV P                  ! V	3RV
RVRVRVRR/VB pV^,          pV P	                  V4      pV P                  V4      pVP                  R	V4      pRpVe/   VP                  VP                  4      p\        4       pV! VV4      p\        VVVP                  VP                  R7      # )aO  
input_ids (`torch.LongTensor` of shape `(batch_size, num_choices, sequence_length)`):
    Indices of input sequence tokens in the vocabulary.

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

    [What are input IDs?](../glossary#input-ids)
token_type_ids (`torch.LongTensor` of shape `(batch_size, num_choices, sequence_length)`, *optional*):
    Segment token indices to indicate first and second portions of the inputs. Indices are selected in `[0,1]`:

    - 0 corresponds to a *sentence A* token,
    - 1 corresponds to a *sentence B* token.
    This parameter can only be used when the model is initialized with `type_vocab_size` parameter with value
    >= 2. All the value in this tensor should be always < type_vocab_size.

    [What are token type IDs?](../glossary#token-type-ids)
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
    Labels for computing the multiple choice classification loss. Indices should be in `[0, ...,
    num_choices-1]` where `num_choices` is the size of the second dimension of the input tensors. (See
    `input_ids` above)
position_ids (`torch.LongTensor` of shape `(batch_size, num_choices, sequence_length)`, *optional*):
    Indices of positions of each input sequence tokens in the position embeddings. Selected in the range `[0,
    config.max_position_embeddings - 1]`.

    [What are position IDs?](../glossary#position-ids)
inputs_embeds (`torch.FloatTensor` of shape `(batch_size, num_choices, 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.
Nr2   r1   r·   r3   rÅ   TrÞ   rC   éþÿÿÿ)rJ   rß   rF   r{   rQ   rû   rH   rB   r   r   r|   r}   )r(   r0   r1   r·   rº   r2   r3   r¾   Únum_choicesÚflat_input_idsÚflat_position_idsÚflat_token_type_idsÚflat_attention_maskÚflat_inputs_embedsrÍ   Úpooled_outputrÇ   Úreshaped_logitsrÉ   rã   s   &&&&&&&,            r+   rW   Ú RobertaForMultipleChoice.forwardù  sÏ  € ðV -6Ò,A�i—o‘o aÖ(À}×GZÑGZÐ[\ÕG]ˆàCLÒCX˜Ÿ™¨¨I¯N©N¸2Ó,>Ô?Ð^bˆØLXÒLd˜L×-Ñ-¨b°,×2CÑ2CÀBÓ2GÔHÐjnÐØR`ÒRl˜n×1Ñ1°"°n×6IÑ6IÈ"Ó6MÔNÐrvÐØR`ÒRl˜n×1Ñ1°"°n×6IÑ6IÈ"Ó6MÔNÐrvÐð Ò(ð ×Ñ˜r =×#5Ñ#5°bÓ#9¸=×;MÑ;MÈbÓ;QÔRàð 	ð —,’,Øñ
à*ð
ð /ð
ð /ð	
ð
 -ð
ð ð
ð ñ
ˆð   �
ˆàŸ™ ]Ó3ˆØ—‘ Ó/ˆØ Ÿ+™+ b¨+Ó6ˆàˆØÒà—Y‘Y˜×5Ñ5Ó6ˆFÜ'Ó)ˆHÙ˜O¨VÓ4ˆDä(ØØ"Ø!×/Ñ/Ø×)Ñ)ô	
ð 	
r-   )rû   rQ   r{   r  r	  ro   s   @@r+   r  r  í  s4   ù‡ € õð Ø÷P
ñ P
ó ó ÷P
ð P
r-   r  c                   ó\   a a€ ] tR tRt oV 3R lt]]RV3R lR ll4       4       tRtVt	V ;t
# )ÚRobertaForTokenClassificationiN  c                ón  <€ \         SV `  V4       VP                  V n        \        VR R7      V n        VP
                  e   VP
                  MVP                  p\        P                  ! V4      V n	        \        P                  ! VP                  VP                  4      V n        V P                  4        R# rø   )r   r    rù   r”   r{   Úclassifier_dropoutr  r#   r  rQ   rè   r&   rû   r§   ©r(   r)   r   r*   s   && €r+   r    Ú&RobertaForTokenClassification.__init__P  sŠ   ø€ Ü‰Ñ˜Ô Ø ×+Ñ+ˆŒä# F¸eÔDˆŒà)/×)BÑ)BÒ)NˆF×%Ò%ÐTZ×TnÑTnð 	ô —z’zÐ"4Ó5ˆŒÜŸ)š) F×$6Ñ$6¸×8IÑ8IÓJˆŒð 	�‰Ör-   c                óZ  <€ 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[S[,          R	S[S[ P                  ,          S[,          /# rþ   )r5   r6   r7   r   r   rÀ   rÂ   r   )r9   r:   s   "€r+   r;   Ú*RobertaForTokenClassification.__annotate__`  s²   ø€ ÷ 2
ñ 2
á×#Ñ# dÕ*ð2
ñ ×)Ñ)¨DÕ0ð2
ñ ×(Ñ(¨4Õ/ð	2
ñ
 ×&Ñ&¨Õ-ð2
ñ ×(Ñ(¨4Õ/ð2
ñ × Ñ  4Õ'ð2
ñ Ñ+Õ,ð2
ñ 
‰u�|‰|Õ	Ñ4Õ	4ñ2
r-   c                ó’  € V P                   ! V3RVRVRVRVRR/VB pV^ ,          p	V P                  V	4      p	V P                  V	4      p
RpVeX   VP                  V
P                  4      p\        4       pV! V
P                  R	V P                  4      VP                  R	4      4      p\        VV
VP                  VP                  R7      # )
aÝ  
token_type_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Segment token indices to indicate first and second portions of the inputs. Indices are selected in `[0,1]`:

    - 0 corresponds to a *sentence A* token,
    - 1 corresponds to a *sentence B* token.
    This parameter can only be used when the model is initialized with `type_vocab_size` parameter with value
    >= 2. All the value in this tensor should be always < type_vocab_size.

    [What are token type IDs?](../glossary#token-type-ids)
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Labels for computing the token classification loss. Indices should be in `[0, ..., config.num_labels - 1]`.
r·   r1   r2   r3   rÅ   TNrÞ   rC   )r{   rQ   rû   rH   rB   r   rß   rù   r   r|   r}   r  s   &&&&&&&,     r+   rW   Ú%RobertaForTokenClassification.forward^  sã   € ð2 —,’,Øñ
à)ð
ð *ð
ð &ð	
ð
 (ð
ð ð
ð ñ
ˆð " !�*ˆàŸ,™, Ó7ˆØ—‘ Ó1ˆàˆØÒà—Y‘Y˜vŸ}™}Ó-ˆFÜ'Ó)ˆHÙ˜FŸK™K¨¨D¯O©OÓ<¸f¿k¹kÈ"»oÓNˆDä$ØØØ!×/Ñ/Ø×)Ñ)ô	
ð 	
r-   )rû   rQ   rù   r{   r  r	  ro   s   @@r+   r  r  N  s0   ù‡ € õð Ø÷2
ñ 2
ó ó ÷2
ð 2
r-   r  c                   ó<   a a€ ] tR tRt oRtV 3R ltR tRtVtV ;t	# )rú   i•  z-Head for sentence-level classification tasks.c                óf  <€ \         SV `  4        \        P                  ! VP                  VP                  4      V n        VP                  e   VP                  MVP                  p\        P                  ! V4      V n	        \        P                  ! VP                  VP                  4      V n        R # r–   )r   r    r#   rè   r&   ré   r   r  r  rQ   rù   Úout_projr!  s   && €r+   r    Ú"RobertaClassificationHead.__init__˜  s   ø€ Ü‰ÑÔÜ—Y’Y˜v×1Ñ1°6×3EÑ3EÓFˆŒ
à)/×)BÑ)BÒ)NˆF×%Ò%ÐTZ×TnÑTnð 	ô —z’zÐ"4Ó5ˆŒÜŸ	š	 &×"4Ñ"4°f×6GÑ6GÓHˆŽr-   c                óÌ   € VR,          pV P                  V4      pV P                  V4      p\        P                  ! V4      pV P                  V4      pV P	                  V4      pV# )rÆ   )rÆ   rf   rÆ   )rQ   ré   r5   Útanhr)  rï   s   &&, r+   rW   Ú!RobertaClassificationHead.forward¡  sS   € Ø�WÕˆØ�L‰L˜‹OˆØ�J‰J�q‹MˆÜ�JŠJ�q‹MˆØ�L‰L˜‹OˆØ�M‰M˜!ÓˆØˆr-   )ré   rQ   r)  ró   ro   s   @@r+   rú   rú   •  s   ù‡ € Ù7õI÷ò r-   rú   c                   ó\   a a€ ] tR tRt oV 3R lt]]RV3R lR ll4       4       tRtVt	V ;t
# )ÚRobertaForQuestionAnsweringi«  c                óì   <€ \         SV `  V4       VP                  V n        \        VR R7      V n        \
        P                  ! VP                  VP                  4      V n        V P                  4        R# rø   )
r   r    rù   r”   r{   r#   rè   r&   Ú
qa_outputsr§   r'   s   &&€r+   r    Ú$RobertaForQuestionAnswering.__init__­  sU   ø€ Ü‰Ñ˜Ô Ø ×+Ñ+ˆŒä# F¸eÔDˆŒÜŸ)š) F×$6Ñ$6¸×8IÑ8IÓJˆŒð 	�‰Ör-   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[ P                  R,          R	S[S[,          R
S[S[ P                  ,          S[,          /	# )r/   r0   Nr·   r1   r2   r3   Ústart_positionsÚend_positionsr¾   r¿   )r5   r6   r7   r   r   rÀ   rÂ   r   )r9   r:   s   "€r+   r;   Ú(RobertaForQuestionAnswering.__annotate__¹  sÇ   ø€ ÷ >
ñ >
á×#Ñ# dÕ*ð>
ñ ×)Ñ)¨DÕ0ð>
ñ ×(Ñ(¨4Õ/ð	>
ñ
 ×&Ñ&¨Õ-ð>
ñ ×(Ñ(¨4Õ/ð>
ñ ×)Ñ)¨DÕ0ð>
ñ ×'Ñ'¨$Õ.ð>
ñ Ñ+Õ,ð>
ñ 
‰u�|‰|Õ	Ñ;Õ	;ñ>
r-   c                óð  € V P                   ! V3RVRVRVRVRR/VB p	V	^ ,          p
V P                  V
4      pVP                  ^RR7      w  rÍVP                  R4      P	                  4       pVP                  R4      P	                  4       pRpVeÄ   VeÀ   \        VP                  4       4      ^8”  d   VP                  R4      p\        VP                  4       4      ^8”  d   VP                  R4      pVP                  ^4      pVP                  ^ V4      pVP                  ^ V4      p\        VR	7      pV! WÆ4      pV! W×4      pVV,           ^,          p\        VVVV	P                  V	P                  R
7      # )a  
token_type_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Segment token indices to indicate first and second portions of the inputs. Indices are selected in `[0,1]`:

    - 0 corresponds to a *sentence A* token,
    - 1 corresponds to a *sentence B* token.
    This parameter can only be used when the model is initialized with `type_vocab_size` parameter with value
    >= 2. All the value in this tensor should be always < type_vocab_size.

    [What are token type IDs?](../glossary#token-type-ids)
r·   r1   r2   r3   rÅ   Tr_   N)Úignore_index)rÉ   Ústart_logitsÚ
end_logitsr|   r}   rC   )r{   r1  Úsplitr  Ú
contiguousÚlenrF   Úclampr   r   r|   r}   )r(   r0   r·   r1   r2   r3   r4  r5  r¾   rÍ   rà   rÇ   r9  r:  Ú
total_lossÚignored_indexrã   Ú
start_lossÚend_losss   &&&&&&&&,          r+   rW   Ú#RobertaForQuestionAnswering.forward·  s”  € ð0 —,’,Øñ
à)ð
ð *ð
ð &ð	
ð
 (ð
ð ð
ð ñ
ˆð " !�*ˆà—‘ Ó1ˆØ#)§<¡<°°r <Ó#:Ñ ˆØ#×+Ñ+¨BÓ/×:Ñ:Ó<ˆØ×'Ñ'¨Ó+×6Ñ6Ó8ˆ
àˆ
ØÒ&¨=Ò+Dä�?×'Ñ'Ó)Ó*¨QÔ.Ø"1×"9Ñ"9¸"Ó"=�Ü�=×%Ñ%Ó'Ó(¨1Ô,Ø -× 5Ñ 5°bÓ 9�à(×-Ñ-¨aÓ0ˆMØ-×3Ñ3°A°}ÓEˆOØ)×/Ñ/°°=ÓAˆMä'°]ÔCˆHÙ! ,Ó@ˆJÙ 
Ó:ˆHØ$ xÕ/°1Õ4ˆJä+ØØ%Ø!Ø!×/Ñ/Ø×)Ñ)ô
ð 	
r-   )rù   r1  r{   )NNNNNNNr	  ro   s   @@r+   r/  r/  «  s0   ù‡ € õð Ø÷>
ñ >
ó ó ÷>
ð >
r-   r/  )r›   rÔ   r  r/  rö   r  r”   rz   );rô   r5   Útorch.nnr#   r   r   r   Ú r   r„   Úactivationsr   Ú
generationr   Úmodeling_outputsr   r	   r
   r   r   r   r   Úmodeling_utilsr   Úprocessing_utilsr   Úutilsr   r   r   Úutils.genericr   Úbert.modeling_bertr   r   r   r   r   Úconfiguration_robertar   Ú
get_loggerrg   r¤   r   rq   rv   rx   rz   r”   r›   rÔ   ÚModulerƒ   rö   r  r  rú   r/  Ú__all__rr   r-   r+   Ú<module>rR     s³  ðñ ã Ý ß AÑ Aå &Ý Ý )÷÷ ñ õ .Ý &ß @Ñ @Ý -ß lÕ lÝ 0ð 
×	Ò	˜HÓ	%€ô\8˜ô \8ô~	Ð,ô 	ô	Ð.ô 	ô	�9ô 	ð ô/˜_ó /ó ð/ô2'�9ô 'ñ
 ðôô
i
Ð/°ó i
óð
i
ðX ôR
Ð/ó R
ó ðR
ôj�B—I‘Iô ñ, ðôôQ
Ð'=ó Q
óðQ
ðh ô]
Ð5ó ]
ó ð]
ð@ ôC
Ð$:ó C
ó ðC
ôL §	¡	ô ð, ôK
Ð"8ó K
ó ðK
ò\	‚r-   