class_docstr: Transformer-based (duplex) decoder model for TN/ITN.
docstr: Generates predictions
code: def _generate_predictions(
      self, input_ids: torch.Tensor, model_max_len: int = 512
  ):
      """
      Generates predictions
      """
      outputs = self.model.generate(
          input_ids,
          output_scores=True,
          return_dict_in_generate=True,
          max_length=model_max_len,
      )
  
      generated_ids, sequence_toks_scores = (
          outputs["sequences"],
          outputs["scores"],
      )
      generated_texts = self.tokenizer.batch_decode(
          generated_ids, skip_special_tokens=True
      )
  
      return generated_texts, generated_ids, sequence_toks_scores
  
imports: import json
  import os
  from collections import defaultdict
  from math import ceil
  from typing import Dict, List, Optional, Union
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, DataCollatorForSeq2Seq
  import nemo.collections.nlp.data.text_normalization.constants
  from nemo.collections.common.tokenizers.moses_tokenizers import MosesProcessor
  from nemo.collections.nlp.data.text_normalization import TextNormalizationTestDataset
  from nemo.collections.nlp.data.text_normalization.decoder_dataset import TarredTextNormalizationDecoderDataset, TextNormalizationDecoderDataset
  from nemo.collections.nlp.models.duplex_text_normalization.utils import get_formatted_string
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types import ChannelType, LabelsType, LossType, MaskType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 11 for calling the DuplexDecoderModel obj's underlying member method code with example usage: obj._generate_predictions(input_ids, model_max_len) and returns: generated_texts,  generated_ids,  sequence_toks_scores