+
    œ°³jO  ã                   óô  € R t ^ RIHt ^RIHt ^RIHtHt ^RIH	t	H
t
 ]P                  ! ]4      t]! RR7      ] ! R R]4      4       4       t]! R	R7      ] ! R
 R]4      4       4       t]! RR7      ] ! R R]4      4       4       t]! RR7      ] ! R R]4      4       4       t]! RR7      ] ! R R]4      4       4       t]! RR7      ] ! R R]4      4       4       t]! RR7      ] ! R R]4      4       4       tR.tR# )zESMFold2 model configuration.)Ústrict)ÚPreTrainedConfig)Úauto_docstringÚlogging)ÚCONFIG_MAPPINGÚ
AutoConfiga  
    Configuration for a sliding-window atom transformer with 3D RoPE.

    Used twice, with identical field names: once for the inputs embedder (`EsmFold2Config.atom_encoder`)
    and once for the diffusion denoiser (`EsmFold2Config.structure_head.diffusion_module.atom_encoder`).
    )Úcustom_introc                   óv   a a€ ] tR t^t oRt^€tRt^t^tRt	Rt
Rt^t^
tRtV 3R ltV 3R ltV3R	 ltR
tVtV ;t# )ÚEsmFold2AtomEncoderConfiga­  
hidden_size (`int`, *optional*, defaults to 128):
    Per-atom hidden width of the atom transformer.
output_dim (`int`, *optional*, defaults to 384):
    Width this stack aggregates to when scattering atoms back into tokens.
num_hidden_layers (`int`, *optional*, defaults to 3):
    Number of sliding-window atom-transformer blocks.
num_attention_heads (`int`, *optional*, defaults to 4):
    Number of attention heads in each atom-transformer block.
head_dim (`int`, *optional*):
    Per-head width. Derived as `hidden_size // num_attention_heads` if unset.
intermediate_size (`int`, *optional*, defaults to 256):
    SwiGLU feed-forward width.
spatial_rope_base_frequency (`float`, *optional*, defaults to 20.0):
    Base frequency for the spatial (x/y/z) half of the 3D rotary embedding.
num_spatial_rope_pairs_per_axis (`int`, *optional*, defaults to 2):
    Number of rotary frequency pairs allocated to each spatial axis.
num_uid_rope_pairs (`int`, *optional*, defaults to 10):
    Number of rotary frequency pairs allocated to the per-atom space UID.
uid_rope_base_frequency (`float`, *optional*, defaults to 10000.0):
    Base frequency for the space-UID half of the 3D rotary embedding.
é€  Né   g      4@g     ˆÃ@c                óˆ   <€ V P                   f#   V P                  V P                  ,          V n         \        SV `  ! R/ VB  R # ©N© )Úhead_dimÚhidden_sizeÚnum_attention_headsÚsuperÚ__post_init__©ÚselfÚkwargsÚ	__class__s   &,€Út/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/esmfold2/configuration_esmfold2.pyr   Ú'EsmFold2AtomEncoderConfig.__post_init__F   s5   ø€ Ø�=‰=Ò Ø ×,Ñ,°×0HÑ0HÕHˆDŒMÜ‰ÒÑ' Ô'ó    c           	     óú   <€ \         SV `  4        ^V P                  ,          V P                  ,           pWP                  ^,          8”  d1   \        RV RV P                  ^,           RV P                   R24      hR# )é   zThe 3D rotary embedding needs z$ frequency pairs, which exceeds the z available in a head of width Ú.N)r   Úvalidate_architectureÚnum_spatial_rope_pairs_per_axisÚnum_uid_rope_pairsr   Ú
ValueError)r   Únum_rope_pairsr   s   & €r   r   Ú/EsmFold2AtomEncoderConfig.validate_architectureK   sx   ø€ Ü‰Ñ%Ô'à˜T×AÑAÕAÀD×D[ÑD[Õ[ˆØŸM™M¨QÕ.Ô.ÜØ0°Ð0@Ð@dØ—=‘= AÕ%Ð&Ð&DÀTÇ]Á]ÀOÐSTðVóð ñ /r   c                ó  <€ V ^8„  d   Qh/ S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[R,          ;R&   S[ R,          ;R	&   S[ R,          ;R
&   S[R,          ;R&   # )é   Nr   Ú
output_dimÚnum_hidden_layersr   r   Úintermediate_sizeÚspatial_rope_base_frequencyr    r!   Úuid_rope_base_frequency©ÚintÚfloat)ÚformatÚ__classdict__s   "€r   Ú__annotate__Ú&EsmFold2AtomEncoderConfig.__annotate__   sÃ   ø‡ ‚ ñB �t•Ñ!ñC ñD �d•
Ñ ñE ñF ˜T•zÑ%ñG ñH ˜t�Ñ'ñI ñJ �D�jÑñK ñL ˜T•zÑ'ñM ñN "'¨¥Ñ4ñO ñP &)¨4¥ZÑ3ñQ ñR ˜d�
Ñ'ñS ñT # T�\Ñ3òU r   )r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r'   r(   r   r   r)   r*   r    r!   r+   r   r   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r   r0   s   @@r   r
   r
      sW   ù‡ € ñð. "€KØ €JØ$%ÐØ&'ÐØ€HØ$'ÐØ04ÐØ23Ð#Ø%'ÐØ,3Ðõ(õ
÷c … r   r
   zlConfiguration for the diffusion denoiser: an atom encoder/decoder around a token transformer with pair bias.c                   óz   a a€ ] tR t^Vt oRtR]/tRtRtRt	^t
^tRtRtRtRtV 3R	 ltV 3R
 ltV3R ltRtVtV ;t# )ÚEsmFold2DiffusionModuleConfigaP  
sigma_data (`float`, *optional*, defaults to 16.0):
    Data noise scale of the EDM preconditioning; sets the scale at which coordinates are normalized.
hidden_size (`int`, *optional*, defaults to 768):
    Token-stream width of the diffusion transformer. Also the width the atom stack projects to and
    from, so `atom_encoder.output_dim` mirrors it.
fourier_dim (`int`, *optional*, defaults to 256):
    Width of the Fourier noise-level embedding.
num_hidden_layers (`int`, *optional*, defaults to 12):
    Number of token-transformer blocks (one attention + one transition each).
num_attention_heads (`int`, *optional*, defaults to 16):
    Number of attention heads in the token transformer; also the width of each block's pair bias.
head_dim (`int`, *optional*):
    Per-head width. Derived as `hidden_size // num_attention_heads` if unset.
intermediate_size (`int`, *optional*, defaults to 1536):
    SwiGLU width of the token transitions, and of the conditioning's single transitions.
pair_intermediate_size (`int`, *optional*, defaults to 512):
    SwiGLU width of the conditioning's pair transitions, which run at
    `EsmFold2Config.pairwise_hidden_size`.
atom_encoder (`EsmFold2AtomEncoderConfig`, *optional*):
    Configuration for the denoiser's atom encoder/decoder stack; defaults to one whose `output_dim`
    is this module's `hidden_size`.
Úatom_encoderg      0@i   r   Ni   é   c                óP  <€ V P                   f#   V P                  V P                  ,          V n         V P                  f   \	        V P                  R7      V n        M:\        V P                  \        4      '       d   \	        R/ V P                  B V n        \        SV `   ! R/ VB  R # )N)r'   r   )	r   r   r   r?   r
   Ú
isinstanceÚdictr   r   r   s   &,€r   r   Ú+EsmFold2DiffusionModuleConfig.__post_init__€   s}   ø€ Ø�=‰=Ò Ø ×,Ñ,°×0HÑ0HÕHˆDŒMØ×ÑÒ$Ü 9ÀT×EUÑEUÔ VˆDÕÜ˜×)Ñ)¬4×0Ò0Ü 9Ñ N¸D×<MÑ<MÑ NˆDÔÜ‰ÒÑ' Ô'r   c                óÎ   <€ \         SV `  4        V P                  P                  V P                  8w  d1   \        R V P                  P                   RV P                   R24      hR# )úThe atom_encoder.output_dim (z&) is not the token width hidden_size (z).N)r   r   r?   r'   r   r"   )r   r   s   &€r   r   Ú3EsmFold2DiffusionModuleConfig.validate_architecture‰   sg   ø€ Ü‰Ñ%Ô'à×Ñ×'Ñ'¨4×+;Ñ+;Ô;ÜØ/°×0AÑ0A×0LÑ0LÐ/Mð N Ø $× 0Ñ 0Ð1°ð5óð ñ <r   c                ó  <€ V ^8„  d   Qh/ S[ R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R	&   S[S[,          R,          ;R
&   # )r&   NÚ
sigma_datar   Úfourier_dimr(   r   r   r)   Úpair_intermediate_sizer?   )r.   r-   rC   r
   )r/   r0   s   "€r   r1   Ú*EsmFold2DiffusionModuleConfig.__annotate__V   s·   ø‡ ‚ ñ@ ˜•Ñ#ñA ñB �t•Ñ!ñC ñD �t•Ñ!ñE ñF ˜T•zÑ&ñG ñH ˜t�Ñ(ñI ñJ �D�jÑñK ñL ˜T•zÑ(ñM ñN   $�JÑ,ñO ñP Ñ2Õ2°TÕ9Ñ@òQ r   )r?   r   )r3   r4   r5   r6   r7   r
   Úsub_configsrI   r   rJ   r(   r   r   r)   rK   r?   r   r   r8   r9   r:   r;   r<   s   @@r   r>   r>   V   sZ   ù‡ € ñð0 "Ð#<Ð=€Kà#€JØ!€KØ!€KØ$&ÐØ&(ÐØ€HØ$(ÐØ),ÐØ<@€Lõ(õ÷g … r   r>   zrConfiguration for the structure-prediction head: the distogram output plus the diffusion sampler's noise schedule.c                   óz   a a€ ] tR t^“t oRtR]/tRt^€t^t	Rt
RtRtRtRtR	tR
t^DtRtV 3R ltV3R ltRtVtV ;t# )ÚEsmFold2StructureHeadConfigai  
diffusion_module (`EsmFold2DiffusionModuleConfig`, *optional*):
    Configuration for the denoiser this head samples from.
num_distogram_bins (`int`, *optional*, defaults to 128):
    Number of distance bins predicted by the distogram head.
num_diffusion_samples (`int`, *optional*, defaults to 8):
    Number of parallel structure samples drawn by the diffusion sampler.
gamma_0 (`float`, *optional*, defaults to 0.605):
    Churn factor applied at noise levels above `gamma_min` (extra noise re-injected before a step).
gamma_min (`float`, *optional*, defaults to 1.107):
    Noise level below which no churn is applied.
noise_scale (`float`, *optional*, defaults to 0.0):
    Scale of the noise added by the churn step. `0.0` makes sampling a deterministic ODE.
step_scale (`float`, *optional*, defaults to 1.0):
    Scale applied to each denoising update.
inference_sigma_max_ratio (`float`, *optional*, defaults to 160.0):
    Highest sigma of the Karras noise schedule, as a multiple of `sigma_data` (so the default is a
    sigma of `160 * sigma_data`). Shapes the schedule; it is not where sampling starts, because
    `inference_sigma_cap` truncates the top of the schedule -- see there.
inference_sigma_min_ratio (`float`, *optional*, defaults to 4e-4):
    Lowest sigma of the Karras noise schedule, likewise a multiple of `sigma_data`.
inference_exponent (`float`, *optional*, defaults to 8.0):
    Exponent shaping the Karras schedule between `inference_sigma_min_ratio` and `inference_sigma_max_ratio`.
inference_num_steps (`int`, *optional*, defaults to 68):
    Length of the Karras schedule built before truncation. Note this is not the number of denoising
    steps run: `inference_sigma_cap` drops the entries above the cap without lengthening the
    schedule to compensate, so the sampler runs fewer steps than this (with the released
    checkpoint's values, 14 becomes 10).
inference_sigma_cap (`float`, *optional*, defaults to 256.0):
    Cap on the schedule, as an *absolute* sigma rather than a multiple of `sigma_data`. The
    high-sigma tail above it is truncated and the cap re-prepended, so sampling starts from the cap.
Údiffusion_moduleNg\�Âõ(\ã?gƒÀÊ¡E¶ñ?g        g      ð?g      d@g-Cëâ6:?g       @g      p@c                óØ   <€ V P                   f   \        4       V n         M:\        V P                   \        4      '       d   \        R/ V P                   B V n         \        SV `  ! R/ VB  R # r   )rP   r>   rB   rC   r   r   r   s   &,€r   r   Ú)EsmFold2StructureHeadConfig.__post_init__É   sS   ø€ Ø× Ñ Ò(Ü$AÓ$CˆDÕ!Ü˜×-Ñ-¬t×4Ò4Ü$AÑ$ZÀD×DYÑDYÑ$ZˆDÔ!Ü‰ÒÑ' Ô'r   c                ób  <€ V ^8„  d   Qh/ S[ S[,          R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R	&   S[R,          ;R
&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   # )r&   NrP   Únum_distogram_binsÚnum_diffusion_samplesÚgamma_0Ú	gamma_minÚnoise_scaleÚ
step_scaleÚinference_sigma_max_ratioÚinference_sigma_min_ratioÚinference_exponentÚinference_num_stepsÚinference_sigma_cap)rC   r>   r-   r.   )r/   r0   s   "€r   r1   Ú(EsmFold2StructureHeadConfig.__annotate__“   sð   ø‡ ‚ ñR Ñ:Õ:¸TÕAÑHñS ñT ˜d�
Ñ(ñU ñV  �:Ñ)ñW ñX �T�\Ñ!ñY ñZ �t�|Ñ#ñ[ ñ\ ˜•Ñ#ñ] ñ^ ˜•Ñ"ñ_ ñ`  % t�|Ñ3ña ñb  % t�|Ñ2ñc ñd  �Ñ*ñe ñf ˜t�Ñ(ñg ñh  �Ñ-òi r   )rP   )r3   r4   r5   r6   r7   r>   rM   rP   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r   r8   r9   r:   r;   r<   s   @@r   rO   rO   “   si   ù‡ € ñðB &Ð'DÐE€KàDHÐØ%(ÐØ()ÐØ!€GØ#€IØ #€KØ"€JØ.3ÐØ.2ÐØ'*ÐØ&(ÐØ(-Ðõ(÷m … r   rO   z|Configuration for the confidence head, which predicts pLDDT, PAE, PDE, resolved-atom probability and the pTM/ipTM summaries.c                   óP   a € ] tR t^Ñt o Rt^t^2t^@t^@tRt	Rt
^€tRtV 3R ltRtV tR# )ÚEsmFold2ConfidenceHeadConfigu“  
num_hidden_layers (`int`, *optional*, defaults to 4):
    Number of pair-update blocks in the head's own folding trunk.
num_plddt_bins (`int`, *optional*, defaults to 50):
    Number of bins in the per-atom pLDDT distribution.
num_pde_bins (`int`, *optional*, defaults to 64):
    Number of bins in the predicted-distance-error distribution.
num_pae_bins (`int`, *optional*, defaults to 64):
    Number of bins in the predicted-aligned-error distribution.
min_dist (`float`, *optional*, defaults to 2.0):
    Lower edge (Ã…) of the head's distance binning.
max_dist (`float`, *optional*, defaults to 52.0):
    Upper edge (Ã…) of the head's distance binning.
distogram_bins (`int`, *optional*, defaults to 128):
    Number of distance bins used to embed predicted inter-atom distances.
eps (`float`, *optional*, defaults to 1e-6):
    Additive guard for masked-mean denominators (empty chains / all-padding rows).
g       @g      J@g�íµ ÷Æ°>c                óê   <€ V ^8„  d   Qh/ S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[ R,          ;R&   S[R,          ;R	&   # )
r&   Nr(   Únum_plddt_binsÚnum_pde_binsÚnum_pae_binsÚmin_distÚmax_distÚdistogram_binsÚepsr,   )r/   r0   s   "€r   r1   Ú)EsmFold2ConfidenceHeadConfig.__annotate__Ñ   s�   ø‡ ‚ ñ2 ˜T•zÑ%ñ3 ñ4 ˜$•JÑ#ñ5 ñ6 ˜•*Ñ!ñ7 ñ8 ˜•*Ñ!ñ9 ñ: �d�lÑ ñ; ñ< �d�lÑ!ñ= ñ> ˜$•JÑ$ñ? ñ@ 
��ÑòA r   r   N)r3   r4   r5   r6   r7   r(   rc   rd   re   rf   rg   rh   ri   r8   r9   r:   ©r0   s   @r   ra   ra   Ñ   s=   ø‡ € ñð& %&ÐØ!#€NØ!€LØ!€LØ €HØ!€HØ!$€NØ€C÷A ƒ r   ra   z—Configuration for the MSA encoder: outer-product-mean into the pair stream, pair-weighted averaging back into the MSA stream, and the triangle updates.c                   óL   a € ] tR t^ôt o Rt^€t^ t^t^t^ t	Rt
RtV 3R ltRtV tR# )ÚEsmFold2MsaEncoderConfiga®  
hidden_size (`int`, *optional*, defaults to 128):
    Width of the MSA stream.
outer_hidden_size (`int`, *optional*, defaults to 32):
    Per-side width of the outer-product-mean projection; the outer product is this value squared.
num_hidden_layers (`int`, *optional*, defaults to 4):
    Number of MSA encoder blocks. The last one updates only the pair stream, since its MSA output
    would be discarded.
num_attention_heads (`int`, *optional*, defaults to 8):
    Number of heads in the pair-weighted averaging.
head_dim (`int`, *optional*, defaults to 32):
    Per-head width of the pair-weighted averaging.
intermediate_size (`int`, *optional*, defaults to 512):
    SwiGLU width of the MSA-stream transition.
outer_product_chunk_size (`int`, *optional*):
    Chunk size for the outer-product-mean einsum, off by default. Chunking this one is not always
    bit-exact in bf16, so it trades exactness for peak memory on long sequences.
r@   Nc                óÐ   <€ V ^8„  d   Qh/ S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   # )	r&   Nr   Úouter_hidden_sizer(   r   r   r)   Úouter_product_chunk_size)r-   )r/   r0   s   "€r   r1   Ú%EsmFold2MsaEncoderConfig.__annotate__ô   s|   ø‡ ‚ ñ2 �t•Ñ!ñ3 ñ4 ˜T•zÑ&ñ5 ñ6 ˜T•zÑ%ñ7 ñ8 ˜t�Ñ'ñ9 ñ: �D�jÑñ; ñ< ˜T•zÑ'ñ= ñ> " D�jÑ/ò? r   r   )r3   r4   r5   r6   r7   r   ro   r(   r   r   r)   rp   r8   r9   r:   rk   s   @r   rm   rm   ô   s;   ø‡ € ñð& "€KØ$&ÐØ$%ÐØ&'ÐØ€HØ$'ÐØ+/Ð÷? ƒ r   rm   zWConfiguration for the language-model (ESMC) hidden-state encoder folded into the trunk.c                   ó<   a € ] tR tRt o Rt^tRtRtV 3R ltRt	V t
R# )ÚEsmFold2LmEncoderConfigi  a’  
num_hidden_layers (`int`, *optional*, defaults to 4):
    Number of pair-update blocks refining the projected ESMC hidden states.
lm_dropout (`float`, *optional*, defaults to 0.25):
    Dropout applied to the projected language-model pair representation.
per_loop_lm_dropout (`bool`, *optional*, defaults to `True`):
    Whether to resample that dropout on every trunk loop rather than once per fold.
g      Ð?Tc                óh   <€ V ^8„  d   Qh/ S[ R,          ;R&   S[R,          ;R&   S[R,          ;R&   # )r&   Nr(   Ú
lm_dropoutÚper_loop_lm_dropout)r-   r.   Úbool)r/   r0   s   "€r   r1   Ú$EsmFold2LmEncoderConfig.__annotate__  s8   ø‡ ‚ ñ ˜T•zÑ%ñ ñ ˜•Ñ#ñ ñ  �Ñ+ò r   r   N)r3   r4   r5   r6   r7   r(   ru   rv   r8   r9   r:   rk   s   @r   rs   rs     s$   ø‡ € ñð %&ÐØ#€JØ'+Ð÷ ƒ r   rs   zbiohub/ESMFold2-hf)Ú
checkpointc                   óÊ   a a€ ] tR tRt oRtRtR]R]R]R]	R]
R	]/tR
tRtRtRt^€t^@t^ t^t^
t^!t^€t^@t^t^tRt^t^tRtRtRt Rt!Rt"Rt#V 3R lt$V 3R lt%V3R lt&Rt'Vt(V ;t)# )ÚEsmFold2Configi'  a  
hidden_size (`int`, *optional*, defaults to 384):
    Single-representation width.
pairwise_hidden_size (`int`, *optional*, defaults to 256):
    Pair-representation width.
single_inputs_size (`int`, *optional*, defaults to 451):
    Width of the concatenated single-input features fed to the trunk and diffusion conditioning:
    `atom_encoder.output_dim` plus two residue-type one-hots and the profile scalar.
pair_transition_intermediate_size (`int`, *optional*, defaults to 1024):
    SwiGLU width of the pair-stream transitions.
sliding_window (`int`, *optional*, defaults to 128):
    Sliding-window size (token-index distance) for the atom-stack attention, as the total window
    width rather than the radius.
chunk_size (`int`, *optional*, defaults to 64):
    Chunk size for the memory-heavy pair-/MSA-stream ops. `None` disables chunking.
num_relative_residx_bins (`int`, *optional*, defaults to 32):
    Number of relative residue-index bins in the relative-position encoding.
num_relative_chain_bins (`int`, *optional*, defaults to 2):
    Number of relative chain-index bins in the relative-position encoding.
num_loops (`int`, *optional*, defaults to 10):
    Number of trunk refinement loops.
num_res_types (`int`, *optional*, defaults to 33):
    Number of residue types.
max_atomic_number (`int`, *optional*, defaults to 128):
    Size of the element one-hot in the atom features.
char_vocab_size (`int`, *optional*, defaults to 64):
    Character-vocabulary size for the encoded atom names.
max_chars (`int`, *optional*, defaults to 4):
    Number of characters per encoded atom name.
max_atoms_per_token (`int`, *optional*, defaults to 23):
    Maximum number of atoms per token.
atom_feature_dim (`int`, *optional*):
    Atom feature width: xyz, charge and mask, plus the element and atom-name-char one-hots. Derived
    from `max_atomic_number`, `char_vocab_size` and `max_chars` if unset.
folding_trunk_num_hidden_layers (`int`, *optional*, defaults to 24):
    Number of pair-update blocks in the folding trunk.
parcae_num_coda_layers (`int`, *optional*, defaults to 2):
    Number of pair-update blocks in the parcae coda.
atom_encoder (`EsmFold2AtomEncoderConfig`, *optional*):
    Configuration for the inputs-embedder SWA atom encoder.
structure_head (`EsmFold2StructureHeadConfig`, *optional*):
    Configuration for the diffusion structure-prediction head (holds the `diffusion_module` sub-config).
confidence_head (`EsmFold2ConfidenceHeadConfig`, *optional*):
    Configuration for the confidence head.
msa_encoder (`EsmFold2MsaEncoderConfig`, *optional*):
    Configuration for the MSA encoder.
lm_encoder (`EsmFold2LmEncoderConfig`, *optional*):
    Configuration for the language-model hidden-state encoder.
esmc_config ([`EsmcConfig`], *optional*):
    Configuration for the bundled ESMC backbone.
Úesmfold2Úesmc_configr?   Ústructure_headÚconfidence_headÚmsa_encoderÚ
lm_encoderr   r   iÃ  i   Nc                ó  <€ R  pV! \         R,          V P                  4      V n        V! \        V P                  4      V n        V! \        V P
                  4      V n        V! \        V P                  4      V n        V! \        V P                  4      V n	        V! \        V P                  4      V n        V P                  f;   ^V P                  ,           V P                  V P                  ,          ,           V n        \         SV `D  ! R/ VB  R# )c                 óX   € Vf   V ! 4       # \        V\        4      '       d	   V ! R/ VB # V# r   )rB   rC   )ÚclsÚvals   &&r   Ú_init_nestedÚ2EsmFold2Config.__post_init__.<locals>._init_nested‚  s,   € ØŠ{Ù“u�Ü˜#œt×$Ò$Ù‘z˜S‘zÐ!ØˆJr   ÚesmcNr   )r   r}   r
   r?   rO   r~   ra   r   rm   r€   rs   r�   Úatom_feature_dimÚmax_atomic_numberÚchar_vocab_sizeÚ	max_charsr   r   )r   r   r†   r   s   &, €r   r   ÚEsmFold2Config.__post_init__�  s×   ø€ ò	ñ (¬°vÕ(>À×@PÑ@PÓQˆÔÙ(Ô)BÀD×DUÑDUÓVˆÔÙ*Ô+FÈ×H[ÑH[Ó\ˆÔÙ+Ô,HÈ$×J^ÑJ^Ó_ˆÔÙ'Ô(@À$×BRÑBRÓSˆÔÙ&Ô'>ÀÇÁÓPˆŒð × Ñ Ò(Ø$-°×0FÑ0FÕ$FÈ×I]ÑI]Ð`d×`nÑ`nÕInÕ$nˆDÔ!ä‰ÒÑ' Ô'r   c           	     ó  <€ \         SV `  4        V P                  ^V P                  ,          ^,           ,
          pV P                  P
                  V8w  d4   \        RV P                  P
                   RV P                   RV R24      hR# )zQChecks the width relations that span sub-configs; each sub-config checks its own.rF   z) is not single_inputs_size (z) - (2 * num_res_types + 1) = r   N)r   r   Úsingle_inputs_sizeÚnum_res_typesr?   r'   r"   )r   Úexpected_output_dimr   s   & €r   r   Ú$EsmFold2Config.validate_architecture–  s‘   ø€ ä‰Ñ%Ô'ð #×5Ñ5¸¸T×=OÑ=OÕ9OÐRSÕ9SÕTÐØ×Ñ×'Ñ'Ð+>Ô>ÜØ/°×0AÑ0A×0LÑ0LÐ/Mð NØ×+Ñ+Ð,Ð,JÐK^ÐJ_Ð_`ðbóð ñ ?r   c                óÐ  <€ V ^8„  d   Qh/ S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R	&   S[ R,          ;R
&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   S[S[,          R,          ;R&   # )r&   Nr   Úpairwise_hidden_sizer�   Ú!pair_transition_intermediate_sizeÚsliding_windowÚ
chunk_sizeÚnum_relative_residx_binsÚnum_relative_chain_binsÚ	num_loopsr�   rŠ   r‹   rŒ   Úmax_atoms_per_tokenr‰   Úfolding_trunk_num_hidden_layersÚparcae_num_coda_layersr?   r~   r   r€   r�   r}   )r-   rC   r
   rO   ra   rm   rs   r   )r/   r0   s   "€r   r1   ÚEsmFold2Config.__annotate__'  sä  ø‡ ‚ ñB �t•Ñ!ñC ñD  �*Ñ*ñE ñF ˜d�
Ñ(ñG ñH (+¨T¥zÑ8ñI ñJ ˜$•JÑ$ñK ñL �d•
ÑñM ñN " D�jÑ-ñO ñP ! 4�ZÑ+ñQ ñR �T�zÑñS ñT ˜•:Ñ"ñU ñV ˜T•zÑ'ñW ñX ˜4•ZÑ$ñY ñZ �T�zÑñ[ ñ\ ˜t�Ñ(ñ] ñ^ ˜D•jÑ'ñ_ ñ` &)¨4¥ZÑ4ña ñb   $�JÑ*ñc ñf Ñ2Õ2°TÕ9Ñ@ñg ñh Ñ6Õ6¸Õ=ÑDñi ñj Ñ8Õ8¸4Õ?ÑFñk ñl Ñ0Õ0°4Õ7Ñ>ñm ñn Ñ.Õ.°Õ5Ñ<ño ñp Ñ(Õ(¨4Õ/Ñ6òq r   )r?   r‰   r   r}   r�   r€   r~   )*r3   r4   r5   r6   r7   Ú
model_typer   r
   rO   ra   rm   rs   rM   r   r”   r�   r•   r–   r—   r˜   r™   rš   r�   rŠ   r‹   rŒ   r›   r‰   rœ   r�   r?   r~   r   r€   r�   r}   r   r   r8   r9   r:   r;   r<   s   @@r   r{   r{   '  sÍ   ù‡ € ñ2ðh €Jà�zØÐ1ØÐ5ØÐ7ØÐ/ØÐ-ð€Kð "€KØ'*ÐØ%(ÐØ48Ð%Ø!$€NØ€JØ+-ÐØ*+ÐØ€IØ "€MØ$'ÐØ"$€OØ€IØ&(ÐØ#'ÐØ24Ð#Ø)*Ðà<@€LØ@D€NØBF€OØ:>€KØ8<€JØ26€Kõ(õ*
÷_ … r   r{   N)r7   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   Úautor   r   Ú
get_loggerr3   Úloggerr
   r>   rO   ra   rm   rs   r{   Ú__all__r   r   r   Ú<module>r§      s  ðñ $å .å 3ß ,ß -ð 
×	Ò	˜HÓ	%€ñ ðôð ô0Ð 0ó 0ó óð0ñf ð"ôð ô5Ð$4ó 5ó ó	ð
5ñp ð*ôð ô6(Ð"2ó 6(ó ó	ð
6(ñr ð.ôð ôÐ#3ó ó ó	ð
ñ< ðRôð ô0Ð/ó 0ó ó	ð
0ñ: ÐvÔwØô,Ð.ó ,ó ó xð,ñ Ð/Ô0ØôwÐ%ó wó ó 1ðwðt Ð
‚r   