arXiv:2507.16784cs.CL2025-07

突破大模型上下文限制,实现超长推理与多步工具调用

Beyond Context Limits: Subconscious Threads for Long-Horizon Reasoning

  • 将语言推理建模为可递归分解的树状结构,避免线性序列瓶颈
  • 通过关键状态保留机制,支持90%显存缓存利用率下的高效推理
  • 适合需要跨步推理和复杂工具链的任务,如数学求解与长程信息检索

为突破大语言模型(LLMs)因上下文长度限制导致的推理准确率与效率瓶颈,我们提出线程推理模型(TIM),一种专为递归与分解式问题求解训练的LLM家族,以及支持超长推理的推理运行时TIMRUN。TIM在TIMRUN上运行,具备近乎无限的工作记忆和单次推理内多跳工具调用能力,克服输出长度、位置编码与显存瓶颈。其核心是将自然语言推理建模为具有深度与长度的推理树,由任务、思考、递归子任务与结论构成,基于Schroeder等人2025年提出的概念。生成过程中,仅保留最相关上下文标记的关键值状态,通过基于规则的子任务剪枝机制实现位置嵌入与显存页的复用。实验表明,系统在操作高达90%的键值缓存时仍保持高推理吞吐量,在数学任务与需多跳工具调用的信息检索中均实现高精度推理。

原文摘要 · Abstract (English)

To break the context limits of large language models (LLMs) that bottleneck reasoning accuracy and efficiency, we propose the Thread Inference Model (TIM), a family of LLMs trained for recursive and decompositional problem solving, and TIMRUN, an inference runtime enabling long-horizon structured reasoning beyond context limits. Together, TIM hosted on TIMRUN supports virtually unlimited working memory and multi-hop tool calls within a single language model inference, overcoming output limits, positional-embedding constraints, and GPU-memory bottlenecks. Performance is achieved by modeling natural language as reasoning trees measured by both length and depth instead of linear sequences. The reasoning trees consist of tasks with thoughts, recursive subtasks, and conclusions based on the concept we proposed in Schroeder et al, 2025. During generation, we maintain a working memory that retains only the key-value states of the most relevant context tokens, selected by a rule-based subtask-pruning mechanism, enabling reuse of positional embeddings and GPU memory pages throughout reasoning. Experimental results show that our system sustains high inference throughput, even when manipulating up to 90% of the KV cache in GPU memory. It also delivers accurate reasoning on mathematical tasks and handles information retrieval challenges that require long-horizon reasoning and multi-hop tool use.

长程推理上下文扩展工具调用内存优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。