We address LLM serving workloads where repeated requests share a common solution structure but differ in localized constraints, such as output schema, variable names, or numeric constants. Prior caching approaches typically reuse either full responses (semantic caching) or model-internal KV/prefix states, which are respectively brittle under partial changes or tightly coupled to specific backends. We present StepCache, a backend-agnostic step-level reuse layer that segments outputs into ordered steps, retrieves the best-matching cached request, verifies steps using lightweight task-aware checks, and regenerates only failing regions via selective patching. StepCache additionally supports strict structured-output enforcement for JSON, including single-step extraction, required-key constraints, and one-shot repair, as well as conservative skip-reuse fallbacks for semantic changes. For linear equations, StepCache promotes verification into correction via a bounded repair loop with a deterministic fallback that guarantees correctness when the backend model fails. In a CPU-only perturbation-heavy micro-benchmark on math and JSON variants, averaged over three seeds, StepCache reduces mean latency from 2.13 s to 0.67 s, median latency from 2.42 s to 0.01 s, and p95 latency from 3.38 s to 3.30 s. It also reduces total token usage from 36.1k to 27.3k and improves end-to-end correctness from 72.5% to 100% under task-specific checks and a stitched-output integrity check. Across requests, 79.7% take the reuse-only fast path, 5.4% require patching, and 14.9% trigger skip-reuse.


翻译:[translated abstract in Chinese] 我们解决大语言模型(LLM)服务负载中,重复请求共享相同解决方案结构但在局部约束(如输出模式、变量名或数值常量)上存在差异的问题。现有缓存方法通常复用完整响应(语义缓存)或模型内部的KV/前缀状态,前者在局部变更时脆弱易错,后者则与特定后端紧密耦合。我们提出StepCache——一种后端无关的步骤级复用层,将输出分割为有序步骤,检索最佳匹配的缓存请求,通过轻量级任务感知校验验证步骤,并仅通过选择性修补再生失败区域。StepCache还支持JSON的严格结构化输出强制,包括单步提取、必要键约束和单次修复,以及针对语义变更的保守跳过-回退策略。对于线性方程,StepCache通过带确定回退的有界修复循环将验证升级为修正,确保在后端模型失败时保证正确性。在仅含CPU的高扰动微基准测试(数学与JSON变体)中,基于三个随机种子取平均,StepCache将平均延迟从2.13秒降至0.67秒,中位数延迟从2.42秒降至0.01秒,p95延迟从3.38秒降至3.30秒。总令牌使用量从36.1k降至27.3k,在任务特定校验与拼接输出完整性校验下,端到端正确率从72.5%提升至100%。跨请求分析显示,79.7%走仅复用快速路径,5.4%需修补,14.9%触发跳过-回退。

0
下载
关闭预览

相关内容

什么是后训练?大语言模型训练后优化方法综述,87页pdf
【CIKM2024教程】大语言模型在表格任务中的应用
专知会员服务
24+阅读 · 2024年10月30日
大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
无人机自主控制与人工智能:系统性综述
专知会员服务
5+阅读 · 今天7:25
巡飞弹与反无人机系统——现代战场的两大支柱
专知会员服务
2+阅读 · 今天6:54
《打造“黄金舰队”》57页报告
专知会员服务
1+阅读 · 今天6:52
《北约数字教官网络发展路径》128页报告
专知会员服务
1+阅读 · 今天6:33
ECCV 2026 | MIMFlow:MIM与归一化流统一图像生成
专知会员服务
6+阅读 · 6月25日
网状网络及其在军事领域的运用
专知会员服务
7+阅读 · 6月25日
无美国参与的欧洲战争方式(万字长文)
专知会员服务
8+阅读 · 6月25日
《国防领域敏感性分析白皮书》
专知会员服务
9+阅读 · 6月25日
综述 | 从问答到任务完成:Agent系统与Harness设计
专知会员服务
10+阅读 · 6月24日
Agentic RL:框架、实践与长程智能体训练
专知会员服务
10+阅读 · 6月24日
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员