class_docstr: Seq2Seq language modeling.
  You can find a set of supported models in the following documentation:
  https://huggingface.co/docs/transformers/main/model_doc/auto#transformers.AutoModelForSeq2SeqLM
class_docstr_tok: ["Seq2Seq","language","modeling",".","You","can","find","a","set","of","supported","models","in","the","following","documentation",":","https",":","\/\/huggingface.co\/docs\/transformers\/main\/model_doc\/auto","#","transformers.AutoModelForSeq2SeqLM"]
docstr: Return the maximum sequence length of the model.
  TODO: Currently only works for relative position encoded Seq2Seq models.
docstr_tok: ["Return","the","maximum","sequence","length","of","the","model",".","TODO",":","Currently","only","works","for","relative","position","encoded","Seq2Seq","models","."]
code: def max_length(self) -> int:
      """Return the maximum sequence length of the model.
      TODO: Currently only works for relative position encoded Seq2Seq models.
      """
      if self._max_length is not None:
          return self._max_length
      return self._DEFAULT_MAX_LENGTH
  
imports: import math
  import torch
  import torch.nn.functional
  import transformers
  import peft
  from pathlib import Path
  from typing import List, Mapping, NewType, Optional, Tuple, Union
  from tqdm import tqdm
  from transformers import BatchEncoding
  from lm_eval import utils
  from lm_eval.base import BaseLM
label_desc: Use image node_id 1 for calling the AutoSeq2SeqLM obj's underlying member method code with example usage: obj.max_length() and returns: self, self