class_docstr: Adds adapters to the MultiHeadSelfAttention module of DistilBert.
class_docstr_tok: ["Adds","adapters","to","the","MultiHeadSelfAttention","module","of","DistilBert","."]
code: def init_adapters(self, model_config, adapters_config):
      # Wrap layers for LoRA
      self.q_lin = LoRALinear.wrap(
          self.q_lin,
          "selfattn",
          model_config,
          adapters_config,
          attn_key="q",
      )
      self.k_lin = LoRALinear.wrap(
          self.k_lin,
          "selfattn",
          model_config,
          adapters_config,
          attn_key="k",
      )
      self.v_lin = LoRALinear.wrap(
          self.v_lin,
          "selfattn",
          model_config,
          adapters_config,
          attn_key="v",
      )
  
      self.prefix_tuning = PrefixTuningLayer(
          "self", model_config, adapters_config
      )
  
file_path: adapters/src/adapters/models/distilbert/mixin_distilbert.py
imports: from typing import Iterable, Tuple
  import torch.nn
  from ...methods.bottleneck import BottleneckLayer
  from ...methods.lora import LoRALinear
  from ...methods.prefix_tuning import PrefixTuningLayer
  from ...model_mixin import EmbeddingAdaptersMixin, InvertibleAdaptersMixin, ModelBaseAdaptersMixin
label_desc: Use image node_id 1 for calling the DistilBertMultiHeadSelfAttentionMixin obj's underlying member method code with example usage: obj.init_adapters(model_config, adapters_config) without return types