apple / mobilevit-small

huggingface.co
Total runs: 8.1K
24-hour runs: -213
7-day runs: -393
30-day runs: -1.1M
Model's Last Updated: February 25 2025
image-classification

Introduction of mobilevit-small

Model Details of mobilevit-small

MobileViT (small-sized model)

MobileViT model pre-trained on ImageNet-1k at resolution 256x256. It was introduced in MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer by Sachin Mehta and Mohammad Rastegari, and first released in this repository . The license used is Apple sample code license .

Disclaimer: The team releasing MobileViT did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

MobileViT is a light-weight, low latency convolutional neural network that combines MobileNetV2-style layers with a new block that replaces local processing in convolutions with global processing using transformers. As with ViT (Vision Transformer), the image data is converted into flattened patches before it is processed by the transformer layers. Afterwards, the patches are "unflattened" back into feature maps. This allows the MobileViT-block to be placed anywhere inside a CNN. MobileViT does not require any positional embeddings.

Intended uses & limitations

You can use the raw model for image classification. See the model hub to look for fine-tuned versions on a task that interests you.

How to use

Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:

from transformers import MobileViTFeatureExtractor, MobileViTForImageClassification
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

feature_extractor = MobileViTFeatureExtractor.from_pretrained("apple/mobilevit-small")
model = MobileViTForImageClassification.from_pretrained("apple/mobilevit-small")

inputs = feature_extractor(images=image, return_tensors="pt")

outputs = model(**inputs)
logits = outputs.logits

# model predicts one of the 1000 ImageNet classes
predicted_class_idx = logits.argmax(-1).item()
print("Predicted class:", model.config.id2label[predicted_class_idx])

Currently, both the feature extractor and model support PyTorch.

Training data

The MobileViT model was pretrained on ImageNet-1k , a dataset consisting of 1 million images and 1,000 classes.

Training procedure
Preprocessing

Training requires only basic data augmentation, i.e. random resized cropping and horizontal flipping.

To learn multi-scale representations without requiring fine-tuning, a multi-scale sampler was used during training, with image sizes randomly sampled from: (160, 160), (192, 192), (256, 256), (288, 288), (320, 320).

At inference time, images are resized/rescaled to the same resolution (288x288), and center-cropped at 256x256.

Pixels are normalized to the range [0, 1]. Images are expected to be in BGR pixel order, not RGB.

Pretraining

The MobileViT networks are trained from scratch for 300 epochs on ImageNet-1k on 8 NVIDIA GPUs with an effective batch size of 1024 and learning rate warmup for 3k steps, followed by cosine annealing. Also used were label smoothing cross-entropy loss and L2 weight decay. Training resolution varies from 160x160 to 320x320, using multi-scale sampling.

Evaluation results
Model ImageNet top-1 accuracy ImageNet top-5 accuracy # params URL
MobileViT-XXS 69.0 88.9 1.3 M https://huggingface.co/apple/mobilevit-xx-small
MobileViT-XS 74.8 92.3 2.3 M https://huggingface.co/apple/mobilevit-x-small
MobileViT-S 78.4 94.1 5.6 M https://huggingface.co/apple/mobilevit-small
BibTeX entry and citation info
@inproceedings{vision-transformer,
title = {MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer},
author = {Sachin Mehta and Mohammad Rastegari},
year = {2022},
URL = {https://arxiv.org/abs/2110.02178}
}

Runs of apple mobilevit-small on huggingface.co

8.1K
Total runs
-213
24-hour runs
-526
3-day runs
-393
7-day runs
-1.1M
30-day runs

More Information About mobilevit-small huggingface.co Model

More mobilevit-small license Visit here:

https://choosealicense.com/licenses/other

mobilevit-small huggingface.co

mobilevit-small huggingface.co is an AI model on huggingface.co that provides mobilevit-small's model effect (), which can be used instantly with this apple mobilevit-small model. huggingface.co supports a free trial of the mobilevit-small model, and also provides paid use of the mobilevit-small. Support call mobilevit-small model through api, including Node.js, Python, http.

mobilevit-small huggingface.co Url

https://huggingface.co/apple/mobilevit-small

apple mobilevit-small online free

mobilevit-small huggingface.co is an online trial and call api platform, which integrates mobilevit-small's modeling effects, including api services, and provides a free online trial of mobilevit-small, you can try mobilevit-small online for free by clicking the link below.

apple mobilevit-small online free url in huggingface.co:

https://huggingface.co/apple/mobilevit-small

mobilevit-small install

mobilevit-small is an open source model from GitHub that offers a free installation service, and any user can find mobilevit-small on GitHub to install. At the same time, huggingface.co provides the effect of mobilevit-small install, users can directly use mobilevit-small installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mobilevit-small install url in huggingface.co:

https://huggingface.co/apple/mobilevit-small

Url of mobilevit-small

mobilevit-small huggingface.co Url

Provider of mobilevit-small huggingface.co

apple
ORGANIZATIONS

Other API from apple

huggingface.co

Total runs: 29.5K
Run Growth: 9.2K
Growth Rate: 31.39%
Updated:March 01 2025
huggingface.co

Total runs: 20.3K
Run Growth: 15.4K
Growth Rate: 76.01%
Updated:September 03 2025
huggingface.co

Total runs: 10.0K
Run Growth: 4.8K
Growth Rate: 48.62%
Updated:March 01 2025
huggingface.co

Total runs: 6.9K
Run Growth: 6.7K
Growth Rate: 97.00%
Updated:July 26 2024
huggingface.co

Total runs: 3.5K
Run Growth: -2.3K
Growth Rate: -66.67%
Updated:March 01 2025
huggingface.co

Total runs: 3.3K
Run Growth: -3.4K
Growth Rate: -101.84%
Updated:December 19 2025
huggingface.co

Total runs: 2.0K
Run Growth: -755
Growth Rate: -38.50%
Updated:September 03 2025
huggingface.co

Total runs: 1.8K
Run Growth: 266
Growth Rate: 14.60%
Updated:September 03 2025
huggingface.co

Total runs: 1.6K
Run Growth: 870
Growth Rate: 53.08%
Updated:March 01 2025
huggingface.co

Total runs: 307
Run Growth: 87
Growth Rate: 28.34%
Updated:March 01 2025
huggingface.co

Total runs: 273
Run Growth: 209
Growth Rate: 76.56%
Updated:April 25 2026
huggingface.co

Total runs: 267
Run Growth: -5
Growth Rate: -1.87%
Updated:March 01 2025
huggingface.co

Total runs: 188
Run Growth: 63
Growth Rate: 33.51%
Updated:October 10 2025
huggingface.co

Total runs: 162
Run Growth: -763
Growth Rate: -470.99%
Updated:June 14 2024
huggingface.co

Total runs: 133
Run Growth: 12
Growth Rate: 9.02%
Updated:September 03 2025
huggingface.co

Total runs: 107
Run Growth: -15
Growth Rate: -14.02%
Updated:October 10 2025
huggingface.co

Total runs: 83
Run Growth: -55
Growth Rate: -66.27%
Updated:September 03 2025
huggingface.co

Total runs: 73
Run Growth: -58
Growth Rate: -79.45%
Updated:March 01 2025
huggingface.co

Total runs: 70
Run Growth: 65
Growth Rate: 92.86%
Updated:April 15 2026
huggingface.co

Total runs: 65
Run Growth: 51
Growth Rate: 78.46%
Updated:March 01 2025
huggingface.co

Total runs: 63
Run Growth: 28
Growth Rate: 44.44%
Updated:March 01 2025
huggingface.co

Total runs: 57
Run Growth: 51
Growth Rate: 89.47%
Updated:March 01 2025
huggingface.co

Total runs: 55
Run Growth: -32
Growth Rate: -58.18%
Updated:August 02 2024
huggingface.co

Total runs: 45
Run Growth: -6
Growth Rate: -13.33%
Updated:April 15 2026
huggingface.co

Total runs: 37
Run Growth: 7
Growth Rate: 18.92%
Updated:October 10 2025
huggingface.co

Total runs: 34
Run Growth: 27
Growth Rate: 79.41%
Updated:March 01 2025
huggingface.co

Total runs: 31
Run Growth: 24
Growth Rate: 77.42%
Updated:March 01 2025