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成本的轨迹往往具有较低的推理正确性,这表明单纯使用更多工具并不能提高回答质量。