Skip to content

xlm.commands.extract_checkpoint

extract_checkpoint(cfg)

Parameters:

Name Type Description Default
cfg DictConfig

Hydra config cfg.post_training.checkpoint_path: path to existing checkpoint cfg.post_training.apply_ema: whether to apply EMA weights to the model weights when loading from checkpoint. cfg.post_training.model_state_dict_path (optional): path to save model weights. If provided, the model weights will be saved to the local file system. cfg.post_training.repo_id (optional): HuggingFace Hub repository ID. If provided, the model weights will be pushed to the hub. cfg.post_training.commit_message: commit message for HuggingFace Hub cfg.post_training.max_shard_size (optional): when checkpoint_path is an FSDP sharded directory, optional HF shard size (e.g. "5GB") for multi-file .safetensors output; model_state_dict_path must then be a directory.

required

Returns:

Type Description
None

None