
    Z j!                         S r SSKJr  SSKJr  SSKJrJr  \R                  " \	5      r
\" SS9\ " S S	\5      5       5       r\" SS9\ " S
 S\5      5       5       r\" SS9\ " S S\5      5       5       r/ SQrg)zALIGN model configuration    )strict   )PreTrainedConfig)auto_docstringloggingzkakaobrain/align-base)
checkpointc                      \ rS rSr% SrSrSrSr\\	S'   Sr
\\	S'   S	r\\	S
'   S	r\\	S'   Sr\\	S'   Sr\\	S'   Sr\\-  \	S'   Sr\\-  \	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\S-  \	S'   Sr\S-  \	S'   Sr\\\   -  S-  \	S'   S rg)!AlignTextConfig   a  
Example:

```python
>>> from transformers import AlignTextConfig, AlignTextModel

>>> # Initializing a AlignTextConfig with kakaobrain/align-base style configuration
>>> configuration = AlignTextConfig()

>>> # Initializing a AlignTextModel (with random weights) from the kakaobrain/align-base style configuration
>>> model = AlignTextModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```align_text_modeltext_configi:w  
vocab_sizei   hidden_size   num_hidden_layersnum_attention_headsi   intermediate_sizegelu
hidden_actg?hidden_dropout_probattention_probs_dropout_probi   max_position_embeddings   type_vocab_size{Gz?initializer_rangeg-q=layer_norm_epsr   Npad_token_idbos_token_ideos_token_id )__name__
__module____qualname____firstlineno____doc__
model_typebase_config_keyr   int__annotations__r   r   r   r   r   strr   floatr   r   r   r   r   r   r   r    list__static_attributes__r!       ~/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/align/configuration_align.pyr
   r
      s      $J#OJKs!!!s!J'**03 %#+3#&S&OS#u#!NE! L#* #L#*#+/L#S	/D(/r/   r
   c                     ^  \ rS rSr% SrSrSrSr\\	S'   Sr
\\\   -  \\\4   -  \	S'   S	r\\	S
'   Sr\\	S'   Sr\\	S'   Sr\\   \\S4   -  \	S'   Sr\\   \\S4   -  \	S'   Sr\\   \\S4   -  \	S'   Sr\\\S4   -  \	S'   Sr\\   \\S4   -  \	S'   Sr\\   \\S4   -  \	S'   Sr\\   \\S4   -  \	S'   Sr\\	S'   S r\\	S!'   S"r\\	S#'   S$r\\	S%'   S&r\\	S''   S(r\\	S)'   S*r\\	S+'   S,r \\-  \	S-'   U 4S. jr!S/r"U =r#$ )0AlignVisionConfig@   aC	  
width_coefficient (`float`, *optional*, defaults to 2.0):
    Scaling coefficient for network width at each stage.
depth_coefficient (`float`, *optional*, defaults to 3.1):
    Scaling coefficient for network depth at each stage.
depth_divisor (`int`, *optional*, defaults to 8):
    A unit of network width.
kernel_sizes (`list[int]`, *optional*, defaults to `[3, 3, 5, 3, 5, 5, 3]`):
    List of kernel sizes to be used in each block.
in_channels (`list[int]`, *optional*, defaults to `[32, 16, 24, 40, 80, 112, 192]`):
    List of input channel sizes to be used in each block for convolutional layers.
out_channels (`list[int]`, *optional*, defaults to `[16, 24, 40, 80, 112, 192, 320]`):
    List of output channel sizes to be used in each block for convolutional layers.
depthwise_padding (`list[int]`, *optional*, defaults to `[]`):
    List of block indices with square padding.
strides (`list[int]`, *optional*, defaults to `[1, 2, 2, 2, 1, 2, 1]`):
    List of stride sizes to be used in each block for convolutional layers.
num_block_repeats (`list[int]`, *optional*, defaults to `[1, 2, 2, 3, 3, 4, 1]`):
    List of the number of times each block is to repeated.
expand_ratios (`list[int]`, *optional*, defaults to `[1, 6, 6, 6, 6, 6, 6]`):
    List of scaling coefficient of each block.
squeeze_expansion_ratio (`float`, *optional*, defaults to 0.25):
    Squeeze expansion ratio.
hidden_dim (`int`, *optional*, defaults to 1280):
    The hidden dimension of the layer before the classification head.
pooling_type (`str` or `function`, *optional*, defaults to `"mean"`):
    Type of final pooling to be applied before the dense classification head. Available options are [`"mean"`,
    `"max"`]
batch_norm_momentum (`float`, *optional*, defaults to 0.99):
    The momentum used by the batch normalization layers.
drop_connect_rate (`float`, *optional*, defaults to 0.2):
    The drop rate for skip connections.

Example:

```python
>>> from transformers import AlignVisionConfig, AlignVisionModel

>>> # Initializing a AlignVisionConfig with kakaobrain/align-base style configuration
>>> configuration = AlignVisionConfig()

>>> # Initializing a AlignVisionModel (with random weights) from the kakaobrain/align-base style configuration
>>> model = AlignVisionModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```align_vision_modelvision_configr   num_channelsiX  
image_sizeg       @width_coefficientg@depth_coefficient   depth_divisor)r   r      r   r<   r<   r   .kernel_sizes)          (   P   p      in_channels)r?   r@   rA   rB   rC   rD   i@  out_channelsr!   depthwise_padding)   r   r   r   rH   r   rH   strides)rH   r   r   r   r      rH   num_block_repeats)rH      rL   rL   rL   rL   rL   expand_ratiosg      ?squeeze_expansion_ratioswishr   i 
  
hidden_dimmeanpooling_typer   r   gMbP?batch_norm_epsgGz?batch_norm_momentumg?drop_connect_ratec                    > [        U R                  5      S-  U l        S H!  n[        X[	        [        X5      5      5        M#     [        TU ]  " S0 UD6  g )NrJ   )r=   rE   rF   rG   rI   rK   rM   r!   )sumrK   r   setattrr-   getattrsuper__post_init__)selfkwargsattr	__class__s      r0   r[   AlignVisionConfig.__post_init__   sO    !$T%;%;!<q!@
D DWT%8 9:
 	''r/   )r   )$r"   r#   r$   r%   r&   r'   r(   r6   r)   r*   r7   r-   tupler8   r,   r9   r;   r=   rE   rF   rG   rI   rK   rM   rN   r   r+   rP   rR   r   rS   rT   rU   r[   r.   __classcell__r_   s   @r0   r2   r2   @   s{   .` &J%OL#47Jd3i%S/17"u""u"M30EL$s)eCHo-E/MKcU38_,M0OL$s)eCHo-O02teCHo-2+@GT#YsCx(@5JtCy5c?2J1FM49uS#X.F%)U)JJL##u#!NE!!%%%(us{(( (r/   r2   c                      ^  \ rS rSr% SrSr\\S.rSr	\
\-  S-  \S'   Sr\
\-  S-  \S'   Sr\\S	'   S
r\\S'   Sr\\S'   U 4S jrSrU =r$ )AlignConfig   a  
temperature_init_value (`float`, *optional*, defaults to 1.0):
    The initial value of the *temperature* parameter. Default is used as per the original ALIGN implementation.

Example:

```python
>>> from transformers import AlignConfig, AlignModel

>>> # Initializing a AlignConfig with kakaobrain/align-base style configuration
>>> configuration = AlignConfig()

>>> # Initializing a AlignModel (with random weights) from the kakaobrain/align-base style configuration
>>> model = AlignModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config

>>> # We can also initialize a AlignConfig from a AlignTextConfig and a AlignVisionConfig
>>> from transformers import AlignTextConfig, AlignVisionConfig

>>> # Initializing ALIGN Text and Vision configurations
>>> config_text = AlignTextConfig()
>>> config_vision = AlignVisionConfig()

>>> config = AlignConfig(text_config=config_text, vision_config=config_vision)
```align)r   r5   Nr   r5   i  projection_dimg      ?temperature_init_valuer   r   c                   > U R                   c%  [        5       U l         [        R                  S5        O9[	        U R                   [
        5      (       a  [        S0 U R                   D6U l         U R                  c%  [        5       U l        [        R                  S5        O9[	        U R                  [
        5      (       a  [        S0 U R                  D6U l        [        TU ]$  " S0 UD6  g )NzP`text_config` is `None`. Initializing the `AlignTextConfig` with default values.zT`vision_config` is `None`. initializing the `AlignVisionConfig` with default values.r!   )
r   r
   loggerinfo
isinstancedictr5   r2   rZ   r[   )r\   r]   r_   s     r0   r[   AlignConfig.__post_init__   s    #.0DKKjk(($//.B1A1ABD%!2!4DKKno**D11!2!HT5G5G!HD''r/   )r"   r#   r$   r%   r&   r'   r
   r2   sub_configsr   rn   r   r*   r5   rh   r)   ri   r,   r   r[   r.   rb   rc   s   @r0   re   re      sn    8 J"1DUVK26K((4/648M4**T18NC$'E'#u#( (r/   re   )r
   r2   re   N)r&   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   
get_loggerr"   rk   r
   r2   re   __all__r!   r/   r0   <module>rv      s      . 3 , 
		H	% 23"0& "0  4"0J 23V(( V(  4V(r 233(" 3(  43(l Br/   