code: def __init__(self, cfg, task):
      super().__init__(task.target_dictionary)
  
      self.config = cfg
      config = AdaptiveSpanSmallConfig(
          vocab_size=len(task.target_dictionary),
          d_model=cfg.d_model,
          n_head=cfg.n_head,
          d_inner=cfg.d_inner,
          n_layer=cfg.n_layer,
          attn_span=cfg.attn_span,
          dropout=cfg.dropout,
          emb_dropout=cfg.emb_dropout,
          adapt_span_ramp=cfg.adapt_span_ramp,
          adapt_span_init=cfg.adapt_span_init,
          aux_loss_scaler=cfg.aux_loss_scaler,
          adapt_span_layer=cfg.adapt_span_layer,
      )
      logger.info(config)
      self.model = AdaptiveSpanTransformerModel(**config.__dict__)
  
      self._mems = None
  
imports: import logging
  from dataclasses import dataclass
  from typing import Dict, List, Optional
  import torch
  from fairseq.dataclass import FairseqDataclass
  from fairseq.models import FairseqIncrementalDecoder, FairseqLanguageModel, register_model
  from .adaptive_span_model import TransformerSeq
label_desc: Use image node_id 1 to create a new AdaptiveSpanDecoder object from inherited base classes: FairseqIncrementalDecoder with example: obj = AdaptiveSpanDecoder(cfg, task)