code: def eval_rnnt():
      # RNN-T
      from extra.models.rnnt import RNNT
  
      mdl = RNNT()
      mdl.load_from_pretrained()
  
      from extra.datasets.librispeech import iterate
      from examples.mlperf.metrics import word_error_rate
  
      LABELS = [
          " ",
          "a",
          "b",
          "c",
          "d",
          "e",
          "f",
          "g",
          "h",
          "i",
          "j",
          "k",
          "l",
          "m",
          "n",
          "o",
          "p",
          "q",
          "r",
          "s",
          "t",
          "u",
          "v",
          "w",
          "x",
          "y",
          "z",
          "'",
      ]
  
      c = 0
      scores = 0
      words = 0
      st = time.perf_counter()
      for X, Y in iterate():
          mt = time.perf_counter()
          tt = mdl.decode(Tensor(X[0]), Tensor([X[1]]))
          et = time.perf_counter()
          print(
              f"{(mt-st)*1000:.2f} ms loading data, {(et-mt)*1000:.2f} ms to run model"
          )
          for n, t in enumerate(tt):
              tnp = np.array(t)
              _, scores_, words_ = word_error_rate(
                  [
                      "".join(
                          [
                              LABELS[int(tnp[i])]
                              for i in range(tnp.shape[0])
                          ]
                      )
                  ],
                  [Y[n]],
              )
              scores += scores_
              words += words_
          c += len(tt)
          print(
              f"WER: {scores/words}, {words} words, raw scores: {scores}, c: {c}"
          )
          st = time.perf_counter()
  
file_path: tinygrad/examples/mlperf/model_eval.py
imports: import time
  from pathlib import Path
  import numpy
  from tinygrad import Tensor, Device, dtypes, GlobalCounters
  from tinygrad.jit import TinyJit
  from tinygrad.nn.state import get_parameters, load_state_dict, safe_load
  from tinygrad.helpers import getenv, Timing
  from examples.mlperf import helpers
label_desc: Use image node_id 5 for calling a global function with example usage: eval_rnnt() without return types