docstr: Loads a model from disk.
  
  Parameters
  ----------
  path
      Path to the checkpoint.
docstr_tok: ["Loads","a","model","from","disk",".","Parameters","--","--","--","--","--","path","Path","to","the","checkpoint","."]
code: def from_disk(self, path: Union[str, Path]):
      """
      Loads a model from disk.
  
      Parameters
      ----------
      path
          Path to the checkpoint.
      """
      # set model (for performance reasons the `call` method is wrapped in tf.function)
      self.model = TFAutoModelForMaskedLM.from_pretrained(
          path, local_files_only=True
      )
  
      self.caller = tf.function(
          self.model.call, experimental_relax_shapes=True
      )
  
      # set tokenizer
      self.tokenizer = AutoTokenizer.from_pretrained(
          path, local_files_only=True
      )
  
imports: import abc
  import numpy
  from pathlib import Path
  from typing import Any, Callable, List, Optional, Tuple, Union
  import tensorflow
  import transformers
  from transformers import TFAutoModelForMaskedLM, AutoTokenizer
label_desc: Use image node_id 2 for calling the LanguageModel obj's underlying member method code with example usage: obj.from_disk(path) without return types