MobileNetV4
MobileNetV4 (Qin et al. 2024): a classifier built on universal inverted bottlenecks.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
mobilenetv4_conv_medium.e500_r256_in1k | synthetic (224x224) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 5.78 7.77 3.91 0.641 2.48 0.345 | 81 / 94 90 / 106 54 / 86 87 / 124 87 / 102 36 (engine) |
Details
- Original code: https://github.com/huggingface/pytorch-image-models at
0df212b369a5 - Code licence: Apache-2.0 (permissive); files:
- Weights licence: Apache-2.0
- Licence evidence: https://huggingface.co/timm/mobilenetv4_conv_medium.e500_r256_in1k/blob/ad66898c045c1b5223ea3f2c0830b74cf2e75bac/README.md
- Training data: ImageNet-1k (ILSVRC 2012 classification)
- Kernel libraries:
cudnn_hacc,fvm_conv,fvm_extra,fvm_mb,fvm_r3 - Variants:
mobilenetv4_conv_medium.e500_r256_in1k(default ofmobilenetv4_conv_medium) - Outputs: logits; label_set:
imagenet-1k - Input size: fixed 256x256: the input is resized (short side 269) and centre-cropped to it
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
mobilenetv4_conv_medium.e500_r256_in1k256x256 (0.1 GiB peak allocated, 0.1 reserved) mobilenetv4_conv_medium.e500_r256_in1k224x224, first call: portable + torch.compile 7 s (cold Inductor cache), TensorRT fp16 20 s (ONNX + engine).mobilenetv4_conv_medium.e500_r256_in1koriginal 224x224: torch.autocast(fp16) around the forwardmobilenetv4_conv_medium.e500_r256_in1kload / first call: original 1.56 s / 2.286 s, portable 0.36 s / 0.035 s, kernels 1.89 s / 0.051 s- Protocol, median of 9 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls
Measured
fastforks: the model's own resize / crop on the GPU; original: the library's pretrained loader and its PIL eval transform. Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | kernels | note |
|---|---|---|---|---|---|---|
mobilenetv4_conv_medium.e500_r256_in1k | ImageNet-1k val, 5000 random images, top-1 / top-5 % | 80.80 / 95.36 | 80.80 / 95.32 | 80.86 / 95.38 | 80.84 / 95.38 |
Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.
Parity
CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.02 and p99 <= 0.08 (absolute error of the output logits).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
mobilenetv4_conv_medium.e500_r256_in1k | 0.00653 / 0.02131 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120 |