o
    Ni^                     @   sh   d dl Z d dlmZmZ d dlmZ d dlmZ d dlm	Z	 G dd de
e jZeG dd	 d	eZdS )
    N)	dataclassfield)Union)PromptLearningConfig)PeftTypec                   @   s   e Zd ZdZdZdS )#PromptEncoderReparameterizationTypeMLPLSTMN)__name__
__module____qualname__r   r	    r   r   O/home/ubuntu/.local/lib/python3.10/site-packages/peft/tuners/p_tuning/config.pyr      s    r   c                       s   e Zd ZU dZeejddidZee	ef e
d< edddidZee
d< ed	dd
idZee
d< edddidZee
d<  fddZ  ZS )PromptEncoderConfiga  
    This is the configuration class to store the configuration of a [`PromptEncoder`].

    Args:
        encoder_reparameterization_type (Union[[`PromptEncoderReparameterizationType`], `str`]):
            The type of reparameterization to use.
        encoder_hidden_size (`int`): The hidden size of the prompt encoder.
        encoder_num_layers (`int`): The number of layers of the prompt encoder.
        encoder_dropout (`float`): The dropout probability of the prompt encoder.
    helpz(How to reparameterize the prompt encoder)defaultmetadataencoder_reparameterization_typeNz%The hidden size of the prompt encoderencoder_hidden_size   z*The number of layers of the prompt encoderencoder_num_layersg        z!The dropout of the prompt encoderencoder_dropoutc                    s   t    tj| _d S )N)super__post_init__r   P_TUNING	peft_type)self	__class__r   r   r   :   s   
z!PromptEncoderConfig.__post_init__)r
   r   r   __doc__r   r   r   r   r   str__annotations__r   intr   r   floatr   __classcell__r   r   r   r   r      s&   
 r   )enumdataclassesr   r   typingr   peft.configr   
peft.utilsr   r    Enumr   r   r   r   r   r   <module>   s   