1013 update

This commit is contained in:
FelixChan
2025-10-13 17:56:36 +08:00
parent d077e3210e
commit d6b68ef90b
17 changed files with 815 additions and 70 deletions

View File

@ -105,6 +105,7 @@ def load_resources(wandb_exp_dir, device):
config = wandb_style_config_to_omega_config(config)
# Load checkpoint to specified device
print("Loading checkpoint from:", ckpt_path)
ckpt = torch.load(ckpt_path, map_location=device)
model, test_set, vocab = prepare_model_and_dataset_from_config(config, metadata_path, vocab_path)
model.load_state_dict(ckpt['model'], strict=False)