Once-for-All Trains One Net for Many
Once-for-All trains a supernet supporting many widths and depths, so phones pick subnets instantly with no retraining.
Why Does This Exist?
Per-phone search repeats training per latency band. Ten phones mean ten searches.
OFA trains once. It follows proxylessnas hardware care, serves efficient architectures, and ships mobilenet class fleets.
Think of It Like This
A master key cut down for many locks
You forge one large key blank, then file copies to fit small locks in seconds without reforging.
Supernet is the blank, subnets are filings. Where it stops: filings cannot exceed blanks, just as subnets cannot beat supernet capacity.
How It Actually Works
Train max net M, then progressively shrink to M and M with distillation from max. Support elastic depth -, width -, kernels -. Build latency tables per phone, search subnets by predictor with no training.
Worked example
Max M at percent. Sub M keeps percent ( drop for percent fewer weights: ). Sub M keeps percent ( drop for half weights). Lookup picks M for ms budgets and M for ms in seconds.
Watch Out For
Sampling small subnets too early in shrinking
Early small samples starve before large stabilizes. Symptom: tiny subnets lag 5 points. Fix: follow max to middle to small progressive order.
The Quick Version
- Once-for-All trains one elastic supernet for many phone budgets.
- Progressive shrinking distills max to middle to small.
- Fixture M to M loses points for percent fewer weights.
- Latency tables pick subnets in seconds with no retrain.
- Keep max to small order or tiny nets stall.