code: def _build_ppl_model(
      self, model_id: str
  ) -> Tuple[PreTrainedModel, PreTrainedTokenizer]:
      tokenizer = AutoTokenizer.from_pretrained(
          model_id, add_prefix_space=True
      )
      if tokenizer.pad_token is None:
          # GPT2 doesn't have a pad token. This hack allows for padding a batch of tensors,
          # and the attention mask will exclude the pad tokens from the loss.
          tokenizer.pad_token = tokenizer.eos_token
      model = (
          AutoModelForCausalLM.from_pretrained(model_id)
          .eval()
          .to(self.device)
      )
      return model, tokenizer
  
imports: from collections import defaultdict
  import itertools
  import math
  import numpy
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  import torch
  from torch import nn
  from tqdm import tqdm
  from projects.roscoe.utils import cosine_similarity_scaled, embedding_alignment, al_mean
label_desc: Use image node_id 7 for calling the Evaluator obj's underlying member method code with example usage: obj._build_ppl_model(model_id) and returns: model,  tokenizer