arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.12301cs.DCcs.AIcs.SE
收藏

Local-Splitter:七种减少云LLM令牌使用量策略的测量研究

Local-Splitter: A Measurement Study of Seven Tactics for Reducing Cloud LLM Token Usage on Coding-Agent Workloads

Sperix Labs(Sperix实验室);VIA Cybersecurity Lab, KNUST(VIA网络安全实验室,科罗尼斯特大学);Quantum and Assistive Technologies Lab, KNUST(量子与辅助技术实验室,科罗尼斯特大学)

Justice Owusu Agyemang, Jerry John Kponyo, Elliot Amponsah, Godfred Manu Addo Boakye, Kwame Opuni-Boachie Obour Agyekum

AI总结:

本文研究了七种减少云LLM令牌使用量的策略,通过测量发现本地路由与提示压缩组合在编辑密集型任务中可节省45-79%的云令牌,而RAG密集型任务中完整策略集可节省51%。

摘要:

我们系统地研究了七种减少云LLM令牌使用量的策略,当小型本地模型可作为前沿云模型的前置筛选层时。策略包括本地路由、提示压缩、语义缓存、本地草稿加云审查、最小差异编辑、结构化意图提取以及带供应商提示缓存的批处理。我们实现了一个开源的shim,支持MCP和OpenAI兼容的HTTP接口,兼容任何本地模型(通过Ollama)和任何云模型(通过OpenAI兼容端点)。我们评估了每个策略单独、成对以及贪心加法子集在四种编码代理工作负载类别(编辑密集型、解释密集型、一般聊天、RAG密集型)中的表现。我们测量了节省的令牌数、美元成本、延迟和路由准确性。我们的主要发现是,T1(本地路由)与T2(提示压缩)组合在编辑密集型和解释密集型任务中可节省45-79%的云令牌,而在RAG密集型任务中,完整策略集(包括T4(草稿审查))可节省51%。我们观察到最佳策略子集取决于工作负载,我们认为这是目前部署编码代理的最实用发现。

英文摘要:

We present a systematic measurement study of seven tactics for reducing cloud LLM token usage when a small local model can act as a triage layer in front of a frontier cloud model. The tactics are: (1) local routing, (2) prompt compression, (3) semantic caching, (4) local drafting with cloud review, (5) minimal-diff edits, (6) structured intent extraction, and (7) batching with vendor prompt caching. We implement all seven in an open-source shim that speaks both MCP and the OpenAI-compatible HTTP surface, supporting any local model via Ollama and any cloud model via an OpenAI-compatible endpoint. We evaluate each tactic individually, in pairs, and in a greedy-additive subset across four coding-agent workload classes (edit-heavy, explanation-heavy, general chat, RAG-heavy). We measure tokens saved, dollar cost, latency, and routing accuracy. Our headline finding is that T1 (local routing) combined with T2 (prompt compression) achieves 45-79% cloud token savings on edit-heavy and explanation-heavy workloads, while on RAG-heavy workloads the full tactic set including T4 (draft-review) achieves 51% savings. We observe that the optimal tactic subset is workload-dependent, which we believe is the most actionable finding for practitioners deploying coding agents today.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑