Experts are all you need: A Composable Framework for Large Language Model Inference

Shrihari Sridharan, Sourjya Roy, Anand Raghunathan, Kaushik RoyarXiv 2025 · DOI

Introduction

As Large Language Models (LLMs) scale, they become increasingly monolithic, leading to high operational costs and difficulties in specialized updates. While Mixture of Experts (MoE) architectures offer a partial solution by activating only relevant sub-networks, they often require expensive joint pre-training and struggle with complex, multi-step reasoning. Conversely, Multi-Agent frameworks handle complex reasoning through sequential loops, which introduces significant latency.

Comp-LLM addresses these challenges by decomposing complex queries into a dependency graph of sub-tasks. These tasks are then routed to specialized, independently trained "expert" models. This approach enables parallel execution and achieves the performance of massive models with a significantly smaller memory footprint.

The Comp-LLM Framework

The Comp-LLM architecture consists of three modular stages designed to transform a single prompt into a coordinated multi-expert response.

The Comp-LLM architecture: from query decomposition to parallel execution and response aggregation.
  1. Sub-query Generator: A fine-tuned "Decomposer" LLM breaks a complex query into simpler sub-questions and identifies logical dependencies. An Expert Router then matches each sub-query to the most relevant domain expert (e.g., Math, Biology, Chemistry) using embedding similarity.
  2. Query Executor: Dependencies are modeled as a Directed Acyclic Graph (DAG). A runtime scheduler identifies independent sub-queries for parallel execution, passing parent node outputs as context to child nodes.
  3. Response Aggregator: This final stage synthesizes expert responses into a single, coherent answer.

Unlike standard MoEs, these experts are modular; they can be added or swapped without retraining the entire system.

Experimental Evaluation

The framework was evaluated using Llama 2 and OPT models on two new benchmarks: MultiExpertQA-P (independent sub-queries) and MultiExpertQA-All (complex dependencies). Experts were fine-tuned on specialized datasets for Chemistry, Biology, and Math. The Sub-query Generator was trained on a custom dataset derived from HotpotQA and MuSiQue, with ground-truth decompositions generated by GPT-4o.

Key Results and Insights

Comp-LLM demonstrates that explicit modeling of logical dependencies is superior to the implicit routing found in standard MoEs.

Comp-LLM achieves high F1 scores at significantly smaller model sizes compared to base and fine-tuned OPT models.
  • Efficiency and Accuracy: Comp-LLM (35B parameters) achieved accuracy comparable to a monolithic Llama 2 70B model, representing a 1.67x to 3.56x reduction in model size. On MultiExpertQA benchmarks, it improved accuracy by up to 11.01% over similarly sized monolithic models.
  • Latency: Parallelizing the dependency graph resulted in a 1.1x to 1.7x speedup over sequential processing.
  • Routing Robustness: The use of Mean Pooling (MP) for query embeddings proved more effective than using the last token's hidden state. Additionally, a similarity threshold ensures that queries outside specific domains are handled by a general-purpose base model to prevent hallucinations.

Conclusion and Future Work

Comp-LLM offers a scalable, efficient alternative to monolithic LLMs and standard MoEs for static reasoning tasks. However, its performance is constrained by the breadth of its expert library. Furthermore, its static DAG generation makes it less suitable for dynamic, interactive tasks. Future research will focus on adaptive sub-query generation that can respond to intermediate results while maintaining parallel efficiency.

Summary updated

BibTeX
@misc{sridharan2025experts,
  author = {Shrihari Sridharan and Sourjya Roy and Anand Raghunathan and Kaushik Roy},
  title = {{Experts are all you need: A Composable Framework for Large Language Model Inference}},
  year = {2025},
  eprint = {2511.22955},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.22955},
}
Figure