
    9i-                     X    S r SSKJr  SSKJr  \R                  " 5       r " S S\5      rg)zPEER model configuration     )PretrainedConfig)loggerc            1          ^  \ rS rSrSrSrSSSSSS	S
SSSSSSSSSSSSSSSSSSSSSSS\" 5       SSSSSSSSSS SSSSSS!SS41U 4S" jjrS#rU =r	$ )$
PeerConfig   a  
This is the configuration class to store the configuration of a :class:`~transformers.PeerModel` or a
:class:`~transformers.TFPeerModel`. It is used to instantiate a PEER model according to the specified
arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar
configuration to that of the PEER `google/peer-small-discriminator
<https://huggingface.co/google/peer-small-discriminator>`__ architecture.

Configuration objects inherit from :class:`~transformers.PretrainedConfig` and can be used to control the model
outputs. Read the documentation from :class:`~transformers.PretrainedConfig` for more information.


Args:
    vocab_size (:obj:`int`, `onal`, defaults to 30522)
        Vocabulary size of the PEER model. Defines the number of different tokens that can be represented by the
        :obj:`inputs_ids` passed when calling :class:`~transformers.PeerModel` or
        :class:`~transformers.TFPeerModel`.
    embedding_size (:obj:`int`, `onal`, defaults to 128)
        Dimensionality of the encoder layers and the pooler layer.
    hidden_size (:obj:`int`, `onal`, defaults to 256)
        Dimensionality of the encoder layers and the pooler layer.
    num_hidden_layers (:obj:`int`, `onal`, defaults to 12)
        Number of hidden layers in the Transformer encoder.
    num_attention_heads (:obj:`int`, `onal`, defaults to 4)
        Number of attention heads for each attention layer in the Transformer encoder.
    intermediate_size (:obj:`int`, `onal`, defaults to 1024)
        Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
    hidden_act (:obj:`str` or :obj:`Callable`, `onal`, defaults to :obj:`"gelu"`)
        The non-linear activation function (function or string) in the encoder and pooler. If string,
        :obj:`"gelu"`, :obj:`"relu"`, :obj:`"silu"` and :obj:`"gelu_new"` are supported.
    hidden_dropout_prob (:obj:`float`, `onal`, defaults to 0.1)
        The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
    attention_probs_dropout_prob (:obj:`float`, `onal`, defaults to 0.1)
        The dropout ratio for the attention probabilities.
    max_position_embeddings (:obj:`int`, `onal`, defaults to 512)
        The maximum sequence length that this model might ever be used with. Typically set this to something large
        just in case (e.g., 512 or 1024 or 2048).
    type_vocab_size (:obj:`int`, `onal`, defaults to 2)
        The vocabulary size of the :obj:`token_type_ids` passed when calling :class:`~transformers.PeerModel` or
        :class:`~transformers.TFPeerModel`.
    initializer_range (:obj:`float`, `onal`, defaults to 0.02)
        The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
    layer_norm_eps (:obj:`float`, `onal`, defaults to 1e-12)
        The epsilon used by the layer normalization layers.
    summary_type (:obj:`str`, `onal`, defaults to :obj:`"first"`)
        Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.

        Has to be one of the following ones

            - :obj:`"last"`: Take the last token hidden state (like XLNet).
            - :obj:`"first"`: Take the first token hidden state (like BERT).
            - :obj:`"mean"`: Take the mean of all tokens hidden states.
            - :obj:`"cls_index"`: Supply a Tensor of classification token position (like GPT/GPT-2).
            - :obj:`"attn"`: Not implemented now, use multi-head attention.
    summary_use_proj (:obj:`bool`, `onal`, defaults to :obj:`True`)
        Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.

        Whether or not to add a projection after the vector extraction.
    summary_activation (:obj:`str`, `onal`)
        Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.

        Pass :obj:`"gelu"` for a gelu activation to the output, any other value will result in no activation.
    summary_last_dropout (:obj:`float`, `onal`, defaults to 0.0)
        Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.

        The dropout ratio to be used after the projection and activation.
    position_embedding_type (:obj:`str`, `onal`, defaults to :obj:`"absolute"`)
        Type of position embedding. Choose one of :obj:`"absolute"`, :obj:`"relative_key"`,
        :obj:`"relative_key_query"`. For positional embeddings use :obj:`"absolute"`. For more information on
        :obj:`"relative_key"`, please refer to `Self-Attention with Relative Position Representations (Shaw et al.)
        <https://arxiv.org/abs/1803.02155>`__. For more information on :obj:`"relative_key_query"`, please refer to
        `Method 4` in `Improve Transformer Models with Better Relative Position Embeddings (Huang et al.)
        <https://arxiv.org/abs/2009.13658>`__.

Examples::

    >>> from transformers import PeerModel, PeerConfig

    >>> # Initializing a PEER peer-base-uncased style configuration
    >>> configuration = PeerConfig()

    >>> # Initializing a model from the peer-base-uncased style configuration
    >>> model = PeerModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
peeri:w                    i   gelug?i      g{Gz?g-q=firstTr   absolute   2       g      ? g      ?   g333333?d   g        z1.0-1.0z	0.15-0.15c2                   > [         T3U ]  " SSU0U2D6  Xl        X l        X0l        X@l        XPl        X`l        Xpl        Xl	        Xl
        Xl        Xl        Xl        Xl        Xl        Xl        UU l        UU l        UU l        UU l        [+        U5      [,        :X  a  UR/                  S5      nUU l        UU l        UU l        UU l        UU l        UU l        UU l        UU l        UU l         UU l!        UU l"        U U l#        U!U l$        U"U l%        U#U l&        U$U l'        U%U l(        U&U l)        U'U l*        U(U l+        U)U l,        U*U l-        U+U l.        U,U l/        U-U l0        U.U l1        U/U l2        U0U l3        U1U l4        g )Npad_token_id+ )5super__init__
vocab_sizeembedding_sizehidden_sizenum_hidden_layersnum_hidden_layers_sharednum_hidden_layers_gennum_attention_headsintermediate_size
hidden_acthidden_dropout_probattention_probs_dropout_probmax_position_embeddingstype_vocab_sizeinitializer_rangelayer_norm_epssummary_typesummary_use_projsummary_activationsummary_last_dropouttypestrsplitposition_embedding_typeaugmentation_temperature
gen_weight
dis_weightdis_weight_scheduleraugmentation_copiesabsolute_position_embeddingrelative_position_embeddingseq_side_info_embeddingscold_start_epochsdebug_config
rtd_levelsrtd_level_thresholdsranking_start_epoch!real_token_rank_for_good_estimaterank_sampl_proprank_sampl_rangerank_delta_factorrank_level_compare_methodweight_loss_low_levelsweight_loss_low_levels_setting weight_loss_low_levels_schedulerweight_loss_level_composmask_damask_da_start_epochmask_da_mlm_topk_valmask_ratio_settingmask_ratio_schedulermask_ratio_stage1_epochs)4selfr   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r   r5   r7   r8   r9   r:   r6   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   kwargs	__class__s4                                                      h/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/modelscope/models/nlp/peer/configuration.pyr   PeerConfig.__init__s   s   f 	=l=f=$,&!2(@%%:"#6 !2$#6 ,H)'>$.!2,( 0"4$8!'(C/&=&C&CC&H#'>$(@%$$$8!#6 +F(+F((@%!2($$8!#6 1R.. 0!2)B&&<#.L+0P-(@%#6 $8!"4$8!(@%    )0r;   r)   r:   r6   r>   r?   r8   r9   r    r7   r'   r(   r!   r,   r&   r-   rL   rN   rM   rP   rO   rQ   r*   r%   r"   r$   r#   r5   rF   rG   rD   rE   rB   rC   r<   rA   r@   r=   r0   r1   r.   r/   r+   r   rK   rH   rJ   rI   )
__name__
__module____qualname____firstlineno____doc__
model_typedictr   __static_attributes____classcell__)rT   s   @rU   r   r      s    Ul J " # #%*+'(%&#'"%(.1),!"#' %%"&$*&))3&'%&*+-.-/*+#'"f&(%(34!$"%#&+,(+0923*+%(&'$/&'*-cmA mArW   r   N)r\    transformers.configuration_utilsr   modelscope.utilsr   logging
get_loggerr   r   rW   rU   <module>re      s1     ! > .				FA! FArW   