Downloads · 30 days
43
44% of all-time downloads
NCPS/thinkingvit-swin-s-imagenet1k
thinkingvit-swin-s-imagenet1k is a image classification model from NCPS. Use it when you need a label for an image. It is set up for timm. The card lists the license as mit.
This repository contains the ImageNet-1K EMA weights for ThinkingViT-Swin / Swin-S ImageNet-1K from ThinkingViT: Matryoshka Thinking Vision Transformer for Elastic Inference.
Downloads · 30 days
43
44% of all-time downloads
All-time downloads
97
Public
Parameters
49.7M
199 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors199 MB · 100%
From the Hugging Face model README
This repository contains the ImageNet-1K EMA weights for ThinkingViT-Swin / Swin-S ImageNet-1K from ThinkingViT: Matryoshka Thinking Vision Transformer for Elastic Inference.
state_dict_emamodel.safetensorsimport torch
from timm.models import create_model
# Run from the ThinkingViT repository root, or put this repository on PYTHONPATH.
model = create_model("hf-hub:alihjt/thinkingvit-swin-s-imagenet1k", pretrained=True)
model.eval()
x = torch.randn(1, 3, 224, 224)
with torch.no_grad():
logits, stage = model(x, threshold=1.0)
print(logits.shape, stage)
This is a custom timm-based architecture. Use the code from the ThinkingViT repository when loading this model.
The entropy threshold controls early exit. Lower thresholds send more samples to the full Swin-S round; higher thresholds exit after the reduced-head round.
| Threshold | Acc@1 (%) | GMACs |
|---|---|---|
| 0.0 | 83.516 | 11.68 |
| 0.5 | 83.386 | 6.76 |
| 1.0 | 82.124 | 4.88 |
| 1.6 | 79.746 | 3.53 |
| 5.0 | 77.990 | 2.82 |
Please cite the ThinkingViT paper if you use this model: https://arxiv.org/abs/2507.10800