MobileViT Folds Transformers Into Mobiles
MobileViT unfolds maps to tokens for light transformers then folds back, giving global range inside mobile conv blocks.
Why Does This Exist?
MobileNet lacks range and ViT lacks lightness. Phones need both in M weights.
MobileViT nests transformers in convs. It extends mobilenet inverted blocks, fits efficient architectures, and lifts image classification mobiles.
Think of It Like This
Folding laundry to check all pockets at once
You unfold stacked shirts into a row to check pockets globally, then refold to stacks. Local folds keep shape while the row check adds context.
Unfold is the row, transformers are checks. Where it stops: huge piles overwhelm rows, just as large maps strain mobile attention.
How It Actually Works
Conv then to . Unfold into patches per group with groups. Run -layer transformers per group, fold back, fuse with input via plus .
Worked example
with patches gives groups? MobileViT-S uses () and . Attention per group pairs times versus full M, about times cheaper. Accuracy to percent at GFLOPs.
Watch Out For
Unfolding too large maps on phones
maps explode groups and memory. Symptom: phone OOM despite low FLOPs. Fix: apply MobileViT blocks at and below as in the paper.
The Quick Version
- MobileViT unfolds to tokens, transformers lightly, then folds back.
- Per-group attention keeps global sense at mobile cost.
- Fixture K pairs replace M, 784 times cheaper.
- Gains to percent at GFLOPs.
- Place blocks at 28 maps and below on phones.