Justin Chih-Yao Chen* | Sukwon Yun* | Elias Stengel-Eskin* | Tianlong Chen | Mohit Bansal
*Equal contribution
This repository contains the implementation of Symbolic Mixture-of-Experts, a novel approach for adaptive skill-based routing to enable scalable heterogeneous reasoning across multiple domains.
This repository is tested on Python 3.10.12. All dependencies can be installed as follows:
pip install -r requirements.txt
--task: Specifies which dataset to run. Options include:
MMLU_ProAIME24GPQAMedMCQA--gpus: Number of GPUs to use for the experiment--seed: Random seed for reproducibilityAnnotate keywords for the validation and testing data:
python annotate_keywords.py
Create profiles for all models:
run_create_profile.sh to ensure that the --task and --gpus arguments are correctbash run_create_profile.sh
Create the aggregator benchmark for all models:
run_bench_aggr.sh to ensure that the --task and --gpus arguments are correctbash run_aggr_bench.sh
Recruit experts for each instance:
python recruit_agents.py --task GPQA --seed 0
Generate the initial responses from the k experts:
CUDA_VISIBLE_DEVICES=0 python expert_inference.py --task GPQA --gpus 1 --seed 0
Use the aggregator to generate the final output and evaluate the results:
CUDA_VISIBLE_DEVICES=0 python aggregate.py --task GPQA --aggregator QwenR1 --gpus 1 --seed 0
The aggregator we use for each task can be found in the following table (and Table 9 in the paper):
| Dataset | Model |
|---|---|
| MMLU-Pro | LlamaR1 |
| AIME | QwenR1 |
| GPQA | QwenR1 |
| MedMCQA | Qwen |
You can skip Steps 1-4 by downloading the stored outputs here (Google Drive).
Extract all files in skill.zip and placing all the folders in the root directory of this project:
unzip skill.zip
After extraction, you can proceed directly to Steps 5-7 to complete the experiment.
If you find this work useful, please consider citing us:
@article{chen2025skillmoe,
title={Skill-Based Mixture-of-Experts: Adaptive Routing for Heterogeneous Reasoning via Inferred Skills},
author={Chen, Justin Chih-Yao and Yun, Sukwon and Stengel-Eskin, Elias and Chen, Tianlong and Bansal, Mohit},
journal={arXiv preprint arXiv:2503.05641},
year={2025}
}
Python
95.8%
Shell
4.2%
Justin Chih-Yao Chen* | Sukwon Yun* | Elias Stengel-Eskin* | Tianlong Chen | Mohit Bansal
*Equal contribution
This repository contains the implementation of Symbolic Mixture-of-Experts, a novel approach for adaptive skill-based routing to enable scalable heterogeneous reasoning across multiple domains.
This repository is tested on Python 3.10.12. All dependencies can be installed as follows:
pip install -r requirements.txt
--task: Specifies which dataset to run. Options include:
MMLU_ProAIME24GPQAMedMCQA--gpus: Number of GPUs to use for the experiment--seed: Random seed for reproducibilityAnnotate keywords for the validation and testing data:
python annotate_keywords.py
Create profiles for all models:
run_create_profile.sh to ensure that the --task and --gpus arguments are correctbash run_create_profile.sh
Create the aggregator benchmark for all models:
run_bench_aggr.sh to ensure that the --task and --gpus arguments are correctbash run_aggr_bench.sh
Recruit experts for each instance:
python recruit_agents.py --task GPQA --seed 0
Generate the initial responses from the k experts:
CUDA_VISIBLE_DEVICES=0 python expert_inference.py --task GPQA --gpus 1 --seed 0
Use the aggregator to generate the final output and evaluate the results:
CUDA_VISIBLE_DEVICES=0 python aggregate.py --task GPQA --aggregator QwenR1 --gpus 1 --seed 0
The aggregator we use for each task can be found in the following table (and Table 9 in the paper):
| Dataset | Model |
|---|---|
| MMLU-Pro | LlamaR1 |
| AIME | QwenR1 |
| GPQA | QwenR1 |
| MedMCQA | Qwen |
You can skip Steps 1-4 by downloading the stored outputs here (Google Drive).
Extract all files in skill.zip and placing all the folders in the root directory of this project:
unzip skill.zip
After extraction, you can proceed directly to Steps 5-7 to complete the experiment.
If you find this work useful, please consider citing us:
@article{chen2025skillmoe,
title={Skill-Based Mixture-of-Experts: Adaptive Routing for Heterogeneous Reasoning via Inferred Skills},
author={Chen, Justin Chih-Yao and Yun, Sukwon and Stengel-Eskin, Elias and Chen, Tianlong and Bansal, Mohit},
journal={arXiv preprint arXiv:2503.05641},
year={2025}
}
Python
95.8%
Shell
4.2%