+
    œ°³j�  ã                   ó  € ^ RI Ht ^ RIHt ^RIHtHt ^RIHt ^RI	H
t
HtHtHt ^RIHt ]! RR7      ] ! R	 R
]4      4       4       t ! R R]4      t ! R R]
4      t ! R R]4      t ! R R]4      t ! R R]4      t. ROtR# )é    N)Ústrict)Úauto_docstringÚcan_return_tuple)ÚLlamaConfig)ÚLlamaDecoderLayerÚLlamaForCausalLMÚ
LlamaModelÚLlamaPreTrainedModel)ÚNemotronMLPzinceptionai/Jais-2-8B-Chat)Ú
checkpointc                   ó�   a € ] tR t^t o RRRRRRRRRRRR/tR	tR
tRt^tRt	Rt
Rt^ tRtRtRt]! 4       t]! 4       tV 3R ltRtV tR# )ÚJais2Configzlayers.*.self_attn.q_projÚcolwisezlayers.*.self_attn.k_projzlayers.*.self_attn.v_projzlayers.*.self_attn.o_projÚrowwisezlayers.*.mlp.up_projzlayers.*.mlp.down_proji K i   i h  Úrelu2i    gñhãˆµøä>iJ Tc                óÚ   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[ ;R&   S[;R&   S[ R,          ;R	&   S[ S[S[ ,          ,          R,          ;R
&   S[;R&   S[;R&   # )é   Ú
vocab_sizeÚhidden_sizeÚintermediate_sizeÚnum_attention_headsÚ
hidden_actÚmax_position_embeddingsÚlayer_norm_epsNÚbos_token_idÚeos_token_idÚattention_biasÚmlp_bias)ÚintÚstrÚfloatÚlistÚbool)ÚformatÚ__classdict__s   "€Úh/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/jais2/modular_jais2.pyÚ__annotate__ÚJais2Config.__annotate__   s¥   ø‡ ‚ ñ Ññ ñ Ññ ñ Ñ"ñ ñ Ñ!ñ ñ  Ññ! ñ" !Ñ'ñ# ñ$ Ñ ñ% ñ& ˜•*Ñ ñ' ñ( ™™S�	•/ DÕ(Ñ1ñ) ñ* Ññ+ ñ, Ñò- ó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Úbase_model_tp_planr   r   r   r   r   r   r   r   r   r   r   ÚAttributeErrorÚrms_norm_epsÚpretraining_tpÚ__annotate_func__Ú__static_attributes__Ú__classdictcell__)r%   s   @r&   r   r      s€   ø‡ € ð 	$ YØ# YØ# YØ# YØ 	Ø  )ðÐð €JØ€KØ"ÐØ!ÐØ€JØ#'ÐØ €NØ €LØ+1€LØ€NØ€HÙ!Ó#€LÙ#Ó%€N÷1 ƒ r)   r   c                   ó   € ] tR t^9tRtR# )ÚJais2MLPr*   N©r+   r,   r-   r.   r4   r*   r)   r&   r7   r7   9   ó   † Ûr)   r7   c                   ó>   a a€ ] tR t^=t oV3R lV 3R lltRtVtV ;t# )ÚJais2DecoderLayerc                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   ÚconfigÚ	layer_idx)r   r   )r$   r%   s   "€r&   r'   ÚJais2DecoderLayer.__annotate__>   s   ø€ ÷ dñ d™{ð d±sñ dr)   c                óê   <€ \         SV `  W4       \        P                  ! VP                  VP
                  R 7      V n        \        P                  ! VP                  VP
                  R 7      V n        R# ©)ÚepsN)ÚsuperÚ__init__ÚnnÚ	LayerNormr   r   Úinput_layernormÚpost_attention_layernorm)Úselfr=   r>   Ú	__class__s   &&&€r&   rD   ÚJais2DecoderLayer.__init__>   sN   ø€ Ü‰Ñ˜Ô+Ü!Ÿ|š|¨F×,>Ñ,>ÀF×DYÑDYÔZˆÔÜ(*¯ª°V×5GÑ5GÈV×MbÑMbÔ(cˆÖ%r)   )rG   rH   ©r+   r,   r-   r.   rD   r4   r5   Ú__classcell__©rJ   r%   s   @@r&   r;   r;   =   s   ù‡ € ÷d÷ dó dr)   r;   c                   ó   € ] tR t^DtRtR# )ÚJais2PreTrainedModelr*   Nr8   r*   r)   r&   rP   rP   D   r9   r)   rP   c                   ó>   a a€ ] tR t^Ht oV3R lV 3R lltRtVtV ;t# )Ú
Jais2Modelc                ó    <€ V ^8„  d   QhRS[ /# )r   r=   )r   )r$   r%   s   "€r&   r'   ÚJais2Model.__annotate__I   s   ø€ ÷ Pñ P™{ñ Pr)   c                óˆ   <€ \         SV `  V4       \        P                  ! VP                  VP
                  R 7      V n        R# rA   )rC   rD   rE   rF   r   r   Únorm)rI   r=   rJ   s   &&€r&   rD   ÚJais2Model.__init__I   s.   ø€ Ü‰Ñ˜Ô Ü—L’L ×!3Ñ!3¸×9NÑ9NÔOˆŽ	r)   )rV   rL   rN   s   @@r&   rR   rR   H   s   ù‡ € ÷P÷ Pó Pr)   rR   c                   óF   a a€ ] tR t^Nt o]]V 3R l4       4       tRtVtV ;t	# )ÚJais2ForCausalLMc                ó$   <€ \         SV `  ! R/ VB # )as  
Example:

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

>>> model = Jais2ForCausalLM.from_pretrained("inceptionai/Jais-2-8B-Chat")
>>> tokenizer = AutoTokenizer.from_pretrained("inceptionai/Jais-2-8B-Chat")

>>> prompt = "Hey, are you conscious? Can you talk to me?"
>>> inputs = tokenizer(prompt, return_tensors="pt")

>>> # Generate
>>> generate_ids = model.generate(inputs.input_ids, max_length=30)
>>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
"Hey, are you conscious? Can you talk to me?\nI'm not conscious, but I can talk to you."
```r*   )rC   Úforward)rI   Úsuper_kwargsrJ   s   &,€r&   r[   ÚJais2ForCausalLM.forwardO   s   ø€ ô( ‰wŠÑ. Ñ.Ð.r)   r*   )
r+   r,   r-   r.   r   r   r[   r4   r5   rM   rN   s   @@r&   rY   rY   N   s$   ù‡ € ØØô/ó ó ÷/ð /r)   rY   )r   rR   rY   rP   )Útorch.nnrE   Úhuggingface_hub.dataclassesr   Úutilsr   r   Úllama.configuration_llamar   Úllama.modeling_llamar   r   r	   r
   Únemotron.modeling_nemotronr   r   r7   r;   rP   rR   rY   Ú__all__r*   r)   r&   Ú<module>re      s•   ðõ  Ý .ç 5Ý 3÷ó õ 5ñ Ð7Ô8Øô&�+ó &ó ó 9ð&ô2	ˆ{ô 	ôdÐ)ô dô	Ð/ô 	ôP�ô Pô/Ð'ô /ò0‚r)   