Model Performance Evaluation
Why evaluate?
Evaluation makes routing data-driven. By measuring per-category accuracy on MMLU-Pro (and doing a quick sanity check with ARC), you can:
- Select the right model for each decision and configure them in decisions.modelRefs
- Pick a sensible default_model based on overall performance
- Decide when CoT prompting is worth the latency/cost tradeoff
- Catch regressions when models, prompts, or parameters change
- Keep changes reproducible and auditable for CI and releases
In short, evaluation converts anecdotes into measurable signals that improve quality, cost efficiency, and reliability of the router.
This guide documents the automated workflow to evaluate models (MMLU-Pro and ARC Challenge) via a vLLM-compatible OpenAI endpoint, generate a performance-based routing config, and update categories.model_scores in config.
see code in /src/training/model_eval
What you'll run end-to-end
1) Evaluate models
- per-category accuracies
- ARC Challenge: overall accuracy
2) Visualize results
- bar/heatmap plot of per-category accuracies

3) Generate an updated config.yaml
- Create decisions for each category with modelRefs
- Set default_model to the best average performer
- Keep or apply decision-level reasoning settings
1.Prerequisites
-
A running vLLM-compatible OpenAI endpoint serving your models
- Endpoint URL like http://localhost:8000/v1
- Optional API key if your endpoint requires one
# Terminal 1vllm serve microsoft/phi-4 --port 11434 --served_model_name phi4# Terminal 2vllm serve Qwen/Qwen3-0.6B --port 11435 --served_model_name qwen3-0.6B -
Python packages for evaluation scripts:
- From the repo root: matplotlib in requirements.txt
- From
/src/training/model_eval: requirements.txt
# We will work at this dir in this guidecd /src/training/model_evalpip install -r requirements.txt
⚠️ Critical Configuration Requirement:
The --served-model-name parameter in your vLLM command must exactly match the model names in your config/config.yaml:
# config/config.yaml must match the --served-model-name values above
providers:
models:
- name: "phi4" # ✅ Matches --served_model_name phi4
provider_model_id: "phi4"
backend_refs:
- name: "endpoint1"
endpoint: "127.0.0.1:11434"
protocol: "http"
- name: "qwen3-0.6B" # ✅ Matches --served_model_name qwen3-0.6B
provider_model_id: "qwen3-0.6B"
backend_refs:
- name: "endpoint2"
endpoint: "127.0.0.1:11435"
protocol: "http"
defaults:
default_model: "phi4"
routing:
modelCards:
- name: "phi4"
- name: "qwen3-0.6B"
Optional tip:
- Ensure your
config/config.yamlincludes your deployed model names underproviders.models[]and the matching semantic catalog underrouting.modelCardsif you plan to use the generated config directly.
2.Evaluate on MMLU-Pro
see script in mmul_pro_vllm_eval.py
Example usage patterns
# Evaluate a few models, few samples per category, direct prompting
python mmlu_pro_vllm_eval.py \
--endpoint http://localhost:11434/v1 \
--models phi4 \
--samples-per-category 10
python mmlu_pro_vllm_eval.py \
--endpoint http://localhost:11435/v1 \
--models qwen3-0.6B \
--samples-per-category 10
# Evaluate with CoT (results saved under *_cot)
python mmlu_pro_vllm_eval.py \
--endpoint http://localhost:11435/v1 \
--models qwen3-0.6B \
--samples-per-category 10
--use-cot
# If you have set up Semantic Router properly, you can run in one go
python mmlu_pro_vllm_eval.py \
--endpoint http://localhost:8801/v1 \
--models qwen3-0.6B, phi4 \
--samples-per-category
# --use-cot # Uncomment this line if use CoT