Configurable Foundation Models: Building LLMs from a Modular Perspective

Chaojun Xiao, Zhengyan Zhang, Chenyang Song, Dazhi Jiang, Feng Yao, Xu Han, Xiaozhi Wang, Shuo Wang, Yufei Huang, Guanyu Lin, Yingfa Chen, Weilin Zhao, Yuge Tu, Zexuan Zhong, Ao Zhang, Chenglei Si, Moo Khai Hao, Chenyang Zhao, Huimin Chen, Yankai Lin, Zhiyuan Liu, Jingbo Shang, Maosong SunarXiv 2024 · DOI

Introduction

Current Large Language Models (LLMs) are predominantly monolithic—giant, static blocks of parameters that present significant challenges in efficiency, scalability, and evolution. Running a 70-billion-parameter model for simple tasks is computationally wasteful, and deploying such models on edge devices remains nearly impossible. Furthermore, updating these models with new knowledge often requires expensive retraining that risks "catastrophic forgetting."

This paper proposes a paradigm shift toward Configurable Foundation Models. Inspired by the specialized regions of the human brain, this approach decomposes LLMs into modular, functional units called "bricks." By transitioning from a monolithic architecture to a configurable one, researchers can create AI systems that are more efficient, easier to update, and capable of specialized reasoning without massive overhead.

Conceptual Framework: Defining the "Brick"

The core of this proposal is the Brick, a functional unit of parameters that can range in size from a single neuron to an entire model. Unlike traditional "modules," bricks offer richer granularity and functionality. The framework categorizes these units into two primary types based on their origin and purpose.

Definitions of key concepts in configurable modeling.
  • Emergent Bricks: These are functional clusters that naturally form during the pre-training process. As randomly initialized parameters evolve, they differentiate into specific functions, such as syntax processing or code generation.
  • Customized Bricks (Plugins): These are specifically designed and trained to meet downstream application needs. Examples include LoRA adapters for task-specific tuning, knowledge bricks for factual updates, or modality bricks for processing images and audio.

The Configurable Workflow

A Configurable Foundation Model dynamically selects and combines these bricks based on specific user instructions. This allows the model to transform into a specialized agent—such as a Literature Model, a Psychologist Model, or a Multi-Modal Model—depending on the task at hand.

Conceptual overview of a Configurable Foundation Model architecture.

To facilitate this modularity, the paper defines four core operations:

  1. Routing and Retrieval: Dynamically selecting only the necessary bricks for a specific instruction.
  2. Combination: Merging bricks via weight averaging or "stitching" them together for sequential execution to handle complex tasks.
  3. Updating: Modifying or replacing specific bricks (e.g., a "knowledge neuron") without affecting the rest of the model.
  4. Growing: Adding new bricks to the repository to expand the model's capabilities over time.

Empirical Evidence: Neuron Specialization and Sparsity

To prove that modularity exists even in "dense" models, the authors conducted an empirical analysis using Llama-3-8B-Instruct and Mistral-7B-Instruct-v0.3 against the Infinity-Instruct dataset. Their findings provide strong support for the modular perspective:

  • The 80/20 Rule of Parameters: Analysis revealed that for any given token, approximately 80% of neurons have almost zero impact on the final output. This suggests that "sparse activation"—using only the required bricks—could drastically reduce compute costs without sacrificing accuracy.
  • High Specificity: By calculating "Functionality Scores," the authors found that specific neurons in Feed-Forward Network (FFN) layers are highly specialized. Technical domains like Coding, Math, and Translation achieved scores > 0.8, indicating the presence of distinct internal "circuits."
  • Functional Independence: In perturbation studies, pruning "Coding" neurons severely damaged coding ability while leaving "Ethics" and "Writing" capabilities intact. This confirms that bricks are functionally independent units.

Key Results and Sparsity

The study demonstrated that sparsity is not just a theoretical benefit but a practical reality. The authors were able to mask or prune up to 70-80% of neurons based on their activation or output magnitude with virtually zero increase in perplexity. This proves that the majority of a model's parameters are idle for any specific task, reinforcing the argument for a configurable, brick-based architecture.

Challenges and Future Directions

While the modular approach is promising, several "open frontiers" remain:

  • Brick Collisions: Managing overlaps and conflicts when combining emergent bricks with customized plugins is a significant challenge.
  • Unified Protocols: There is currently no "LEGO-like" standard for bricks. A unified protocol is needed so bricks from different developers can be seamlessly integrated.
  • Hardware Bottlenecks: Current GPUs are optimized for dense matrix multiplications rather than the "scatter-gather" operations required for modular, sparse activation.
  • New Evaluation Metrics: Benchmarks must evolve to measure how well a model decomposes and recomposes itself, rather than just evaluating static outputs.

Summary updated

BibTeX
@misc{xiao2024configurable,
  author = {Chaojun Xiao and Zhengyan Zhang and Chenyang Song and Dazhi Jiang and Feng Yao and Xu Han and Xiaozhi Wang and Shuo Wang and Yufei Huang and Guanyu Lin and Yingfa Chen and Weilin Zhao and Yuge Tu and Zexuan Zhong and Ao Zhang and Chenglei Si and Moo Khai Hao and Chenyang Zhao and Huimin Chen and Yankai Lin and Zhiyuan Liu and Jingbo Shang and Maosong Sun},
  title = {{Configurable Foundation Models: Building LLMs from a Modular Perspective}},
  year = {2024},
  eprint = {2409.02877},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.02877},
}
Figure