+
    œ°³j   ã                   óx   € R t ^ RIt^ RIHt ^RIHtHt ^RIHt ]! RR7      ] ! R R]4      4       4       t	R.t
R# )	zZamba model configurationN)Ústrict)ÚPreTrainedConfigÚremap_legacy_layer_types)Úauto_docstringzZyphra/Zamba-7B-v1)Ú
checkpointc                   óæ   a a€ ] tR t^t oRtRtR.tRRRR/tRtR	t	R
t
RtRt^Lt^tRt^t^tRtRtRtRtR	t^t^ t^t^tRtRt^t^tR	t^t ^t!^t"Rt#Rt$Rt%Rt&R	t'Rt(Rt)V 3R lt*R t+V3R lt,Rt-Vt.V ;t/# )ÚZambaConfiga  
attention_hidden_size (`int`, *optional*):
    Dimension of the hidden representations of the inputs to the Attention layer.
attention_head_dim (`int`, *optional*):
    Dimension of the attention head in the Transformer decoder.
n_mamba_heads (`int`, *optional*, defaults to 2):
    Number of mamba heads for each mamba layer.
hidden_mamba_act (`str` or `function`, *optional*, defaults to `"silu"`):
    The non-linear activation function (function or string) in the mamba layer.
num_logits_to_keep (`int` or `None`, *optional*, defaults to 1):
    Number of prompt logits to calculate during generation. If `None`, all logits will be calculated. If an
    integer value, only last `num_logits_to_keep` logits will be calculated. Default is 1 because only the
    logits of the last prompt token are needed for generation. For long sequences, the logits for the entire
    sequence may use a lot of memory so, setting `num_logits_to_keep=1` will reduce memory footprint
    significantly.
attn_layer_period (`int`, *optional*, defaults to 6):
    Once in this many layers, we will have a shared attention layer
attn_layer_offset (`int`, *optional*, defaults to 4):
    Offset of the shared attention layer
use_mamba_kernels (`bool`, *optional*, defaults to `True`):
    Flag indicating whether or not to use the fast mamba kernels. These are available only if `mamba-ssm` and
    `causal-conv1d` are installed, and the mamba modules are running on a CUDA device. Raises ValueError if
    `True` and kernels are not available
mamba_dt_rank (`Union[int,str]`, *optional*, defaults to `"auto"`):
    Rank of the mamba discretization projection matrix. `"auto"` means that it will default to `math.ceil(self.hidden_size / 16)`
layers_block_type (`str`, *optional*):
    Alias for `layer_types` which is kept for BC purposes.
ÚzambaÚpast_key_valuesÚlayer_typesÚlayers_block_typeÚhead_dimÚattention_head_dimi }  Ti€  Ni :  ÚgeluÚsilug{®Gáz”?gñhãˆµøä>i   g        Úautogü©ñÒMbP?gš™™™™™¹?g-Cëâ6?Fc                ó¢  <€ V P                   ;'       g    ^V P                  ,          V n         V P                  ;'       g%    ^V P                  ,          V P                  ,          V n        V P                  R8X  d(   \
        P                  ! V P                  ^,          4      MV P                  V n        V P                  f_   . RO\        V P                  ^,
          4       Uu. uF(  pW P                  ,          V P                  8X  d   RMRNK*  	  up,           V n        M\        V P                  4      V n        \        SV `8  ! R/ VB  R# u upi )é   r   NÚlinear_attentionÚhybrid)r   r   r   © )Úattention_hidden_sizeÚhidden_sizer   Únum_attention_headsÚmamba_dt_rankÚmathÚceilr   ÚrangeÚnum_hidden_layersÚattn_layer_periodÚattn_layer_offsetr   ÚsuperÚ__post_init__)ÚselfÚkwargsÚiÚ	__class__s   &, €Ún/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/zamba/configuration_zamba.pyr"   ÚZambaConfig.__post_init___   s  ø€ Ø%)×%?Ñ%?×%WÐ%WÀ1Àt×GWÑGWÕCWˆÔ"Ø"&×"9Ñ"9×"mÐ"m¸QÀ×AQÑAQÕ=QÐUY×UmÑUmÕ=mˆÔØAE×ASÑASÐW]ÔA]œTŸYšY t×'7Ñ'7¸"Õ'<Ô=Ðcg×cuÑcuˆÔà×!Ñ!Ò)ò&ô ˜t×5Ñ5¸Õ9Ô:óá:�Að × 6Ñ 6Õ6¸$×:PÑ:PÔP‘ÐVhÒhÙ:ñõ	&ˆDÕ"ô &>¸d×>TÑ>TÓ%UˆDÔ"ä‰ÒÑ' Ô'ùòs   Ã#.Ec                ó‚   € V P                   V P                  ,          V P                  ,          ^ 8w  d   \        R4      hR# )zOPart of `@strict`-powered validation. Validates the architecture of the config.z;`intermediate_size` should be divisible by `n_mamba_heads`.N)Úmamba_expandr   Ún_mamba_headsÚ
ValueError)r#   s   &r'   Úvalidate_architectureÚ!ZambaConfig.validate_architecturer   s8   € à×Ñ × 0Ñ 0Õ0°D×4FÑ4FÕFÈ!ÔKÜÐZÓ[Ð[ñ Ló    c                óV  <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[ ;R&   S[ R,          ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ R,          ;R	&   S[ ;R
&   S[ ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[ ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ S[S[ ,          ,          R,          ;R&   S[ ;R&   S[S[ ,          ;R&   S[ ;R&   S[ ;R&   S[;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[S[ ,          ;R&   S[;R&   S[;R&   S[;R &   S[;R!&   S[;R"&   S[S[,          R,          ;R#&   # )$r   Ú
vocab_sizeÚtie_word_embeddingsr   Nr   Úintermediate_sizer   r   r   Únum_key_value_headsr+   Ú
hidden_actÚhidden_mamba_actÚinitializer_rangeÚrms_norm_epsÚ	use_cacheÚnum_logits_to_keepÚpad_token_idÚbos_token_idÚeos_token_idÚmax_position_embeddingsÚattention_dropoutr   r    Úuse_mamba_kernelsÚmamba_d_stateÚmamba_d_convr*   r   Útime_step_minÚtime_step_maxÚtime_step_floorÚmamba_conv_biasÚmamba_proj_biasr   )ÚintÚboolÚstrÚfloatÚlist)ÚformatÚ__classdict__s   "€r'   Ú__annotate__ÚZambaConfig.__annotate__   s1  ø‡ ‚ ñH ÑñI ñJ Ñ$ñK ñL ÑñM ñN  �:Ñ,ñO ñP Ñ"ñQ ñR ÑñS ñT Ñ!ñU ñV ˜d�
Ñ)ñW ñX Ñ!ñY ñZ Ññ[ ñ\ Ññ] ñ^ Ñ"ñ_ ñ` Ñ#ña ñb Ññc ñd Ññe ñf Ññg ñh ˜•*Ñ ñi ñj ˜•*Ñ ñk ñl ™™S�	•/ DÕ(Ñ,ñm ñn !Ñ'ño ñp ™s•{Ñ(ñq ñr Ññs ñt Ññu ñv Ñ"ñw ñx Ññy ñz Ññ{ ñ| Ññ} ñ~ ™•9Ñ%ñ ñ@ Ñ ñA ñB ÑñC ñD Ñ!ñE ñF Ñ ñG ñH Ñ!ñI ñJ ™C•y 4Õ'Ñ.òK r/   )r   r   r   r   )0Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚattribute_mapr1   r2   r   r   r3   r   r   r   r4   r+   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r   r    r@   rA   rB   r*   r   rC   rD   rE   rF   rG   r   r"   r-   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r&   rN   s   @@r'   r   r      s÷   ù‡ € ñð: €JØ#4Ð"5ÐØ"Ð$7¸ÐEYÐZ€Mà€JØ $ÐØ€KØ(,ÐØ"ÐØÐØ!ÐØ%)ÐØ!ÐØ€MØ€JØ"ÐØ#ÐØ€LØ€IØÐØ €LØ €LØ+,€LØ#'ÐØ%(ÐØÐØÐØ"ÐØ€MØ€LØ€LØ%€MØ €MØ€MØ!€OØ €OØ!€OØ*.Ðõ(ò&\÷u … r/   r   )rU   r   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   r   Úutilsr   r   Ú__all__r   r/   r'   Ú<module>ra      sP   ðñ  ã å .ç MÝ #ñ Ð/Ô0Øô[\Ð"ó [\ó ó 1ð[\ð| ˆ/‚r/   