docstr: Wraps huggingface EncoderDecoder.generate().
docstr_tok: ["Wraps","huggingface","EncoderDecoder.generate","(",")","."]
code: def generate(self, input_ids: torch.Tensor) -> torch.Tensor:
      """Wraps huggingface EncoderDecoder.generate()."""
      outputs = self.model.generate(
          input_ids=input_ids,
          pad_token_id=self.encoder_tokenizer.pad_id,
          bos_token_id=self.encoder_tokenizer.bos_id,
          eos_token_id=self.encoder_tokenizer.eos_id,
          decoder_start_token_id=self.decoder_tokenizer.bos_id,
          **self._cfg.generate,
      )
      return outputs
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from transformers import AutoModel, BartForConditionalGeneration, EncoderDecoderModel
  from nemo.collections.common.metrics import Perplexity
  from nemo.collections.nlp.data.text2sparql import Text2SparqlDataset
  from nemo.collections.nlp.modules.common.tokenizer_utils import get_tokenizer
  from nemo.core.classes.common import typecheck
  from nemo.core.classes.modelPT import ModelPT
  from nemo.core.neural_types import ChannelType, MaskType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 4 for calling the Text2SparqlModel obj's underlying member method code with example usage: obj.generate(input_ids) and returns: outputs