跳到正文
arXiv (AI + Vision + Imaging)· Zehao Lin, Qianfeng Shen, Xixuan Hao, Shaobo Cui, Chunyu Li, Kai Chen, Bo Tang, Zhenjun Wang, Jin Yan, Zhiyu Li, Feiyu Xiong·AI 评分22

将自回归LLM控制编译为策略精确并行推理,用于分层RAG

Compiling Autoregressive LLM Control into Policy-Exact Parallel Inference for Hierarchical RAG

AI 导读

分层RAG中LLM在文档树每个前沿需从k个章节中选出b个,串行语法约束解码成为延迟瓶颈。该工作将可达未来编译为浅层动作前缀树,用一次根预填充加一次树因果探针复现串行解码的token、位置与因果祖先,使编译控制策略精确且输出token为零。在MetaX设备四个文档不相交划分上,编译控制与串行策略在84%–89%问题上一致,控制延迟较逐token串行解码降低35%–47%。

正文 · 原文

arXiv:2610.30664v1 Announce Type: new Abstract: Large language models increasingly act as controllers in structured decision pipelines, yet their decisions are still executed by autoregressive text decoding. Hierarchical RAG is one such setting: at each frontier of a document tree, an LLM commits to $b$ of $k$ sections under an input-dependent action grammar, executed as either failure-prone free-form JSON or reliable but strictly serial grammar-constrained generation. We show that this serialization is unnecessary for bounded-horizon control: the reachable future forms a shallow action-prefix tree, which we compile --- one root prefill plus one tree-causal probe evaluate every prefix-conditioned action distribution with serial decoding's tokens, positions, and causal ancestry. A prefix-state lemma makes compiled control policy-exact in exact arithmetic: the same policy with a two-forward critical path and zero output tokens. One further probe pass certifies the exact order-marginalized MAP set. Across four document-disjoint splits and two scales on the primary MetaX device, compiled control matches the serial policy on $84$--$89\%$ of questions --- every instrumented divergence a floating-point near-tie --- and cuts control latency by $35$--$47\%$ versus token-wise serial decoding and $6$--$7\%$ versus an idealized chunked engine; an H800 repetition preserves the ordering.

来源:arXiv (AI + Vision + Imaging) · arxiv.org