You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi~
I wanna train an MLP router with reference to your scripts, where I found a file named "../llm_performance.npz". However, this file has not been uploaded to GitHub yet, and I'm not sure what is in it. So, would you please give me some instructions on how to construct this file?
Thanks very much!
Hi~
Thanks for your interest! The llm_performance.npz file contains preprocessed data for training and evaluating the MLP router. Specifically, it includes six arrays:
train_embed, val_embed, test_embed: embeddings for train/val/test splits.
Big thanks for your timely and comprehensive response. I've run the code successfully and get more questions that I'd like to discuss with you~
I noticed a line if difficulty == 'hard': break, which seems to exclude the experiments with 10, 100 and 1000 LLM candidates. How can I reproduce the experiment under "hard" setting?
The appendix of the paper said, "For specific candidates of these settings and other evaluation candidates, please refer directly to our code." But I didn't find the definition of these candidates and code of choosing the most proper candidates for "all-strong", "all-weak" and "strong-to-weak" settings. Would you please show me how I can get to know and access the specific LLM candidates?
I also wanna try using different LLM candidates like 3, 6, or 20 etc. But I find the definition seems to be imported directly from data/router_dataset/{to_handle}_router_dataset.pkl. Therefore, how can I modify or regenerate these pkl files?
Under the leaderboard_embed, leaderboard_prompt, and leaderboard_score folders, there are pkl files named _mmlu_pro, _new, and _old. What are the differences between them? When I try to train a router, which one should I refer to?
Thanks for your questions! Here are quick answers:
Simply remove or comment out the line if difficulty == 'hard': break to run the "hard" setting experiments.
Check "Advanced Tutorial 2: Constructing Router Dataset" in the README and the get_router_dataset.py file for candidate definitions and selection methods.
Modify get_router_dataset.py to generate custom PKL files with your desired LLM candidates (3, 6, 20, etc.).
They denote different benchmark sets. The differences are:
Activity
linggm3 commentedon Oct 19, 2025
Hi~
Thanks for your interest! The
llm_performance.npzfile contains preprocessed data for training and evaluating the MLP router. Specifically, it includes six arrays:train_embed,val_embed,test_embed: embeddings for train/val/test splits.train_score,val_score,test_score: corresponding performance scores.For reference,
test_router.pyoutlines the pipeline to build the .npz dataset and perform router training and testing.Here’s the relevant code snippet:
You can simply change
baseline = 'knn'tobaseline = 'mlp'intest_router.pyand runpython test_router.pyto train and test the MLP router.Let me know if you need more details! 😊
TonyZhang-sjtu commentedon Oct 19, 2025
Big thanks for your timely and comprehensive response. I've run the code successfully and get more questions that I'd like to discuss with you~
I noticed a line
if difficulty == 'hard': break, which seems to exclude the experiments with 10, 100 and 1000 LLM candidates. How can I reproduce the experiment under "hard" setting?The appendix of the paper said, "For specific candidates of these settings and other evaluation candidates, please refer directly to our code." But I didn't find the definition of these candidates and code of choosing the most proper candidates for "all-strong", "all-weak" and "strong-to-weak" settings. Would you please show me how I can get to know and access the specific LLM candidates?
I also wanna try using different LLM candidates like 3, 6, or 20 etc. But I find the definition seems to be imported directly from
data/router_dataset/{to_handle}_router_dataset.pkl. Therefore, how can I modify or regenerate these pkl files?Under the
leaderboard_embed,leaderboard_prompt, andleaderboard_scorefolders, there are pkl files named_mmlu_pro,_new, and_old. What are the differences between them? When I try to train a router, which one should I refer to?Thank u very much!!!
linggm3 commentedon Oct 19, 2025
Thanks for your questions! Here are quick answers:
Simply remove or comment out the line
if difficulty == 'hard': breakto run the "hard" setting experiments.Check "Advanced Tutorial 2: Constructing Router Dataset" in the README and the
get_router_dataset.pyfile for candidate definitions and selection methods.Modify
get_router_dataset.pyto generate custom PKL files with your desired LLM candidates (3, 6, 20, etc.).They denote different benchmark sets. The differences are:
_old: 6 earlier benchmarks (generally higher LLM scores)_new/_mmlu_pro: Newer, more challenging benchmarks (lower scores)We recommend training and testing your router across all of them for a comprehensive evaluation.
Hope this helps! Feel free to reach out if you have more questions.