docstr: Saves a model to disk.
  
  Parameters
  ----------
  path
      Path to the checkpoint.
docstr_tok: ["Saves","a","model","to","disk",".","Parameters","--","--","--","--","--","path","Path","to","the","checkpoint","."]
code: def to_disk(self, path: Union[str, Path]):
      """
      Saves a model to disk.
  
      Parameters
      ----------
      path
          Path to the checkpoint.
      """
      # save model if set
      if self.model:
          self.model.save_pretrained(path)
  
      # save tokenizer if set
      if self.tokenizer:
          self.tokenizer.save_pretrained(path)
  
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 3 for calling the LanguageModel obj's underlying member method code with example usage: obj.to_disk(path) without return types