cerebras.modelzoo.common.run_gpt_inference#

GPT Inference script built using the cstorch API

Functions

format_rate

get_all_checkpoints

Return the path to all available checkpoints

get_cluster_config

get_latest_checkpoint

Get the path to the checkpoint with the highest global step

get_model_checkpoint

Get the path to the model checkpoint, if any.

get_parser

inference_input_dataloader

load_from_checkpoint_file

Loads state dict from checkpoint path and checks for version compatibilty.

main

set_attention_params

Set attention-related parameters.

set_defaults

Update any missing parameters in the params dictionary with default values

setup_artifact_dir

Create a unique subdirectory for this run by generating a time stamp so that parallel runs using the same model_dir don't overwrite common files.

setup_logging

Configure default logging format.

setup_logging_excepthook

Setup a logging hook that runs whenever an exception is raised that catches and logs the exception to ensure that the full traceback is printed in the log file.