Image Classification
Transformers
Safetensors
softmasked_selective_vit
vision-transformer
efficient-transformer
selective-attention
knowledge-distillation
computer-vision
custom_code
Instructions to use XAFT/SM-Selective-ViT-Base-224-Distilled with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XAFT/SM-Selective-ViT-Base-224-Distilled with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="XAFT/SM-Selective-ViT-Base-224-Distilled", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("XAFT/SM-Selective-ViT-Base-224-Distilled", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from XAFT/SM-Selective-ViT-Base-224-Distilled: direct link, hf CLI and curl.
- Browser
- Download file 720 Bytes
-
https://huggingface.co/XAFT/SM-Selective-ViT-Base-224-Distilled/resolve/ddcb7ea806ccdd94e9715dad1fc503d2c5797f3c/config.json
- Command line
-
hf download hf://XAFT/SM-Selective-ViT-Base-224-Distilled@ddcb7ea806ccdd94e9715dad1fc503d2c5797f3c/config.json
-
curl -L -o config.json https://huggingface.co/XAFT/SM-Selective-ViT-Base-224-Distilled/resolve/ddcb7ea806ccdd94e9715dad1fc503d2c5797f3c/config.json
720 Bytes
| { | |
| "architectures": [ | |
| "SMSelectiveViTModelForClassification" | |
| ], | |
| "atten_dim": 768, | |
| "attention_scale": 8.0, | |
| "auto_map": { | |
| "AutoConfig": "configuration_selectivevit.SMSelectiveViTConfig", | |
| "AutoModelForImageClassification": "modeling_selectivevit.SMSelectiveViTModelForClassification" | |
| }, | |
| "channels": 3, | |
| "depth": 12, | |
| "drop_path": 0.2, | |
| "dropout": 0.0, | |
| "dtype": "float32", | |
| "embed_dim": 768, | |
| "ffn_groups": null, | |
| "image_size": 224, | |
| "mask_threshold": 0.05, | |
| "mlp_dim": 3072, | |
| "model_type": "softmasked_selective_vit", | |
| "num_classes": 1000, | |
| "num_groups": 12, | |
| "num_heads": 12, | |
| "patch_drop": 0.05, | |
| "patch_size": 16, | |
| "transformers_version": "4.57.3", | |
| "use_distil_token": true | |
| } | |