ó
    >:jÙ  ã                  ól   • S SK Jr  S SKJrJr  S SKJrJrJr  S SK	J
r
  S SKJr  \ " S S\
5      5       rg)	é    )Úannotations)Ú	dataclassÚfield)ÚLiteralÚOptionalÚUnion)Ú
PeftConfig)ÚPeftTypec                  ó*  ^ • \ rS rSr% Sr\" SSS0S9rS\S'   \" S	SS
0S9rS\S'   \" S	SS0S9r	S\S'   \" S	SS0S9r
S\S'   \" SSS0S9rS\S'   \" SSS0S9rS\S'   \" SSS0S9rS\S'   \" SSS0S9rS\S'   \" SSS 0S9rS\S!'   U 4S" jrS#rU =r$ )$Ú
PolyConfigé   a@  
This is the configuration class to store the configuration of a [`PolyModel`].
    - [Polytropon (Poly)](https://huggingface.co/papers/2202.13914)
    - [Multi-Head Routing (MHR)](https://huggingface.co/papers/2211.03831)

Args:
    r (`int`): Attention dimension of each Lora in Poly.
    target_modules (`Union[List[str],str]`): The names of the modules to apply Poly to.
    exclude_modules (`Optional[Union[List[str], str]]`):
        The names of the modules to not apply the adapter. When passing a string, a regex match will be performed.
        When passing a list of strings, either an exact match will be performed or it is checked if the name of the
        module ends with any of the passed strings.
    modules_to_save (`List[str]`): List of modules apart from Poly layers to be set as trainable
        and saved in the final checkpoint.
    init_weights (bool): Whether to perform initialization of Poly weights.
    poly_type (`Literal["poly"]`): The variant of the Poly module to use. Currently, only "poly"
        is supported.
    n_tasks (`int`): The number of tasks in a multitasking scenario.
    n_skills (`int`): The number of skills (LoRA) in each Poly layer.
    n_splits (`int`): The number of splits within each LoRA of a Poly layer. A value greater
        than 1 indicates the use of Multi-Head Routing (MHR).
é   ÚhelpzLora attention dimension)ÚdefaultÚmetadataÚintÚrNz¢List of module names or regex expression of the module names to replace with Poly.For example, ['q', 'v'] or '.*decoder.*(SelfAttention|EncDecAttention).*(q|v)$' zOptional[Union[list[str], str]]Útarget_moduleszRList of module names or regex expression of the module names to exclude from Poly.Úexclude_modulesa  List of modules apart from Poly layers to be set as trainable and saved in the final checkpoint. For example, in Sequence Classification or Token Classification tasks, the final layer `classifier/score` are randomly initialized and as such need to be trainable and saved.zOptional[list[str]]Úmodules_to_saveTz Whether to initialize the weights of the Poly layers with their default initialization. Don't change this setting, except if you know exactly what you're doing.ÚboolÚinit_weightsÚpolyzDType of Poly modules to be used. Currently only "poly" is supported.zLiteral['poly']Ú	poly_typeé   z)Number of tasks in multitasking scenario.Ún_tasksé   z+Number of skills (LoRA) in each Poly layer.Ún_skillsz2Number of splits within each LoRA of a Poly layer.Ún_splitsc                ól  >• [         TU ]  5         [        R                  U l        [        U R                  [        5      (       a  [        U R                  5      OU R                  U l        [        U R                  [        5      (       a  [        U R                  5      U l	        g U R                  U l	        g )N)
ÚsuperÚ__post_init__r
   ÚPOLYÚ	peft_typeÚ
isinstancer   ÚlistÚsetr   )ÚselfÚ	__class__s    €ÚT/home/mande/repo/quber/.venv/lib/python3.13/site-packages/peft/tuners/poly/config.pyr"   ÚPolyConfig.__post_init___   s…   ø€ Ü‰ÑÔÜ!Ÿ™ˆŒä(2°4×3FÑ3FÌ×(MÑ(MŒC�×#Ñ#Ô$ÐSW×SfÑSfð 	Ôô *4°D×4HÑ4HÌ$×)OÑ)OŒC�×$Ñ$Ó%ð 	ÕØUY×UiÑUið 	Õó    )r   r$   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Ú__annotations__r   r   r   r   r   r   r   r   r"   Ú__static_attributes__Ú__classcell__)r)   s   @r*   r   r      s3  ø‡ ññ. ˜1¨Ð0JÐ'KÑL€A€sÓLÙ6;Øàð _ð
ñ7€NÐ3ó ñ 8=ØØÐnÐoñ8€OÐ4ó ñ ,1Øàð vð
ñ,€OÐ(ó ñ ØàðNð
ñ€L�$ó ñ "'ØØÐ`Ðañ"€Iˆó ñ ØØÐEÐFñ€GˆSó ñ ØØÐGÐHñ€Hˆcó ñ ØØÐNÐOñ€Hˆcó ÷

ó 
r,   r   N)Ú
__future__r   Údataclassesr   r   Útypingr   r   r   Úpeft.configr	   Ú
peft.utilsr
   r   © r,   r*   Ú<module>r;      s7   ðõ #ç (ß +Ñ +å "Ý ð ôN
�ó N
ó ñN
r,   