In real-world Tool-Integrated Reasoning (TIR) scenarios, where LLMs interleave reasoning with external tool calls, a major source of inefficiency is that the toolcalls create pauses between LLM requests and cause KV-Cache eviction, forcing recomputation. Also, the long, unfiltered response returned by external tools inflates the KV-Cache, so each decode step spends more time loading the growing cache and thus becomes steadily slower as context length increases. However, existing efficiency metrics like token counts and toolcall counts fail to capture the real model inference latency. To address this, we introduce PTE (Prefill Token Equivalents), a hardware-aware TIR-efficiency metric that unifies internal reasoning and external tool-use costs while explicitly accounting for non-reusable KV-Cache and long-tool-response scenarios. Validation in a high-concurrency industrial setting indicates that PTE aligns significantly better with wall-clock latency than standard token counts, while maintaining consistent efficiency rankings across diverse hardware profiles. We conduct extensive experiments across five TIR benchmarks, quantify their PTE costs, and identify four inefficiency patterns that appear in TIR. We also discover that trajectories with higher PTE costs tend to have lower reasoning correctness, indicating that simply using more tools does not improve the quality of the answer.
翻译:在现实世界的工具集成推理(TIR)场景中,大语言模型将推理与外部工具调用交替进行,低效的主要来源是工具调用会在LLM请求之间产生停顿并导致KV缓存逐出,迫使进行重计算。此外,外部工具返回的冗长未过滤响应会膨胀KV缓存,使得每个解码步骤花费更多时间加载不断增长的缓存,从而随着上下文长度的增加而逐渐变慢。然而,现有的效率指标(如令牌计数和工具调用次数)无法捕捉真实的模型推理延迟。为此,我们提出PTE(预填充令牌当量),一种硬件感知的TIR效率指标,它统一了内部推理和外部工具使用的成本,同时明确考虑了不可重用的KV缓存和长工具响应场景。在高并发工业环境中的验证表明,PTE与挂钟延迟的对齐程度显著优于标准令牌计数,同时在不同硬件配置下保持一致的效率排名。我们基于五个TIR基准进行了广泛实验,量化其PTE成本,并识别出TIR中出现的四种低效模式。我们还发现,具有更高PTE成本的轨迹往往具有较低的推理正确率,这表明单纯使用更多工具并不能提升答案质量。