Evaluating Small Language Models for Front-Door Routing: A Harmonized Benchmark and Synthetic-Traffic Experiment
Organizations: Plexor Labs, Sammamish, WA, USA · Project Autobots, Seattle, WA, USA
Abstract
Selecting the appropriate model at inference time -- the routing problem -- requires jointly optimizing output quality, cost, latency, and governance constraints. Existing approaches delegate this decision to LLM-based classifiers or preference-trained routers that are themselves costly and high-latency, reducing a multi-objective optimization to single-dimensional quality prediction. We argue that small language models (SLMs, 1-4B parameters) have now achieved sufficient reasoning capability for sub-second, zero-marginal-cost, self-hosted task classification, potentially making the routing decision negligible in the inference budget. We test this thesis on a six-label taxonomy through two studies. Study 1 is a harmonized offline benchmark of Phi-3.5-mini, Qwen2.5-1.5B, and Qwen-2.5-3B on identical Azure T4 hardware, serving stack, quantization, and a fixed 60-case corpus. Qwen-2.5-3B achieves the best exact-match accuracy (0.783), the strongest latency-accuracy tradeoff, and the only nonzero accuracy on all six task families. Study 2 is a pre-registered four-arm randomized experiment under synthetic traffic with an effective sample size of 60 unique cases per arm, comparing Phi-4-mini, Qwen-2.5-3B, and DeepSeek-V3 against a no-routing control. DeepSeek-V3 attains the highest accuracy (0.830) but fails the pre-registered P95 latency gate (2,295 ms); Qwen-2.5-3B is Pareto-dominant among self-hosted models (0.793 accuracy, 988 ms median, $0 marginal cost). No model meets the standalone viability criterion (>=0.85 accuracy, <=2,000 ms P95). The cost and latency prerequisites for SLM-based routing are met; the accuracy gap of 6-8 percentage points and the untested question of whether correct classification translates to downstream output quality bound the remaining distance to production viability.
Figures & tables
| Metric | Phi-3.5-mini | Qwen2.5-1.5B | Qwen-2.5-3B |
|---|---|---|---|
| Exact classification accuracy | 0.4000 | ||
| JSON parse rate | 0.9833 | 0.9667 | |
| Median latency (ms) | 5,772 | 1,088 | |
| P95 latency (ms) | 6,357 | 4,636 |
| Family | Phi-3.5-mini | Qwen2.5-1.5B | Qwen-2.5-3B | Best Model |
|---|---|---|---|---|
| code/complex | 0.50 | 0.70 | Phi | |
| code/simple | 0.80 | 0.70 | Qwen-1.5B | |
| CoT/complex | 0.00 | 0.90 | Phi | |
| CoT/simple | 0.80 | 0.00 | Qwen-3B | |
| hybrid/agentic | 0.50 | 0.90 | Qwen-1.5B | |
| hybrid/generative | 0.20 | 0.00 | Qwen-3B |
| Arm | Label | Model Backend | Hosting | Params |
|---|---|---|---|---|
| A | Control | None (pass-through) | N/A | — |
| B | Phi-4-mini | Phi-4-mini-instruct | Self-hosted vLLM (T4 GPU) | 3.8B |
| C | Qwen-2.5-3B | Qwen-2.5-3B-Instruct | Self-hosted vLLM (T4 GPU) | 3B |
| D | DeepSeek-V3 | DeepSeek-V3 (API) | DeepSeek commercial API | 671B MoE |
| Scenario | Cost Winner | Quality Winner | Decision |
|---|---|---|---|
| SLM wins both | B or C | B or C | Deploy winning SLM |
| DeepSeek quality, SLM cost | B or C | D | SLM + DeepSeek fallback |
| DeepSeek wins both | D | D | DeepSeek primary; SLM fallback |
| All similar quality | Lowest | Comparable | Deploy cheapest |
| DeepSeek fails latency gate | Any | Any | Eliminate D; choose B vs. C |
| Arm | Model | Accuracy | Parse | Med. Lat | P95 Lat | Cost |
|---|---|---|---|---|---|---|
| A | Control | — | — | — | — | $0 |
| B | Phi-4-mini | 0.518 | 0.915 | 977 ms | 1,541 ms | $0 |
| C | Qwen-2.5-3B | ms | ms | $0 | ||
| D | DeepSeek-V3 | 1,854 ms | 2,295 ms | $0.034 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Artifact | Value |
|---|---|
| Models evaluated | Phi-3.5-mini, Qwen2.5-1.5B, Qwen-2.5-3B |
| Corpus SHA-256 | dac3aac5… |
| GPU | NVIDIA Tesla T4 (16 GB GDDR6, exclusive) |
| VM class | Azure Standard_NC8as_T4_v3 |
| Inference framework | vLLM 0.17.1 |
| Quantization backend | bitsandbytes 4-bit NF4 |
| Artifact | Value |
|---|---|
| Arms | A (control), B (Phi-4-mini), C (Qwen-2.5-3B), D (DeepSeek-V3) |
| Sample size | per arm ( ) |
| Corpus SHA-256 | dac3aac5… |
| Randomization | SHA-256( session_id ) |
| GPU (Arms B, C) | NVIDIA Tesla T4 (16 GB GDDR6), vLLM 0.17.1 |
| Arm D | DeepSeek-V3 commercial API |
| Case ID | Ground Truth | Predicted | Error Corridor |
|---|---|---|---|
| PV2-001 | CoT/simple | hybrid/generative | CoT hybrid |
| PV2-011 | code/simple | hybrid/generative | code hybrid |
| PV2-013 | code/simple | CoT/simple | code CoT |
| PV2-020 | code/simple | code/complex | complexity over-est. |
| PV2-021 | CoT/complex | hybrid/generative | CoT hybrid |
| PV2-033 | code/complex | hybrid/agentic | code hybrid |
| Artifact | File Path | Purpose |
|---|---|---|
| Experiment design | paper/main.tex (§ 4 ) | Protocol specification |
| Analysis script | scripts/ab-test/rct_cross_arm_analysis.py | Endpoint analysis |
| Decision matrix | Table 4 (this paper) | Outcome action map |
| Hypothesis specs | H5–H9 (§ 1.3 ) | Testable predictions |
| Corpus (60-case) | data/progressive_test_cases_v2_60.jsonl | Evaluation corpus |
| Benchmark script | scripts/benchmark_openweights.py | Model evaluation driver |