docstr: This method unmerges all merged adapter layers from the base weights.
docstr_tok: ["This","method","unmerges","all","merged","adapter","layers","from","the","base","weights","."]
code: def unmerge(self) -> None:
      """
      This method unmerges all merged adapter layers from the base weights.
      """
      if not self.merged:
          warnings.warn("Already unmerged. Nothing to do.")
          return
  
      warnings.warn("Unmerge result can be inaccurate for (IA)^3.")
      while len(self.merged_adapters) > 0:
          active_adapter = self.merged_adapters.pop()
          if active_adapter in self.ia3_l.keys():
              base_layer = self.get_base_layer()
              # divide by (IA)^3 vector. Add tolerace to avoid division by zero
              ia3_scaling = self.ia3_l[active_adapter].data
              if not self.is_feedforward:
                  ia3_scaling = ia3_scaling.permute(1, 0, 2, 3)
              base_layer.weight.data = torch.div(
                  base_layer.weight.data, ia3_scaling + 1e-8
              )
  
              if not self.is_feedforward and (
                  base_layer.bias is not None
              ):
                  scaling = self.ia3_l[active_adapter].reshape(
                      base_layer.bias.shape
                  )
                  base_layer.bias.data = torch.mul(
                      base_layer.bias.data, scaling.data
                  )
  
imports: import warnings
  from typing import Any, List, Optional
  import torch
  import torch.nn
  from transformers.pytorch_utils import Conv1D
  from peft.tuners.tuners_utils import BaseTunerLayer
  from peft.utils import transpose
label_desc: Use image node_id 4 for calling the Conv2d obj's underlying member method code with example usage: obj.unmerge() without return types