Once-For-All (OFA) is a one-shot Neural Architecture Search (NAS) method that trains a single, over-parameterized supernet encompassing a vast design space of depths, widths, and kernel sizes. The key innovation is progressive shrinking, where the supernet is first trained at its largest size, then fine-tuned to support smaller, efficient sub-networks. This allows the evaluation of billions of candidate architectures via weight sharing without the computational cost of training each one from scratch.
Glossary
Once-For-All (OFA)

What is Once-For-All (OFA)?
Once-For-All (OFA) is a one-shot neural architecture search and training paradigm that produces a single, large supernet from which many efficient, hardware-tailored sub-networks can be extracted without retraining.
The primary objective of OFA is hardware-aware deployment. After the supernet is trained, a search algorithm can rapidly extract a specialized sub-network optimized for specific hardware constraints like latency, memory, or energy consumption on a target microcontroller. This decouples training from search, enabling the production of a diverse Pareto frontier of models—from high-accuracy to ultra-efficient—all from a single training run, making it foundational for TinyML and edge AI systems.
Key Features of Once-For-All
Once-For-All (OFA) is a one-shot neural architecture search and training paradigm that decouples model training from architecture search. It trains a single, large supernet from which many efficient, hardware-tailored sub-networks can be extracted without retraining.
The Supernet Architecture
The core of OFA is a single, over-parameterized supernet that subsumes a vast search space of potential sub-networks (subnets). This search space is defined along multiple dimensions:
- Depth: Number of layers/blocks.
- Width: Number of channels per layer.
- Kernel Size: Choice of convolution kernel (e.g., 3x3, 5x5, 7x7).
- Expand Ratios: Width multipliers within mobile inverted bottleneck blocks. All sub-networks share the supernet's weights, enabling their performance to be estimated without individual training.
Progressive Shrinking Training
OFA employs a novel training algorithm called Progressive Shrinking to prevent the catastrophic interference that occurs when training a supernet with vastly different subnets. The training proceeds in stages:
- Train the largest possible subnet (full supernet) to convergence.
- Fine-tune this network to support smaller subnets by progressively adding smaller depth, width, and kernel size options.
- Each stage inherits knowledge from the previous, larger stage, ensuring all subnets achieve high accuracy. This method is far more efficient than training each architecture from scratch.
Hardware-Aware Subnet Extraction
After the supernet is trained, the search for an optimal subnet is a zero-cost process. Given a target hardware platform (e.g., a specific microcontroller) and constraints (latency, memory), the search involves:
- Using a pre-characterized hardware cost model (e.g., a latency lookup table) to estimate the performance of any subnet.
- Applying an evolutionary search or other optimization algorithm to find the subnet that maximizes accuracy while satisfying the hardware constraints. No further training or fine-tuning is required; the subnet's weights are directly inherited from the supernet.
Decoupled Training & Search
OFA's fundamental innovation is the complete decoupling of the training and search phases.
- Training Phase (Once): The supernet is trained via Progressive Shrinking. This is computationally expensive but done only once.
- Search Phase (For All): For each new hardware target or constraint, an efficient search finds the best subnet. This phase is fast and requires no backpropagation or GPU time. This paradigm enables rapid customization for diverse edge devices from a single trained model, eliminating the need for per-device retraining.
Support for Extreme Constraints
OFA is particularly effective for TinyML and microcontroller deployment, where constraints are severe. It can discover subnets optimized for:
- Kilobyte-scale memory footprints (e.g., < 500KB RAM/Flash).
- Milliwatt-level power budgets and strict latency limits.
- Diverse hardware backends (CPU, GPU, NPU, MCU). By searching within the trained supernet, it finds architectures that manually designed models or standard NAS might miss, pushing the Pareto frontier of accuracy vs. efficiency for embedded systems.
Comparison to Traditional NAS
OFA addresses key limitations of earlier Neural Architecture Search methods:
- vs. Reinforcement Learning (RL) NAS: OFA replaces the expensive process of training thousands of candidate models from scratch with a single supernet training run.
- vs. Differentiable NAS (e.g., DARTS): OFA provides a more stable training process (Progressive Shrinking) and delivers a standalone, deployable model for each constraint, not just a cell structure.
- General Efficiency: The 'train once, search for many' approach makes OFA highly scalable for production environments supporting a heterogeneous fleet of edge devices.
How Does Once-For-All (OFA) Work?
Once-For-All (OFA) is a one-shot neural architecture search and training paradigm designed for efficient deployment across diverse hardware platforms.
Once-For-All (OFA) is a one-shot neural architecture search (NAS) method that trains a single, large supernet encompassing many possible sub-networks. The supernet is trained just once using progressive shrinking, which sequentially introduces architectural constraints like depth, width, and kernel size. This process enables the supernet's shared weights to become proficient for a vast array of smaller, efficient architectures without requiring retraining for each one.
After training, a hardware-aware search is performed to extract the optimal sub-network for a specific target device. Given hardware constraints like latency or memory, an evolutionary algorithm evaluates candidate sub-networks by directly profiling them on the device or using a predictive cost model. The selected sub-network inherits the pre-trained weights from the supernet and is deployment-ready, eliminating the need for costly per-platform retraining and enabling efficient model specialization for microcontrollers and edge devices.
Applications and Use Cases
Once-For-All (OFA) is a one-shot NAS and training paradigm that produces a single, large supernet from which many efficient, hardware-tailored sub-networks can be extracted without retraining. Its primary value lies in enabling rapid deployment of optimized models across diverse, resource-constrained environments.
Edge AI & TinyML Deployment
OFA is a cornerstone for deploying machine learning on microcontrollers and other edge devices. By training a single supernet, developers can extract sub-networks that precisely match the memory, latency, and power constraints of a target MCU (e.g., ARM Cortex-M series). This eliminates the need to design and train a unique model for every hardware variant in a product line.
- Key Benefit: A single OFA supernet can service an entire product family, from a high-end gateway to a low-power sensor node.
- Example: Extracting a 50KB model for a battery-powered environmental sensor and a 200KB model for a smart camera from the same supernet.
Hardware-Aware Model Scaling
The OFA paradigm directly addresses the challenge of heterogeneous hardware ecosystems. The supernet is designed with scalable dimensions—depth (number of layers), width (number of channels), and kernel size—allowing for dynamic adaptation.
- Dynamic Adaptation: For a given hardware platform, a search algorithm (or a simple lookup) selects the optimal sub-network configuration (depth, width, kernel size) that maximizes accuracy within the hardware's latency or memory budget.
- Use Case: A smartphone app can deploy a larger, more accurate sub-network when the device is plugged in and switch to a tiny, efficient sub-network when on battery power, all from the same supernet.
Mass Production & Fleet Management
OFA provides a scalable framework for managing machine learning models across massive IoT fleets. Instead of storing and deploying thousands of individually trained models, a single supernet weight file is distributed. Each device then runs a lightweight sub-network extraction process based on its unique hardware fingerprint or performance requirements.
- Operational Efficiency: Dramatically simplifies model versioning, updates, and rollbacks. Updating the central supernet can improve performance for all derived sub-networks.
- Example: A manufacturer of industrial vibration sensors can deploy one OFA supernet to all units globally. Units with more powerful processors automatically extract a more complex model for finer anomaly detection.
Neural Architecture Search Acceleration
OFA is a foundational technique for One-Shot NAS. By training the supernet once, it creates a performance estimation network that allows for the rapid evaluation of millions of candidate architectures without any further training.
- Search Process: After supernet training, a search algorithm (e.g., evolutionary search) samples sub-networks. Their accuracy is estimated via weight sharing, and their latency is predicted using a hardware cost model.
- Result: Finding a Pareto-optimal model for a new hardware target takes orders of magnitude less time and compute than training-based NAS methods.
Research & Benchmarking Platform
The OFA supernet serves as a standardized benchmarking and research vehicle for the hardware-aware NAS community. It allows researchers to fairly compare new search algorithms, pruning techniques, or quantization methods on a consistent, pre-trained foundation.
- Consistent Baseline: New search strategies or performance estimators can be evaluated by how well they find high-performing sub-networks within the OFA search space.
- Facilitates Innovation: Researchers can focus on improving the search or extraction process without the prohibitive cost of supernet training.
Enabling On-Device Personalization
While the core OFA training is done in the cloud, the paradigm supports downstream federated learning or few-shot adaptation on devices. The lightweight sub-networks extracted from the supernet can serve as excellent starting points for further personalization using local user data.
- Privacy & Efficiency: A base sub-network is extracted for the device's hardware. This model can then be fine-tuned locally via federated averaging or a few gradient steps, adapting to local patterns without exposing raw data.
- Example: A keyword spotting model on smart home devices could start from a generic OFA sub-network and then personalize to a specific user's accent and vocabulary on-device.
Frequently Asked Questions
Once-For-All (OFA) is a foundational one-shot Neural Architecture Search (NAS) and training paradigm designed for efficient model deployment across diverse hardware. This FAQ addresses its core mechanisms, advantages, and role in TinyML and hardware-aware optimization.
Once-For-All (OFA) is a one-shot Neural Architecture Search (NAS) and training paradigm that trains a single, large, over-parameterized supernet from which numerous efficient, hardware-tailored sub-networks can be extracted without any retraining. It works by first defining a flexible search space encompassing variations in depth, width, and kernel size. During a progressive training phase, the supernet learns shared weights for all possible sub-architectures within this space. After training, a specialized search algorithm—considering target hardware constraints like latency or memory—evaluates and selects the optimal sub-network by directly sampling from the supernet using weight sharing, eliminating the need for costly individual model training.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Once-For-All (OFA) is a foundational technique within hardware-aware NAS. These related concepts define the search strategies, constraints, and evaluation methods that enable the automated discovery of efficient neural networks for microcontrollers.
One-Shot NAS
One-Shot NAS is the overarching family of methods to which OFA belongs. It trains a single, over-parameterized supernet one time. The key innovation is weight sharing, where all possible sub-networks (child models) inherit their parameters from this supernet. This allows for the evaluation of thousands of architectures by simply sampling different paths through the supernet, eliminating the need for costly individual training from scratch. OFA is a specific, highly scalable implementation of the one-shot paradigm.
Supernet
A supernet is the central construct in One-Shot NAS and OFA. It is a large, directed acyclic graph that encapsulates the entire search space. Each node represents a layer, and edges represent possible operations (e.g., 3x3 conv, 5x5 conv, skip connection). During supernet training, all paths are optimized simultaneously. For inference, a sub-network is extracted by selecting a single path. The quality of the supernet's training and its weight-sharing scheme directly determines the accuracy of the extracted sub-networks.
Hardware-Aware Neural Architecture Search
Hardware-Aware NAS extends traditional NAS by incorporating deployment constraints directly into the search objective. Instead of just maximizing accuracy, it optimizes for metrics like:
- Latency (inference time on target MCU)
- Peak Memory Usage (RAM/Flash)
- Energy Consumption (microjoules per inference) OFA is a hardware-aware method because its search space includes dimensions for depth, width, and kernel size, allowing it to extract sub-networks that meet specific hardware budgets without retraining.
Search Space
In NAS, the search space defines the universe of all possible architectures the algorithm can discover. OFA's search space is particularly flexible, defined along three axes:
- Depth: The number of layers in the network.
- Width: The number of channels (neurons) in each layer.
- Kernel Size: The spatial dimensions of convolutional filters (e.g., 3, 5, 7). The supernet is constructed to contain all valid combinations. A good search space balances expressiveness (ability to find high-performing models) with size (to make search tractable).
Multi-Objective Optimization
Designing for microcontrollers is inherently a multi-objective optimization problem. Engineers must balance:
- Model Accuracy (primary task performance)
- Inference Latency (real-time operation)
- Memory Footprint (fitting within KB of RAM/Flash)
- Energy Efficiency (battery life) OFA addresses this by constructing a Pareto frontier of models—a set of optimal trade-off solutions where improving one metric worsens another. The search process in OFA can be guided to find sub-networks at different points on this frontier.
Performance Estimator
A performance estimator is any method used to predict the final accuracy or hardware cost of a candidate architecture without full training. In OFA, the supernet itself acts as a highly efficient performance estimator via weight sharing. For hardware metrics, OFA often employs a hardware cost model—a small, pre-built lookup table or neural network that predicts latency, memory, or energy for a given sub-network configuration on the target device. This allows for rapid evaluation of thousands of candidates during the search phase.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us