[2025.10.28] 🌟 The GMTRouter repository is now open-sourced, and the paper will be publicly available on arXiv shortly.
We recommend creating a separate conda environment for GMTRouter to avoid dependency conflicts.
# 1️⃣ Create a new conda environment with Python 3.11
conda create -n GMTRouter python=3.11.13
conda activate GMTRouter
# 2️⃣ Install PyTorch for your GPU version.
# Here we provide a GPU setup for CUDA 12.4.
# If you use a different CUDA version or CPU, please modify accordingly.
pip install torch==2.6.* torchvision==0.21.* torchaudio==2.6.* --index-url https://download.pytorch.org/whl/cu124
# 3️⃣ Install other required Python packages
pip install -r requirements.txt
# 4️⃣ Install PyTorch Geometric (PyG) and related libraries
# This ensures compatibility with PyTorch 2.6 and CUDA 12.4
pip install torch-geometric==2.6.1Notes / Tips:
- Make sure your CUDA driver version matches the PyTorch CUDA version you install. Mismatched versions can cause runtime errors.
- If you only want a CPU setup, you can remove the
--index-urlor choose the CPU-specific wheels from PyTorch’s website. requirements.txtcontains standard dependencies;requirements-gpu-cu124.txtis tailored for GPU with CUDA 12.4.
The datasets used in our experiments have been processed into a unified format and split into training, validation, and test sets.
You can download the data manually from Google Drive via the following link: Download from Google Drive
After downloading, decompress the archive GMTRouter_dataset.tar.gz and move the extracted data folder to the root directory of the repository:
tar -xzvf GMTRouter_dataset.tar.gz
mv GMTRouter_dataset/data <destination_path> # Replace <destination_path> with the root directory of this projectWe provide a sample configuration file at ./configs/sample.yaml,
where you can specify which dataset to run experiments on.
Supported datasets include:
chatbot_arenagsm8kmmlumt_bench
To launch an experiment, run the following command, replacing <YAML> with your own configuration file:
python -u ./src/train.py --config ./configs/<YAML>For example:
python -u ./src/train.py --config ./configs/sample.yamlEach configuration file defines dataset selection, training hyperparameters, and model settings. You can modify it to fit your own experimental setup or dataset.
