Introduction
The field of Artificial Intelligence is currently transitioning from "specialist" models—designed for single tasks like image classification or text translation—toward "generalist" models capable of handling dozens of tasks across diverse modalities. However, building these generalists presents a significant engineering challenge. Researchers must manually manage complex relationships between disparate data types, neural architectures, and training objectives. OFASys (One-For-All System) is a comprehensive framework designed to break this "complexity wall" by providing a unified, declarative interface for multi-modal multi-task learning.
The Multi-Modal Instruction Interface
The core innovation of OFASys is its Multi-Modal Instruction interface. Instead of writing custom data-loading and processing pipelines for every new task, users define tasks using a single line of declarative code. For example, a captioning task can be defined as:
[IMAGE:img] what does the image describe? -> [TEXT:cap]
This approach decouples task definitions from model implementation, allowing researchers to experiment with new architectures without rewriting task-specific logic.
System Architecture
OFASys employs a modular architecture to handle the complexities of multi-modal data:
- Instruction Parser & Dispatcher: This component parses the declarative instruction and routes data to the appropriate modality-specific components.
- Modality-Specific Adapters: These "slots" convert raw data—such as pixels, audio waves, or bounding boxes—into a unified sequence of embeddings. This ensures the model's internal "brain" receives a consistent format regardless of input type.
- Universal Model: The system defaults to a Transformer-based encoder-decoder. It also supports a Mixture-of-Experts (MoE) version, which allows the model to scale its capacity efficiently by using specialized pathways within a shared backbone.
- Multi-Task Engine: A sophisticated scheduler manages batching and optimization across wildly different workloads, such as text-to-SQL and video classification.
Demonstrating Versatility: The OFA+ Model
To demonstrate the system's power, the authors trained OFA+, a generalist model spanning 7 modalities and 23 tasks. The training involved diverse datasets, including LibriSpeech for audio and Kinetics400 for video.
Key Results and Efficiency
The OFA+ (Generalist MoE) model achieved remarkable efficiency and performance:
- High Performance: It reached 95% of the average performance of 15 specialized models.
- Parameter Efficiency: It achieved this while using only 16% of the total parameters required by those 15 specialists combined.
- Zero-Shot Capability: Because the model is trained on instructions, it can perform inference on unseen tasks simply by receiving a new instruction string at test time.
Conclusion and Future Work
OFASys successfully simplifies the development of generalist models by treating every task as a simple instruction. While currently optimized for Transformer-based architectures, future work aims to integrate other structures like U-Nets and refine the multi-task scheduling "recipe" for even larger sets of diverse tasks. The system reinforces the idea that almost any data—from human joint rotations to bounding boxes—can be tokenized and processed by a universal Transformer backbone.
Summary updated