
    Z jw                     p    S r SSKJr  SSKJr  SSKJr  SSKJr  \" SS9\ " S	 S
\5      5       5       r	S
/r
g)zPhi model configuration    )strict   )PreTrainedConfig)RopeParameters)auto_docstringzmicrosoft/phi-1)
checkpointc                     ^  \ rS rSr% SrSrS/rSSSSSSS.rS/S	/4S	/S	/4S
S/S
/4S
/S
/4S.rSr	\
\S'   Sr\
\S'   Sr\
\S'   Sr\
\S'   Sr\
\S'   Sr\
S-  \S'   Sr\\
-  \S'   Sr\\
-  \S'   Sr\\
-  S-  \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)r!\
S-  \S*'   S+r"\
\#\
   -  S-  \S,'   Sr$\
S-  \S-'   U 4S. jr%S/r&U =r'$ )0	PhiConfig   a  
qk_layernorm (`bool`, *optional*, defaults to `False`):
    Whether or not to normalize the Queries and Keys after projecting the hidden states.

Example:

```python
>>> from transformers import PhiModel, PhiConfig

>>> # Initializing a Phi-1 style configuration
>>> configuration = PhiConfig.from_pretrained("microsoft/phi-1")

>>> # Initializing a model from the configuration
>>> model = PhiModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```phipast_key_valuescolwiserowwise)zlayers.*.self_attn.q_projzlayers.*.self_attn.k_projzlayers.*.self_attn.v_projzlayers.*.self_attn.densezlayers.*.mlp.fc1zlayers.*.mlp.fc2	input_idsinputs_embedshidden_statesattention_mask)embed_tokensembed_dropoutlayersfinal_layernormi   
vocab_sizei   hidden_sizei    intermediate_sizenum_hidden_layers    num_attention_headsNnum_key_value_headsg        resid_pdrop
embd_pdropattention_dropoutgelu_new
hidden_actmax_position_embeddingsg{Gz?initializer_rangegh㈵>layer_norm_epsT	use_cacheFtie_word_embeddingsrope_parametersqk_layernorm   bos_token_id   eos_token_idpad_token_idc                    > U R                   c  U R                  U l         UR                  SS5        [        TU ]  " S0 UD6  g )Npartial_rotary_factorg      ? )r   r   
setdefaultsuper__post_init__)selfkwargs	__class__s     z/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/phi/configuration_phi.pyr5   PhiConfig.__post_init__T   s>    ##+'+'?'?D$137''    )r   )(__name__
__module____qualname____firstlineno____doc__
model_typekeys_to_ignore_at_inferencebase_model_tp_planbase_model_pp_planr   int__annotations__r   r   r   r   r   r   floatr    r!   r#   strr$   r%   r&   r'   boolr(   r)   r   dictr*   r,   r.   listr/   r5   __static_attributes____classcell__)r8   s   @r9   r
   r
      s   & J#4"5%.%.%.$-%% &(9:*+o->?#%568IJ,-/@A	 JK!s!s!!&*t*"K"!J!,/us{T)/ J #'S'#u# NE It %%48O^d*T18L$ L#* +,L#S	/D(,#L#*#( (r;   r
   N)r@   huggingface_hub.dataclassesr   configuration_utilsr   modeling_rope_utilsr   utilsr   r
   __all__r2   r;   r9   <module>rS      sJ     . 3 1 # ,-?(  ?(  .?(D -r;   