arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.23049cs.CL
收藏

通过提示编排加速语言模型工作流

Accelerating Language Model Workflows with Prompt Choreography

Johns Hopkins University(约翰霍普金斯大学)

TJ Bai, Jason Eisner

AI总结:

提示编排通过动态缓存和并行处理,显著提升多智能体工作流中语言模型的效率与速度

摘要:

大型语言模型越来越多地被部署在多智能体工作流中。我们介绍了提示编排,这是一种框架,通过维护一个动态的全局KV缓存来高效地执行LLM工作流。每个LLM调用可以关注任意重新排序的先前编码信息的子集。支持并行调用。尽管缓存消息的编码有时会与在新上下文中重新编码产生不同的结果,但我们展示了在多种设置中,通过微调LLM以与缓存一起工作,可以帮助其模仿原始结果。提示编排显著降低了每条消息的延迟(2.0-6.2倍更快的首次令牌时间),并在某些由冗余计算主导的工作流中实现了显著的端到端加速(>2.2倍)。

英文摘要:

Large language models are increasingly deployed in multi-agent workflows. We introduce Prompt Choreography, a framework that efficiently executes LLM workflows by maintaining a dynamic, global KV cache. Each LLM call can attend to an arbitrary, reordered subset of previously encoded messages. Parallel calls are supported. Though caching messages' encodings sometimes gives different results from re-encoding them in a new context, we show in diverse settings that fine-tuning the LLM to work with the cache can help it mimic the original results. Prompt Choreography significantly reduces per-message latency (2.0--6.2$\times$ faster time-to-first-token) and achieves substantial end-to-end speedups ($>$2.2$\times$) in some workflows dominated by redundant computation.

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

↑