class_docstr: This is the configuration class to store the configuration of a [`IA3Model`].
  
  Args:
      target_modules (`Optional[Union[List[str], str]]`):
          The names of the modules to apply the adapter to. If this is specified, only the modules with the specified
          names will be replaced. 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. If this is specified as 'all-linear', then all linear/Conv1D modules are chosen,
          excluding the output layer. If this is not specified, modules will be chosen according to the model
          architecture. If the architecture is not known, an error will be raised -- in this case, you should specify
          the target modules manually.
      feedforward_modules (`Optional[Union[List[str], str]]`):
          The names of the modules to be treated as feedforward modules, as in the original paper. These modules will
          have (IA)³ vectors multiplied to the input, instead of the output. `feedforward_modules` must be a name or
          a subset of names present in `target_modules`.
      fan_in_fan_out (`bool`):
          Set this to True if the layer to replace stores weight like (fan_in, fan_out). For example, gpt-2 uses
          `Conv1D` which stores weights like (fan_in, fan_out) and hence this should be set to `True`.
      modules_to_save (`Optional[List[str]]`):
          List of modules apart from (IA)³ layers to be set as trainable and saved in the final checkpoint.
      init_ia3_weights (`bool`):
          Whether to initialize the vectors in the (IA)³ layers, defaults to `True`. Setting this to `False` is
          discouraged.
code: def __post_init__(self):
      self.peft_type = PeftType.IA3
      self.target_modules = (
          set(self.target_modules)
          if isinstance(self.target_modules, list)
          else self.target_modules
      )
      self.feedforward_modules = (
          set(self.feedforward_modules)
          if isinstance(self.feedforward_modules, list)
          else self.feedforward_modules
      )
  
      # check if feedforward_modules is a subset of target_modules. run the check only if both are sets
      if isinstance(self.feedforward_modules, set) and isinstance(
          self.target_modules, set
      ):
          if not self.feedforward_modules.issubset(self.target_modules):
              raise ValueError(
                  "`feedforward_modules` should be a subset of `target_modules`"
              )
  
imports: from dataclasses import dataclass, field
  from typing import List, Optional, Union
  from peft.config import PeftConfig
  from peft.utils import PeftType
label_desc: Use image node_id 1 for calling the IA3Config obj's underlying member method code with example usage: obj.__post_init__() without return types