class_docstr: BLIP2 T5 model.
  Supported model types:
      - pretrain_flant5xl: pretrained model with FlanT5-XL
      - pretrain_flant5xl_vitL: pretrained model with FlanT5-XL
      - pretrain_flant5xxl: pretrained model with FlanT5-XXL
      - caption_coco_flant5xl: fintuned image captioning model with FlanT5-XL
  Usage:
      >>> from lavis.models import load_model
      >>> model = load_model("blip2_t5", "pretrain_flant5xl")
class_docstr_tok: ["BLIP2","T5","model",".","Supported","model","types",":","-","pretrain_flant5xl",":","pretrained","model","with","FlanT5-XL","-","pretrain_flant5xl_vitL",":","pretrained","model","with","FlanT5-XL","-","pretrain_flant5xxl",":","pretrained","model","with","FlanT5-XXL","-","caption_coco_flant5xl",":","fintuned","image","captioning","model","with","FlanT5-XL","Usage",":",">",">",">","from","lavis.models","import","load_model",">",">",">","model","=","load_model","(","``","blip2_t5","''",",","``","pretrain_flant5xl","''",")"]
code: def _lemmatize(self, answers):
      def apply(answer):
          doc = self.lemmatizer(answer)
  
          words = []
          for token in doc:
              if token.pos_ in ["NOUN", "VERB"]:
                  words.append(token.lemma_)
              else:
                  words.append(token.text)
          answer = " ".join(words)
  
          return answer
  
      return [apply(answer) for answer in answers]
  
file_path: lavis/lavis/models/blip2_models/blip2_t5.py
imports: import logging
  import torch
  import torch.nn
  from torch.cuda.amp import autocast
  from transformers import T5TokenizerFast
  from lavis.common.registry import registry
  from lavis.models.blip2_models.blip2 import Blip2Base, disabled_train
  from lavis.models.blip2_models.modeling_t5 import T5Config, T5ForConditionalGeneration
label_desc: Use image node_id 5 for calling the Blip2T5 obj's underlying member method code with example usage: obj._lemmatize(answers) and returns: unknown, answer