docstr: Whether to include special tokens in encoded text. This should be
  determined by whether or not the model was trained with special tokens.
  TODO: Remove these conditionals once HuggingFace supports a way to
  check whether or not an arbitrary model was trained with special tokens.
docstr_tok: ["Whether","to","include","special","tokens","in","encoded","text",".","This","should","be","determined","by","whether","or","not","the","model","was","trained","with","special","tokens",".","TODO",":","Remove","these","conditionals","once","HuggingFace","supports","a","way","to","check","whether","or","not","an","arbitrary","model","was","trained","with","special","tokens","."]
code: def add_special_tokens(self) -> bool:
      """Whether to include special tokens in encoded text. This should be
      determined by whether or not the model was trained with special tokens.
      TODO: Remove these conditionals once HuggingFace supports a way to
      check whether or not an arbitrary model was trained with special tokens.
      """
      if self._add_special_tokens is not None:
          return self._add_special_tokens
      elif self.AUTO_MODEL_CLASS is transformers.AutoModelForCausalLM:
          return False
      elif self.AUTO_MODEL_CLASS is transformers.AutoModelForSeq2SeqLM:
          return True
      else:
          raise ValueError(
              "Could not determine `add_special_tokens` value from the model "
              "class. Set to `True` or `False` depending on whether the model "
              "was pre-trained with special tokens."
          )
  
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 5 for calling the HuggingFaceAutoLM obj's underlying member method code with example usage: obj.add_special_tokens() and returns: self, False, True