class_docstr: The UniPELT adapter architecture proposed by Mao et al. (2022). See https://arxiv.org/pdf/2110.07577.pdf.
class_docstr_tok: ["The","UniPELT","adapter","architecture","proposed","by","Mao","et","al",".","(","2022",")",".","See","https",":","\/\/arxiv.org\/pdf\/2110.07577.pdf","."]
code: def __init__(
      self,
      prefix_tuning: Optional[PrefixTuningConfig] = None,
      adapter: Optional[BnConfig] = None,
      lora: Optional[LoRAConfig] = None,
  ):
      components = [
          prefix_tuning or PrefixTuningConfig(prefix_length=10),
          adapter or SeqBnConfig(reduction_factor=16),
          lora or LoRAConfig(r=8),
      ]
  
      super().__init__(
          *[c.replace(use_gating=True) for c in components]
      )
  
imports: import logging
  from collections.abc import Mapping
  from dataclasses import FrozenInstanceError, asdict, dataclass, field, replace
  from typing import List, Optional, Union
  from ..utils import resolve_adapter_config
label_desc: Use image node_id 1 to create a new UniPELTConfig object from inherited base classes: ConfigUnion with example: obj = UniPELTConfig(prefix_tuning, adapter, lora)