class_docstr: T5 using HuggingFace Transformers and Keras.
  
  This version supports embeddings, attention, and force-decoding of the target
  text, as well as more options to control decoding (such as beam search).
code: def output_spec(self):
      spec = {
          "output_text": lit_types.GeneratedText(parent="target_text"),
          "input_tokens": lit_types.Tokens(parent="input_text"),
          "encoder_final_embedding": lit_types.Embeddings(),
          # If target text is given, the following will also be populated.
          "target_tokens": lit_types.Tokens(parent="target_text"),
          "pred_tokens": lit_types.TokenTopKPreds(
              align="target_tokens"
          ),
      }
      if self.config.num_to_generate > 1:
          spec["output_text"] = lit_types.GeneratedTextCandidates(
              parent="target_text"
          )
  
      if self.config.output_attention:
          # Add attention for each layer.
          for i in range(self.num_layers):
              spec[
                  f"encoder_layer_{i+1:d}_attention"
              ] = lit_types.AttentionHeads(
                  align_in="input_tokens", align_out="input_tokens"
              )
              spec[
                  f"decoder_layer_{i+1:d}_attention"
              ] = lit_types.AttentionHeads(
                  align_in="target_tokens", align_out="target_tokens"
              )
      return spec
  
imports: import re
  import attr
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.examples.models import model_utils
  from lit_nlp.lib import file_cache
  from lit_nlp.lib import utils
  import tensorflow
  import tensorflow_text
  import transformers
  from rouge_score import rouge_scorer
label_desc: Use image node_id 10 for calling the T5HFModel obj's underlying member method code with example usage: obj.output_spec() and returns: spec