Skip to content
AI360Xpert
Beta

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.

Elastic training once gives instant subnets for any phone budget
Elastic training once gives instant subnets for any phone budget

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 88M, then progressively shrink to 66M and 44M with distillation from max. Support elastic depth 22-44, width 33-66, kernels 33-77. Build latency tables per phone, search subnets by predictor with no training.

Worked example

Max 8.08.0M at 8080 percent. Sub 6.06.0M keeps 79.279.2 percent (0.80.8 drop for 2525 percent fewer weights: (8−6)/8=0.25(8-6)/8 = 0.25). Sub 4.04.0M keeps 7777 percent (33 drop for half weights). Lookup picks 66M for 1515 ms budgets and 44M for 1010 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 88M to 66M loses 0.80.8 points for 2525 percent fewer weights.
  • Latency tables pick subnets in seconds with no retrain.
  • Keep max to small order or tiny nets stall.