@jordyvl I compared all parameters of the timm and HF models and wrote a program to transfer the model from timm to HF. After that I found HF provided the transfer code -- search "convert_vit_timm_to_pytorch.py". Other models of timm may have similar transfer files.