How does torch.hub.load_state_dict_from_url work


I am quite new to Pytorch, and hence this might be a silly question.

I am using Google Colab, and trying to load the pretrained weights of vit_small_patch16_384 from timm module. But I am facing some issues, as its .npz format.

!pip install timm==0.4.12 (timm version I used)

checkpoint = torch.hub.load_state_dict_from_url( ‘’, map_location=‘cpu’, check_hash=True)

I get the following error:

RuntimeError: Expected hasRecord(“version”) to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)

What am I doing wrong?
Can anyone please help me to resolve this.
Thanks in advance