class_docstr: Config options for a T5 generation model.
code: def init_spec(cls) -> lit_types.Spec:
      return {
          "inference_batch_size": lit_types.Integer(
              default=4, min_val=1, max_val=16, required=False
          ),
          "beam_size": lit_types.Integer(
              default=4, min_val=1, max_val=32, required=False
          ),
          "max_gen_length": lit_types.Integer(
              default=50, min_val=1, max_val=100, required=False
          ),
          "num_to_generate": lit_types.Integer(
              default=1, min_val=1, max_val=10, required=False
          ),
          "token_top_k": lit_types.Integer(
              default=10, min_val=1, max_val=25, required=False
          ),
          "output_attention": lit_types.Boolean(
              default=False, required=False
          ),
      }
  
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 1 for calling the T5ModelConfig obj's underlying member method code with example usage: obj.init_spec(cls) and returns: dict