File size: 382 Bytes
f09410f 70b393b f09410f 70b393b f09410f 70b393b f09410f 70b393b |
1 2 3 4 5 6 7 8 9 10 11 12 |
import torch
# Check if CUDA (GPU) is available, otherwise use CPU
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Load the checkpoint
lora_path = "./lora_checkpoint.pt" # Path to the checkpoint file
checkpoint = torch.load(lora_path, map_location=device)
# Print the checkpoint keys to inspect the structure
print("Checkpoint keys:", checkpoint.keys())
|