class_docstr: ALBEF VQA models.
  
  Supported model types:
      - base: vqa model initialized with pre-trained ALBEF base model on 115M image-text pairs after CapFilt; not fine-tuned.
      - vqav2: fine-tuned ALBEF base model on VQA v2.0 dataset.
  
  Usage:
      >>> from lavis.models import load_model
      >>> model = load_model("albef_vqa", "vqav2")
code: def __init__(
      self,
      image_encoder,
      text_encoder,
      text_decoder,
      use_distill=True,
      momentum=0.995,
      alpha=0.4,
      max_txt_len=35,
  ):
      super().__init__()
  
      self.tokenizer = self.init_tokenizer()
      self.max_txt_len = max_txt_len
  
      self.use_distill = use_distill
  
      self.visual_encoder = image_encoder
  
      self.text_encoder = text_encoder
      self.text_decoder = text_decoder
  
      if self.use_distill:
          self.visual_encoder_m = deepcopy(self.visual_encoder)
          self.text_encoder_m = deepcopy(self.text_encoder)
          self.text_decoder_m = deepcopy(self.text_decoder)
  
          self.momentum = momentum
          self.alpha = alpha
  
          self.model_pairs = [
              [self.visual_encoder, self.visual_encoder_m],
              [self.text_encoder, self.text_encoder_m],
              [self.text_decoder, self.text_decoder_m],
          ]
  
          self.copy_params()
  
imports: import logging
  import os
  from copy import deepcopy
  import torch
  import torch.nn.functional
  from lavis.common.registry import registry
  from lavis.common.utils import get_abs_path, is_url
  from lavis.models.albef_models import AlbefBase
  from lavis.models.albef_models.albef_outputs import AlbefIntermediateOutput, AlbefOutput
  from lavis.models.base_model import MomentumDistilationMixin, tile
  from lavis.models.med import BertConfig, BertLMHeadModel, XBertEncoder
  from lavis.models.vit import VisionTransformerEncoder, interpolate_pos_embed
  from lavis.common.dist_utils import download_cached_file
label_desc: Use image node_id 1 to create a new AlbefVQA object from inherited base classes: AlbefBase, MomentumDistilationMixin with example: obj = AlbefVQA(image_encoder, text_encoder, text_decoder, use_distill, momentum, alpha, max_txt_len)