code: def run_eval_harness(
      model: nn.Module,
      name: str,
      eval_tasks: List[str],
      device: torch.device,
      batch_size: int = 8,
  ):
      """
      ## Run evaluation harness with a given model
      """
  
      # Load the tokenizer
      with monit.section("Load tokenizer"):
          tokenizer = get_tokenizer()
  
      # All tasks if nothing is specified
      if not eval_tasks:
          eval_tasks = [
              "anli_r1",
              "anli_r2",
              "anli_r3",
              "hellaswag",
              "lambada",
              "piqa",
              "winogrande",
              "wsc",
              "mathqa",
          ]
  
      # Create the adapter
      adapter = NoeXEvalHarnessAdapter(
          model, tokenizer, 50_432, batch_size, device
      )
  
      # Run
      return adapter.run_eval(name, eval_tasks)
  
imports: import math
  from typing import List
  import torch
  import torch.nn.functional
  from lm_eval import tasks, evaluator, utils
  from lm_eval.base import BaseLM
  from tokenizers import Tokenizer
  from torch import nn
  from tqdm import tqdm
  from labml import monit
  from labml_nn.neox.tokenizer import get_tokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: run_eval_harness(model, name, eval_tasks, device, batch_size) and returns: adapter