评估小型语言模型用于前端路由:一个统一的基准和合成流量实验
Evaluating Small Language Models for Front-Door Routing: A Harmonized Benchmark and Synthetic-Traffic Experiment
AI总结:
本文通过统一基准和合成流量实验,评估小型语言模型在前端路由中的性能,发现Qwen-2.5-3B在准确率、延迟和成本上表现优异,但整体仍存在准确率与延迟的平衡问题。
摘要:
在推理过程中选择合适的模型——路由问题——需要联合优化输出质量、成本、延迟和治理约束。现有方法将此决策委托给基于LLM的分类器或偏好训练的路由器,这些自身成本高且延迟大,将多目标优化简化为单一维度的质量预测。我们认为小型语言模型(SLMs,1-4B参数)已具备足够的推理能力,可以实现亚秒级、零边际成本、自托管的任务分类,可能使路由决策在推理预算中变得可忽略。我们通过两项研究测试了这一论点。研究1是在相同Azure T4硬件、服务栈、量化和固定60案例语料库上对Phi-3.5-mini、Qwen2.5-1.5B和Qwen-2.5-3B进行统一的离线基准测试,Qwen-2.5-3B在精确匹配准确率(0.783)、延迟-准确率权衡最强,且在六个任务家族上唯一非零准确率。研究2是在合成流量下进行的预注册四臂随机实验,每个臂有60个唯一案例,比较Phi-4-mini、Qwen-2.5-3B和DeepSeek-V3与无路由对照组。DeepSeek-V3获得最高准确率(0.830)但未能通过预注册的P95延迟门(2,295 ms);Qwen-2.5-3B在自托管模型中居于帕累托主导地位(0.793准确率,988 ms中位数,$0边际成本)。没有模型满足单独可行性标准(>=0.85准确率,<=2,000 ms P95)。SLM基于路由的成本和延迟前提得到满足;准确率差距6-8个百分点和未测试的正确分类是否转化为下游输出质量的界限限制了剩余距离到生产可行性。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。