class_docstr: Example helper class for comprehending DeepSpeed Meta Tensors, meant to mimic HF pipelines.
  The DSPipeline can run with and without meta tensors.
code: def generate_outputs(
      self, inputs=["test"], num_tokens=100, do_sample=False
  ):
      generate_kwargs = dict(
          max_new_tokens=num_tokens, do_sample=do_sample
      )
  
      input_tokens = self.tokenizer.batch_encode_plus(
          inputs, return_tensors="pt", padding=True
      )
      for t in input_tokens:
          if torch.is_tensor(input_tokens[t]):
              input_tokens[t] = input_tokens[t].to(self.device)
  
      self.model.to(self.device)
  
      if isinstance(self.tokenizer, LlamaTokenizerFast):
          # NOTE: Check if Llamma can work w/ **input_tokens
          #       'token_type_ids' kwarg not recognized in Llamma generate function
          outputs = self.model.generate(
              input_tokens.input_ids, **generate_kwargs
          )
      else:
          outputs = self.model.generate(
              **input_tokens, **generate_kwargs
          )
      outputs = self.tokenizer.batch_decode(
          outputs, skip_special_tokens=True
      )
  
      return outputs
  
file_path: deepspeedexamples/inference/huggingface/text-generation/utils.py
imports: import os
  import io
  from pathlib import Path
  import json
  import deepspeed
  import torch
  from huggingface_hub import snapshot_download
  from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer, LlamaTokenizerFast
  from deepspeed.accelerator import get_accelerator
label_desc: Use image node_id 4 for calling the DSPipeline obj's underlying member method code with example usage: obj.generate_outputs(inputs, num_tokens, do_sample) and returns: outputs