minilm-finetuned / example.py
antarge's picture
Upload example.py with huggingface_hub
a731a91 verified
Raw
History Blame Contribute Delete
232 Bytes
#!/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")