File size: 232 Bytes
a731a91
 
 
 
 
1
2
3
4
5
6
#!/usr/bin/env python3
import torch
# weights_only=False required for full pickle support
ckpt = torch.load("pytorch_model.bin", weights_only=False, map_location="cpu")
print(f"Model loaded: {len(ckpt['model_state_dict'])} layers")