class_docstr: Decoder layer implemented by fairseq.
  This version only removes the "args" parameter, no other changes
class_docstr_tok: ["Decoder","layer","implemented","by","fairseq",".","This","version","only","removes","the","``","args","''","parameter",",","no","other","changes"]
code: def build_self_attention(
      self,
      embed_dim,
      nhead,
      attn_dropout,
      add_bias_kv=False,
      add_zero_attn=False,
      has_causal_mask=False,
  ):
      return MultiheadAttention(
          embed_dim,
          nhead,
          dropout=attn_dropout,
          add_bias_kv=add_bias_kv,
          add_zero_attn=add_zero_attn,
          self_attention=True,
          is_decoder=True,
          has_causal_mask=has_causal_mask,
      )
  
imports: import math
  import uuid
  from typing import Dict, Optional, List
  import torch
  from torch import Tensor, nn
  from torch.nn import Parameter, LayerNorm, Dropout
  from lightseq.training.ops.pytorch import util
  from lightseq.training.ops.pytorch.layer_base import TransformerEmbeddingLayerBase, TransformerEncoderLayerBase, TransformerDecoderLayerBase
  from .quantization import QuantLinear, TensorQuantizer, act_quant_config, weight_quant_config, out_quant_config, emb_quant_config
label_desc: Use image node_id 2 for calling the TransformerDecoderLayer obj's underlying member method code with example usage: obj.build_self_attention(embed_dim, nhead, attn_dropout, add_bias_kv, add_zero_attn, has_causal_mask) and returns: MultiheadAttention